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

feat(persist): improve ssr & add versions & new callback #275

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

AnatoleLucet
Copy link
Collaborator


This ended up being more of a feature rich pr instead of a full refactor 😄
Anyway this includes the two breaking changes I intended to add. The callback for the storage options, and the new onRehydrateStorage option.

I intend to add some more features on this middleware (I'll open a few issues soon), but no breaking changes in mind.

Close #248
Close #243

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 6, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b684ef3:

Sandbox Source
React Configuration
React Typescript Configuration

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.
Overall it looks good. Added some comments.

src/middleware.ts Outdated Show resolved Hide resolved
src/middleware.ts Outdated Show resolved Hide resolved
src/middleware.ts Outdated Show resolved Hide resolved
src/middleware.ts Outdated Show resolved Hide resolved
@AnatoleLucet AnatoleLucet force-pushed the refactor/persist-middleware branch 3 times, most recently from 5faac73 to 4b14a13 Compare January 7, 2021 17:27
- add js doc for option object
- improve ssr support
- add a new version option pmndrs#243
- refactor postRehydrationMiddleware to onRehydrateStorage
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

It looks good! Ready to merge and release this?

src/middleware.ts Show resolved Hide resolved
@AnatoleLucet
Copy link
Collaborator Author

Sure

@dai-shi dai-shi merged commit d5e85d2 into pmndrs:master Jan 8, 2021
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.

Versioned Persist Middleware
2 participants