[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
-
2.7.2 - 2024-08-24
- Fix container subscription leak in StrictMode in #228
-
2.7.1 - 2023-09-08
⚠️ Warning
- Removed old implementation of Container (class based) that was causing a memory leak is some circumstances. It was replaced with a functional implementation that should perform better. There is a change in behaviour tho: Container stores now get initialised lazily, when the first hook/subscriber is rendered, so
-
2.7.0 - 2023-08-02
- a container can be shared across multiple stores forming a single boundary
- containers are super lightweight and can be imported anywhere without bundling the store
- the stores themselves can declare their own lifecycle handlers
- stores that specify containedBy but end up in a tree without container, will trigger an async error, making possible to track unintended global store leaks. Read more in the new Container docs.
- improved performance on pages with thousands of listeners for a single store
- enabled Devtools tracing by default
-
2.6.5 - 2022-09-26
-
2.6.4 - 2022-08-15
- Officially support React 18
- Use React
- Officially deprecate
- Change internal API (
from react-sweet-state GitHub release notesBug fixes
This version accidentally causes a change in behaviour on React 16 with
defaults.batchedUpdatesunset (or set to false) on Containers that useonUpdate. Basically calling to setState inside anonUpdatemight 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
onInitmight 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
containedByit. 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
useSyncExternalStorehookbatchUpdatessetting via types, making defaulttruefor 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: