Skip to content

Fix state turned readonly in update fn#2717

Merged
marvinhagemeister merged 1 commit intomasterfrom
state-mutate
Aug 26, 2020
Merged

Fix state turned readonly in update fn#2717
marvinhagemeister merged 1 commit intomasterfrom
state-mutate

Conversation

@marvinhagemeister
Copy link
Copy Markdown
Member

Some libraries like immer mutate the current state object and mark all properties as readonly. This broke our update function.

Fixes #2716.

Some libraries like immer mutate the current state and mark it as
readonly. This didn't play well with our update logic
@github-actions
Copy link
Copy Markdown

Size Change: +11 B (0%)

Total Size: 40.4 kB

Filename Size Change
dist/preact.js 3.9 kB +3 B (0%)
dist/preact.min.js 3.93 kB +3 B (0%)
dist/preact.module.js 3.92 kB +3 B (0%)
dist/preact.umd.js 3.97 kB +2 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.26 kB 0 B
compat/dist/compat.module.js 3.29 kB 0 B
compat/dist/compat.umd.js 3.33 kB 0 B
debug/dist/debug.js 3.09 kB 0 B
debug/dist/debug.module.js 3.09 kB 0 B
debug/dist/debug.umd.js 3.18 kB 0 B
devtools/dist/devtools.js 185 B 0 B
devtools/dist/devtools.module.js 195 B 0 B
devtools/dist/devtools.umd.js 260 B 0 B
hooks/dist/hooks.js 1.09 kB 0 B
hooks/dist/hooks.module.js 1.11 kB 0 B
hooks/dist/hooks.umd.js 1.17 kB 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

@github-actions
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.8%) to 99.022% when pulling 0ee4006 on state-mutate into 0f1f162 on master.

Comment thread test/browser/components.test.js
@marvinhagemeister marvinhagemeister merged commit 53827e3 into master Aug 26, 2020
@marvinhagemeister marvinhagemeister deleted the state-mutate branch August 26, 2020 08:08
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.

Compatibility issues with Immer?

3 participants