@null-studios/browser-router
v115.0.0
Published
Common Browser Router.
Readme
@null-studios/browser-router
Common Browser Router.
yarn add @null-studios/browser-routerUsage
import { ConfigurationRouter, Router } from 'browser-router';
import React, { FunctionComponent } from 'react';
// All application routes used to render different pages.
export const Configuration: ConfigurationRouter = {
routeDestinationNotFound: () => <span>Not Found</span>;
routes: [
{
name: 'About',
path: '/about',
type: 'page',
destination: PageAbout,
},
{
name: 'Sitemap',
path: '/sitemap',
type: 'page',
destination: PageSitemap,
},
{
name: '',
path: '/',
type: 'redirect',
isExternal: false,
destination: '/home',
},
]
};
/*
* Application router.
*/
export const ApplicationRouter: FunctionComponent = () => {
return <Router configuration={Configuration} />;
};Contributions
| Author | Estimated Hours |
| ------------- | ------------- |
|
| 51.52 Hours |
