RForme

Home
Getting Started
Config
Theming
Components
Forms
Pages
Changelog
Sources and Credits

Pages

Paths

File contain all routes

Copy
pages/constants.js

Contants.js

Copy
export const ROUTE_NOT_FOUND = '/not-found';
export const ROUTE_SIGN_IN = '/sign-in';
export const ROUTE_SIGN_UP = '/sign-up';
export const ROUTE_PASSWORD_FORGOT = '/password/forgot';
export const ROUTE_PASSWORD_RESET = '/password/reset';

Add new routes

Base routes in file:

Copy
pages/routes/Routes.jsx

Add new route and compontent to array:

Copy
const nonLoggedRoutes = [
{ path: ROUTE_SIGN_IN, Component: SignIn },
{ path: ROUTE_SIGN_UP, Component: SignUp },
{ path: ROUTE_PASSWORD_FORGOT, Component: ForgotPassword },
{ path: ROUTE_PASSWORD_RESET, Component: ResetPassword },
];

Route Animations

PropTypeRequiredDefault
pathstring
Required
childrennode
Required
timeoutnumberOptionalPAGE_TRANSITION_TIME
animationup | scale | down | noneOptionalup

Code

Copy
<AnimatedRoute key={path} path={path} animation={'up'}>
<Component />
</AnimatedRoute>