react-basic-router04 May 2017
I published my first npm package today! It is called react-basic-router and it does pretty much what you would expect. Although it was a small project, I personally will find a lot of use from it. win-win.
The concept is simple. It is a hash router for reactJS. You can use it like this:
It supports prop pass-through, so if you add more props to the
<Route /> object, they will be pushed to the component when it renders. You can load one of these pages through regular anchor / hash links which must exactly match the hash prop.
There are some improvements I would like to make, such as an optional fuzzy matching for anchors. And perhaps an “Error” route for pages that don’t exist.
More to come. Enjoy!