Skip to content

Commit 58b6c16

Browse files
committed
Ooops
1 parent b516e19 commit 58b6c16

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/content/reference/react/useActionState.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ You can use an `AbortController` to cancel pending Actions:
801801
<Sandpack>
802802
803803
```js src/App.js
804-
import { useActionState, useOptimistic, useRef } from 'react';
804+
import { useActionState, useRef } from 'react';
805805
import { addToCart, removeFromCart } from './api';
806806
import QuantityStepper from './QuantityStepper';
807807
import Total from './Total';
@@ -810,8 +810,6 @@ export default function Checkout() {
810810
const abortRef = useRef(null);
811811
const [count, dispatchAction, isPending] = useActionState(updateCartAction, 0);
812812

813-
const [optimisticCount, setOptimisticCount] = useOptimistic(count);
814-
815813
async function addAction() {
816814
if (abortRef.current) {
817815
abortRef.current.abort();

0 commit comments

Comments
 (0)