diff --git a/packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js b/packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js index 939b2fa20e0dd..0c761b4a47136 100644 --- a/packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js +++ b/packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js @@ -17,6 +17,7 @@ import { useContext, useDebugValue, useEffect, + useOptimistic, useState, } from 'react'; @@ -73,6 +74,7 @@ function FunctionWithHooks(props: any, ref: React$Ref) { const [count, updateCount] = useState(0); // eslint-disable-next-line no-unused-vars const contextValueA = useContext(ContextA); + useOptimistic(1); // eslint-disable-next-line no-unused-vars const [_, __] = useState(object);