Junctions.js is a router built from the ground up for component-based applications.
It equips you to create reusable React components that have routes and links, and integrate seamlessly with the browser History API.
Because it has principles.
These three principles are described in more (and less) detail in The Haiku Of Routing Principles.
The pitch for a super awesome routing library is a funny place to get asked “Do you actually need a router?” – but it would be irresponsible to tell you how great junctions.js is without telling you that not using any router is often even better. So ask yourself – do you really
Once you’ve decided that junctions.js does fit your needs, the best way to get started is to try it. and the Tutorial makes this easy – after following along, you’ll have built a real app and have the experience to apply junctions.js to your own projects.
Also, the junctions.js website eats its own dog food. When viewing the website, you can open your developer console to take a look!
At minimum, you’ll need the junctions package
npm install junctions --save
npm install react-junctions --save
Alternatively, use plain-ol’ script tags with unpkg.
<script src="https://email@example.com/dist/junctions.js"></script> <script src="https://firstname.lastname@example.org/dist/index.js"></script>
Contributions are welcome, especially for the documentation.
To get the documentation running locally, you’ll need to make sure you have a link to the junctions package itself in your
npm install npm link npm link junctions npm run docs:start
Then open your browser to http://localhost:4000!