Skip to content

robertistok/plain-react-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example app: https://simple-react-router.netlify.com/

What is this about?

It is a simple experiment, where I try to implement basic routing in React.

Apart from the packages provided by create-react-app, styled-components for styling and path-to-regexp to parse the pathname as a regex, the project does not use any external packages.

Try it out

  1. git clone [email protected]:robertistok/plain-react-experiment.git
  2. npm install
  3. npm run start

Supports:

  • component rendering based on the pathname
  • dynamic params from the pathname passed down as props
  • naigating using the back and forward buttons

Todo:

  • search query support
  • programatic navigation
  • adding pages dynamically

CTA

Feel free to check out the code and play around on the website. If you have any thoughts, open an issue and we can take it from there.

About

Routing in react without react-router

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published