Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redux persist #20

Merged
merged 1 commit into from
Jan 1, 2023
Merged

Remove redux persist #20

merged 1 commit into from
Jan 1, 2023

Conversation

jho406
Copy link
Collaborator

@jho406 jho406 commented May 13, 2022

Redux persist isn't needed. It was included originally to handle the case of a
direct visit or back button visit to a page that had the redux store mutated
from the original injected state.

But I realized I could just lean on the cache header support from rails to
handle freshness and force the browser to give us a new page, with the newly
injected JSON too.

Redux persist isn't needed. It was included originally to handle the case of a
direct visit or back button visit to a page that had the redux store mutated
from the original injected state.

But I realized I could just lean on the [cache header] support from rails to
handle freshness and force the browser to give us a new page, with the newly
injected JSON too.

[cache header]: https://thoughtbot.com/blog/take-control-of-your-http-caching-in-rails
@jho406 jho406 requested a review from whitecl May 13, 2022 14:53
Copy link
Contributor

@whitecl whitecl left a comment

Choose a reason for hiding this comment

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

This is awesome, love the reduction of dependencies!

Is the cache header behavior you described in the PR now happening by default, or does that describe a future iteration?

@jho406 jho406 merged commit dfd2a52 into main Jan 1, 2023
@jho406 jho406 deleted the remove-redux-offline branch January 1, 2023 13:34
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.

None yet

2 participants