0.1.3 • Published 6 years ago

create-navigation v0.1.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

npm code size in bytes npm GitHub stars

Getting started

create-navigation is a basic yet amazing component to make routing an easy task. First of all, install it into your project using npm or yarn:

npm install create-navigation --save

yarn add create-navigation

Import create-navigation into your application and start routing:

import createNavigation, { withRouter } from 'create-navigation';
import { Home, About, Login } from './my-awesome-views';

const App = () => {
    return withRouter(
        createNavigation({
            Home: {
                path: '/home',
                component: <Home props="foo" />,
            },
            About: {
                restrict: true,
                component: <About />,
            },
            Login: {
                path: '/',
                exact: true,
                component: <Login />,
            },
        })
    );
};

export default App;

That's it! Now just access the path of the components and see them being rendered.

Documentation

Authors

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago