Example app: https://simple-react-router.netlify.com/
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.
git clone [email protected]:robertistok/plain-react-experiment.git
npm install
npm run start
- component rendering based on the pathname
- dynamic params from the pathname passed down as props
- naigating using the back and forward buttons
- search query support
- programatic navigation
- adding pages dynamically
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.