Michel Weststrate, I believe this is the right approach. Configuration (routing) as react components is against all logic.
I have some additional ideas:
- You can skip the view identifiers, a.k.a. “overview” and “document”. You should derive that from the lack or existence of data and whether this data is hidden or not. When the url change, mark content that shouldn’t be shown as hidden or remove it from state. Use `@computed` to memoize this check. I.e: `store.visibleDocuments` which refers only to the documents which should be shown.
- When the url change, you can just change data. No need run things like `showDocument`. Let the wonderful mobx observation takes care of the reaction to the data change.