aux-router
React router that supports rendering of multiple independent (auxiliary) routes.
Install
Documentation
AuxRouter
It is a core component. All other aux-router components should be inside AuxRouter element.
AuxHashRouter
It is a core component. All other aux-router components should be inside AuxRouter element.
Aux path vs. main path
Since the rest of components use terms aux path and main path it is important to understand the difference between them. Let's assume that we have this URL: example.com/a(b/c), the main path is /a
and the aux path is (b/c)
.
AuxRoute
It is a route matcher. The AuxRoute that matches the current aux path will rendered.
componentName
- name of the component, the component will be rendered when the current aux path contains (name/...)componentValue
- value the component, the component will be rendered when the current aux path contains (.../value)component
- component to render
AuxLink
It is a component that is responsible for creating links for aux path in your application.
componentName
- it is translated to a link that contains (name/...)componentValue
- it is translated to a link that contains (.../value)description
- description of the linkactiveClassName
- css class that will be applied when the current aux path matches the (name/value)
AuxMainRoute
It is a route matcher. The AuxMainRoute that matches the current main path will rendered.
component
- the component, that will be rendered when the current main path matches to the path propertypath
- the main path
AuxMainLink
It is a component that is responsible for creating links for main path in your application.
activeClassName
- css class that will be applied when the current main path matches the path propertyactiveStyle
- css style that will be applied when the current main path matches the path propertydescription
- description of the linkpath
- it is translated to a link that contains _/value in the main path