Implementation of the react-router
When you nest your application inside the within the <RapidMain>
component the react-router
is by default inject into the application and you do not need to do any further configuration for react router. You can define your routes easily the way you would in your components using the <Route />
, <Redirect />
, <Link />
or any other component being offered by the react-router
.
Switching between <BrowserRouter>
and <HashRouter/>
By default RapidAdminReact® uses the <BrowserRouter />
but is you need to switch to <HashRouter/>
it is certainly possible to do so. You can do this easily by changing the configuration file.
Location of the configuration file
./config
├── rapidAdmin
└── settings.js
In the settings
file you need to change the router : 'browser'
to router : 'hash'
to enable the <Hashrouter />
. This is how the changed object would look like once you have made the change.
config : {
appUrl : 'http://localhost:3000/' , // The URL of your application which is applied to the logo as well
router : 'hash' , // use 'hash' if you need to replace the BrowserRouter with the HashRouter
theme : 'light' , // The option to choose between the `light` and the `dark` theme
themeDirection : 'ltr' , // Choose between `ltr` and `rtl` theme
} ,