[Snyk] Upgrade react-sweet-state from 2.6.4 to 2.7.2 #255
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.
Snyk has created this PR to upgrade react-sweet-state from 2.6.4 to 2.7.2.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 4 versions ahead of your current version.
The recommended version was released 8 months ago.
Release notes
Package name: react-sweet-state
Bug fixes
This version accidentally causes a change in behaviour on React 16 with
defaults.batchedUpdates
unset (or set to false) on Containers that useonUpdate
. Basically calling to setState inside anonUpdate
might trigger a warning and the subscribers might receive the updates on next tick. We recommend staying on <= v2.7.0 until moving to React 18Bug fix
onInit
might be deferred. In most cases that should improve performance, but might make some tests failing if only a container is rendered (with no subscribers).New features
Until now, containers were exclusively bound to a single store, they would trigger actions based on the container component lifecycle and would require knowledge of the store and actions. We developed a new API that evolves the concept to be more flexible by inverting the relationship: containers act as boundaries for all stores that declare that they are
containedBy
it. This enables some great properties:The old container API still exists and is supported, as it makes sense in other contexts like tests, but we recommend the new API for production use cases.
This release also:
2.6.5
useSyncExternalStore
hookbatchUpdates
setting via types, making defaulttrue
for R18+storeState.subscribe
) types to no longer expose get state/store as arguments. Still available in reality to not break compatImportant
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: