-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: getInitialState #2277
Merged
Merged
feat: getInitialState #2277
Commits on Dec 29, 2023
-
feat(react): implement getServerState by closing over the defaultState
serverState will be used by react on the first client render; this should avoid hydration mismatches when combined with the persist middleware, which can change the state between the SSR and the first CSR
Configuration menu - View commit details
-
Copy full SHA for 1aef460 - Browse repository at this point
Copy the full SHA 1aef460View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddd6fc - Browse repository at this point
Copy the full SHA 1ddd6fcView commit details -
feat: implement getServerResult in persist middleware
this avoids hydration errors when state is restored from e.g. localstorage synchronously
Configuration menu - View commit details
-
Copy full SHA for 6d046fe - Browse repository at this point
Copy the full SHA 6d046feView commit details -
feat: capture initialState for getServerState in react
this avoids hydration mismatches when updates happen to the store state between ssr and csr
Configuration menu - View commit details
-
Copy full SHA for 2d868c6 - Browse repository at this point
Copy the full SHA 2d868c6View commit details
Commits on Dec 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9c7b13e - Browse repository at this point
Copy the full SHA 9c7b13eView commit details -
fix: make selector default to identity function
if we default to `api.getState`, we will always read the client snapshot if there is no selector passed. An identity function returns its argument, which is either the snapshot (api.getState) or the server snapshot (api.getServerState)
Configuration menu - View commit details
-
Copy full SHA for a985abe - Browse repository at this point
Copy the full SHA a985abeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9758153 - Browse repository at this point
Copy the full SHA 9758153View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44c5f4c - Browse repository at this point
Copy the full SHA 44c5f4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for de85649 - Browse repository at this point
Copy the full SHA de85649View commit details -
Configuration menu - View commit details
-
Copy full SHA for a383a81 - Browse repository at this point
Copy the full SHA a383a81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92c4781 - Browse repository at this point
Copy the full SHA 92c4781View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7af7553 - Browse repository at this point
Copy the full SHA 7af7553View commit details
Commits on Jan 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3523cf3 - Browse repository at this point
Copy the full SHA 3523cf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28c4527 - Browse repository at this point
Copy the full SHA 28c4527View commit details
Commits on Jan 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5aaf3a8 - Browse repository at this point
Copy the full SHA 5aaf3a8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.