TehShrike / abstract-state-router

Like ui-router, but without all the Angular. The best way to structure a single-page webapp.
http://tehshrike.github.io/state-router-example
294 stars 26 forks source link

feature: helpful error message when child DOM not found #148

Closed saibotsivad closed 2 years ago

saibotsivad commented 2 years ago

If you forget to put a child node in, for example in Svelte it would be forgetting to put the uiView element, the error that gets thrown is rather cryptic.

The exact error depends on the renderer exactly, but for example in Svelte it looks like this:

image

Instead of throwing a cryptic error, we can reject with an error that gets bubbled out to stateChangeError.