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

[fail] Only warn on unacted effects for strict / non sync modes #16041

Conversation

threepointone
Copy link
Contributor

(basically, when fiber.mode !== 0b0000)

Warnings on unacted effects may be too noisy, especially for legacy apps. This PR fires the warning only when in a non sync mode (concurrent/batched), or when in strict mode. This should make gradually updating codebases easier too.

I also added batched mode tests to the act() suite.

(basically, when `fiber.mode !== 0b0000`)

Warnings on unacted effects may be too noisy, especially for legacy apps. This PR fires the warning only when in a non sync mode (concurrent/batched), or when in strict mode. This should make updating easier.

I also added batched mode tests to the act() suite.
@sizebot
Copy link

sizebot commented Jul 2, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@threepointone threepointone force-pushed the unacted-effects-warning-strict-mode-only branch from 5d2fb1e to 394ce77 Compare July 3, 2019 00:19
@threepointone threepointone merged commit bd84645 into facebook:master Jul 3, 2019
@threepointone threepointone deleted the unacted-effects-warning-strict-mode-only branch July 3, 2019 00:29
trueadm pushed a commit to trueadm/react that referenced this pull request Jul 3, 2019
…book#16041)

* only warn on unacted effects for strict / non sync modes

(basically, when `fiber.mode !== 0b0000`)

Warnings on unacted effects may be too noisy, especially for legacy apps. This PR fires the warning only when in a non sync mode (concurrent/batched), or when in strict mode. This should make updating easier.

I also added batched mode tests to the act() suite.

* explicitly check for modes before warning, explicit tests for all modes
@gaearon gaearon mentioned this pull request Jul 30, 2019
This was referenced Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants