choojs / choo

:steam_locomotive::train: - sturdy 4kb frontend framework
https://choo.io/
MIT License
6.78k stars 595 forks source link

Match route before init stores #698

Closed tornqvist closed 5 years ago

tornqvist commented 5 years ago

This adds back the changes made in #695 ensuring that href, query, params etc. are in the state before the stores are initialized.

bcomnes commented 5 years ago

Is this a breaking change?

tornqvist commented 5 years ago

It could be, if a store is checking for these properties in state to determine if it has been initialized before or not. Also, in combination with https://github.com/choojs/choo/pull/649 these properties will always be in state on initialization, as opposed to only after the first call toString.

@yoshuawuyts mentioned on IRC that the init order has been switched around before, but not as a breaking change and apparently it caused issues for some people.