Reinventing the routing in React apps

The router is the backbone of your application. Trust me, that’s how it is and I can prove it. One of the fundamental ideas in Web is the URL (Uniform Resource Locator). Or the way of how we very often call it – “web address”. No mather what you are building there is a web address which identifies your resource. The router is the front office that accepts the request to particular URL and wires it to a logic. Logic for generating HTML or JSON response or something else. So, the router is very important part of your system.

At the end of last year I rewrote one of my favorite projects – a vanilla JS router called Navigo. I was procrastinating this work for years. Finally I did it in TypeScript and wrote 100+ unit tests along the way. This refactoring opens the door for new features and more importantly, for integrating the library into other places. Like React for example.


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog

The router is the backbone of your application. Trust me, that's how it is and I can prove it. One of the fundamental ideas in Web is the URL (Uniform Resource Locator). Or the way of how we very often call it - "web address". No mather what you are building there is a web address which identifies your resource. The router is the front office that accepts the request to particular URL and wires it to a logic. Logic for generating HTML or JSON response or something else. So, the router is very important part of your system.

At the end of last year I rewrote one of my favorite projects - a vanilla JS router called Navigo. I was procrastinating this work for years. Finally I did it in TypeScript and wrote 100+ unit tests along the way. This refactoring opens the door for new features and more importantly, for integrating the library into other places. Like React for example.


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog


Print Share Comment Cite Upload Translate Updates
APA

Krasimir Tsonev - blog | Sciencx (2021-02-07T21:52:56+00:00) Reinventing the routing in React apps. Retrieved from https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/

MLA
" » Reinventing the routing in React apps." Krasimir Tsonev - blog | Sciencx - Sunday February 7, 2021, https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/
HARVARD
Krasimir Tsonev - blog | Sciencx Sunday February 7, 2021 » Reinventing the routing in React apps., viewed ,<https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/>
VANCOUVER
Krasimir Tsonev - blog | Sciencx - » Reinventing the routing in React apps. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/
CHICAGO
" » Reinventing the routing in React apps." Krasimir Tsonev - blog | Sciencx - Accessed . https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/
IEEE
" » Reinventing the routing in React apps." Krasimir Tsonev - blog | Sciencx [Online]. Available: https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/. [Accessed: ]
rf:citation
» Reinventing the routing in React apps | Krasimir Tsonev - blog | Sciencx | https://www.scien.cx/2021/02/07/reinventing-the-routing-in-react-apps/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.