Skip to content

Commit

Permalink
[Fresh] Update the list of built-in hooks (facebook#27864)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik authored and AndyPengc12 committed Apr 15, 2024
1 parent 48a6a97 commit 7301686
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 7301686

Please sign in to comment.