Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
warn if passive effects get queued outside of an act() call. #15763
This adds a warning when effects are queued outside of an act() scope. Please see this diff with whitespace off (add
While the code itself isn't much (it adds the warning to
This commit has one last failing test. Working on it, might reach out to one of you for help.
Please please look closely at the tests I've changed; I went about it with a rough-ish hand, wrapping whatever started warning with
An important question - Is this worth it? Consider an app built with both classical, and functional components. Assume that the class ones are parents to functional children. As we add hooks and effects to children, tests that used to pass for class components will start failing, meaning people will have to update tests for older components they might not be interested in touching.
Details of bundled changes.