Skip to content

Commit

Permalink
[Fresh] Update the list of built-in hooks (#27864)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik authored Feb 6, 2024
1 parent 30e2938 commit 7cbd026
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/react-refresh/src/ReactFreshBabelPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,22 @@ export default function (babel, opts = {}) {
case 'React.useImperativeHandle':
case 'useDebugValue':
case 'React.useDebugValue':
case 'useId':
case 'React.useId':
case 'useDeferredValue':
case 'React.useDeferredValue':
case 'useTransition':
case 'React.useTransition':
case 'useInsertionEffect':
case 'React.useInsertionEffect':
case 'useSyncExternalStore':
case 'React.useSyncExternalStore':
case 'useFormStatus':
case 'React.useFormStatus':
case 'useFormState':
case 'React.useFormState':
case 'useOptimistic':
case 'React.useOptimistic':
return true;
default:
return false;
Expand Down

0 comments on commit 7cbd026

Please sign in to comment.