I am building a Single Page Application (SPA) using vanilla JavaScript. I am looking for ways to implement routing within the application. I came across the History API and found it to be a potential solution.
Specifically, I am interested in:
- How to effectively manage the global state object in a SPA.
- Best practices for storing and retrieving data from the History API.
- Are there any potential drawbacks or limitations to consider when using the History API for routing in a SPA?