📄️ Installation
Routing in one of the most important parts of any web application. It is the mechanism that allows you to map URLs to controllers and actions. This is a very important concept to understand because it is the foundation of how web applications work. Sonnet JS provides a very simple and easy to use routing system that allows you to define routes using a simple and easy to understand syntax.
📄️ Router Component
This is sonnet compatible router component. It is used to manage the routing in Sonnet JS. It returns route object that can be passed inside router plugin instance. We can pass page path, content, and layout inside the router component.
📄️ History
The History class is used to manage the browser history in Sonnet JS. It provides a simple and easy-to-use API for interacting with the browser history, including navigating to different URLs, listening for changes to the history stack, and programmatically manipulating the history stack.
📄️ Router Instance
The createRouter function is used to create an instance of the Router class in Sonnet JS. The Router class is used to manage the routing in Sonnet JS. It is sonnet specific plugin for managing all the routing in the application.
📄️ Advanced
This section covers some advanced topics related to routing in Sonnet JS.