-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The current implementation of the router (depending on parsing the current DOM into virtual nodes) seems like not very good practice and is definitely not declarative. I have two potential alternatives that I would be willing to implement to resolve this.
- Continue to show only loaded content but in a more declarative way.
- Change to a more basic 'loaded content or fallback loading spinner' type approach
For 1, I believe I have a solution where state of a new route will be held until that route has been loaded, and then it replaces the active route in state. This would allow the page to stay interactive until the new page has loaded. Clicking a different link before the page has loaded could result in the new page replacing the new route in state, or other Links could be locked until the route of the first link clicked has loaded.
Let me know if you have any suggestions or questions, and I can work to implement one of these solutions