Skip to content

Commit 374429a

Browse files
authored
Update separating-view-logic.md
fix the example code state
1 parent 9331a96 commit 374429a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/guide/separating-view-logic.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const fetchPerson = async ({ id }, { signal }) => {
1515
}
1616

1717
const Person = ({ id }) => {
18-
const { data, error } = useAsync({ promiseFn: fetchPerson, id })
18+
const state = useAsync({ promiseFn: fetchPerson, id })
1919
return children(state)
2020
}
2121

0 commit comments

Comments
 (0)