project-react-core
v1.0.7
Published
## Install `yarn install` `yarn build` `yarn link`
Downloads
12
Readme
Project Core
Install
yarn installyarn buildyarn link
Go to the project where you like to use the library and execute
yarn link "project-core" or npm link "project-core"
Methods
This library has the following methods
| Methods | Description | | --- | --- | | AsyncLoader (path, params)) | Load a component asynchronus. | | generatePath(parentPath, path, param) | Return a path for a route based on it's parent path (if any), the route path and it's param (if any). | | loadLayout(containerPath, template, params) | Loads the layout based on the template. If there is no Layout, loads the container directly. | | createRoute(routePath, exact, component) | Create a route component. | | createPaths(match, route) | Create the routePath and the componentPath for the received subroute. | | createPaths(match, subroutes) | Create a route component for each subroute. |
Components
RouterComponent
Build the router structure based on the routers properties.
Use
<RouterComponent routers={your_routes.js_file} />
Dependencies
"react": ">=16.4.1",
"react-router-dom": ">=4.3.1"
