Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn if static flag is accidentally cleared (facebook#20807)
* Warn if static flag is accidentally cleared "Static" fiber flags are flags that are meant to exist for the lifetime of a component. It's really important not to accidentally reset these, because we use them to decide whether or not to perform some operation on a tree (which we can do because they get bubbled via `subtreeFlags)`. We've had several bugs that were caused by this mistake, so we actually don't rely on static flags anywhere, yet. But we'd like to. So let's roll out this warning and see if it fires anywhere. Once we can confirm that there are no warnings, we can assume that it's safe to start using static flags. I did not wrap it behind a feature flag, because it's dev-only, and we can use our internal warning filter to hide this from the console. * Intentionally clear static flag to test warning * ...and fix it again
- Loading branch information