We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 362dc45 commit 54cf5e6Copy full SHA for 54cf5e6
react/advanced-hooks/05-optimistic-ui/lecture/App.tsx
@@ -1,7 +1,7 @@
1
-import { useOptimistic, useState, useTransition } from 'react'
+import { useOptimistic, useState } from 'react'
2
import { type ResponseData, updateDatabase } from './helpers/mockServer'
3
4
-// Big takeaways:
+// Big Takeaways
5
// 1. Homegrown optimistic state works with onSubmit, not with actions
6
// 2. useOptimistic works with actions, not on submit
7
@@ -40,7 +40,6 @@ export function App() {
40
// const [likes, setLikes] = useState(0)
41
42
// const [opLikes, setOpLikes] = useState(0)
43
-// const [pending, startTransition] = useTransition()
44
45
// async function submit(e: React.FormEvent) {
46
// e.preventDefault()
0 commit comments