loteoo/hyperstatic

Should hyperstatic's route states be exposed to the user?

loteoo opened this issue · 0 comments

If you look at the demo site, every state changes are logged to the console to help peek into hyperstatic's inner workings.

As you can see, hyperstatic's state is stored right in the app state, mixed up with the user's states.
This is useful for getting data out of the location object, for example. You can get route params like this: state.location.params.id, for example.

It does get a little weird for the routes thought. I use it in the demo site to show the route states with icons right next to the links, but you need a pretty good understanding of the inner workings of hyperstatic to do anything with that data. Is that a problem?

Which do you think is better :
a) Leave all state exposed in the app state
b) Hide all state from the user, leave it's state empty
c) Only expose the location object, hide the routes object

Any changes you'd do to the way the routes object works? Thanks.