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

Support React Hooks (#5602) #5997

Merged
merged 15 commits into from Mar 15, 2019

Force array destructuring to work in loose mode only for known Hooks

  • Loading branch information...
eivind88 committed Feb 17, 2019
commit 8dc1de4913e30db1cfe569176ab645a8d3a7e5b5
@@ -122,6 +122,18 @@ module.exports = function(api, opts, env) {
// Use loose mode for performance:
// https://github.com/facebook/create-react-app/issues/5602
loose: true,
selectiveLoose: [
'useState',
'useEffect',
'useContext',
'useReducer',
'useCallback',
'useMemo',
'useRef',
'useImperativeHandle',
'useLayoutEffect',
'useDebugValue',
],
},
],
// Turn on legacy decorators for TypeScript files
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.