Understanding routing
Routing is one of the most essential and primary parts of building dynamic web applications. You may be familiar with the word in its everyday context. It is the process of getting a user to their desired location. Users who enter website.com/about
into their URL bar will be redirected to the About page.
In web development, routing is the matching mechanism by which we decide how to connect HTTP requests to the code that handles them. We use routing whenever there is a need for URL navigation in our application. Most modern web applications contain a lot of different URLs, even single-page ones.
Thus, routing creates a navigation system and helps users quickly move around our application and the web. With Single-Page Applications (SPAs), routing allows you to smoothly navigate within an application without the need for page refreshing.
In short, routing is a way for an application to interpret what resource users want based on the URL provided. It is...