react-pretence-router

1.0.5 • Public • Published

react-pretence-router

This router is based on React-Redux and use state in Redux store to decide which component will be rendered. It look like a router but it isn't a real router like React-Router.

It is lightweight, simple to use and useful for small application or web browser extension development. Simple way for simple requirement (^_~).

I recommend you use Redux DevTools extension to know more about what happen and how data changed when you develop your app.

Example usage

import React from 'react';
import { Link } from 'react-pretence-router';

export const Menu = () => (
    <div>
        <Link to={'/'} name={'Home'} css={'menu'}/>
        <Link to={'/about'} name={'About'} css={'menu'}/>
        <Link to={'/contact'} name={'Contact'} css={'menu'}/>
    </div>
)

View on GitHub to know more how to use and other information.

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i react-pretence-router

    Weekly Downloads

    1

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    3.51 kB

    Total Files

    3

    Last publish

    Collaborators

    • nguyenkhois