Skip to content

Conversation

@MonicaOlejniczak
Copy link
Contributor

A continutation of #145 with the following additions:

albertogasparin and others added 2 commits January 18, 2023 16:33
Co-authored-by: Liam Ma <liam.q.ma@gmail.com>
@MonicaOlejniczak MonicaOlejniczak force-pushed the improvement/consolidate-routers branch from 09e5023 to 8fded4d Compare January 18, 2023 05:33
if (!isServerEnvironment()) {
dispatch(actions.listen());
}
dispatch(actions.listen());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to prevent this from being called on server?

Copy link
Contributor Author

@MonicaOlejniczak MonicaOlejniczak Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I think this was ported incorrectly in your original changes 😂

Copy link
Contributor Author

@MonicaOlejniczak MonicaOlejniczak Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now in the latest commits


bootstrapStore({
...bootstrapProps,
history: history || createMemoryHistory({ initialEntries: [location] }),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If history is now required as prop, should we mandate it here too? Wonder if this might cause problem if we pass a history v4 and consumer is using history v5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a peer dependency, so it shouldn't matter. But I can change it if you like

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We said we wanna deprecate this API later on anyway, so fine to leave as is


return (
return (
<ResourceContainer isGlobal={isGlobal}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our earlier discussion, wonder if isGlobal here is really doing what we think. As if false, would getResourceStore() actually work??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the integration tests do fail when isGlobal is false on the ResourceContainer and that is using the public API (i.e. nothing is mocked). Shall I hardcode the resource container isGlobal to true?

@MonicaOlejniczak MonicaOlejniczak merged commit 2fd9c38 into master Jan 19, 2023
@MonicaOlejniczak MonicaOlejniczak deleted the improvement/consolidate-routers branch January 19, 2023 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants