mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
f1db9c30cc
## Summary Before this commit, if a hook returned an object and we declared a variable using object destructuring on the returned value, we would produce a runtime error. This was detected via internal testing. This commit fixes that and adds regression tests. ## Test Plan - yarn flow - yarn test - yarn test-build-devtools - added new regression tests - named hooks still work on manual test of browser extension on a few different apps (code sandbox, create-react-app, internally).