@remshams/react-context-router

Context based react router

Usage no npm install needed!

<script type="module">
  import remshamsReactContextRouter from 'https://cdn.skypack.dev/@remshams/react-context-router';
</script>

README

React Router

React Router based on the new Context API

Features

  • Nested Routes
  • Param pathing

Installation

npm install react-context-router --save
yarn add react-context-router

Usage

const Child = () => (
  <div>Child</div>
);

const Parent = () => (
  <Route path="child" Component={Child}/>
);


const App = () => {

  return (
    <>
      <Router>
        <Route path="parent" Component={Parent}/>
      </Router>
    </>
  );
};