1.0.7 • Published 6 years ago

project-react-core v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Project Core

Install

yarn install
yarn build
yarn 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

MethodsDescription
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"