Skip to content

Commit 719fd72

Browse files
author
Sebastian Silbermann
committed
Add useOptimistic to devtools shell
1 parent 7a35881 commit 719fd72

File tree

1 file changed

+2
-0
lines changed
  • packages/react-devtools-shell/src/app/InspectableElements

1 file changed

+2
-0
lines changed

packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
useContext,
1818
useDebugValue,
1919
useEffect,
20+
useOptimistic,
2021
useState,
2122
} from 'react';
2223

@@ -73,6 +74,7 @@ function FunctionWithHooks(props: any, ref: React$Ref<any>) {
7374
const [count, updateCount] = useState(0);
7475
// eslint-disable-next-line no-unused-vars
7576
const contextValueA = useContext(ContextA);
77+
useOptimistic<number, mixed>(1);
7678

7779
// eslint-disable-next-line no-unused-vars
7880
const [_, __] = useState(object);

0 commit comments

Comments
 (0)