Skip to content

Commit

Permalink
Add useOptimistic to devtools shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Silbermann committed Feb 2, 2024
1 parent 7a35881 commit f35eb57
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
useContext,
useDebugValue,
useEffect,
useOptimistic,
useState,
} from 'react';

Expand Down Expand Up @@ -73,6 +74,7 @@ function FunctionWithHooks(props: any, ref: React$Ref<any>) {
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);
Expand Down

0 comments on commit f35eb57

Please sign in to comment.