Skip to content
This repository was archived by the owner on Dec 3, 2022. It is now read-only.

Commit edb22b0

Browse files
authored
Merge pull request #45 from nnals/patch-1
Consistently use named import for hooks
2 parents b715ee6 + f3b3d2c commit edb22b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ function MyScreen() {
129129

130130
```js
131131
function Profile({ userId }) {
132-
const [user, setUser] = React.useState(null);
132+
const [user, setUser] = useState(null);
133133

134-
const fetchUser = React.useCallback(() => {
134+
const fetchUser = useCallback(() => {
135135
const request = API.fetchUser(userId).then(
136136
data => setUser(data),
137137
error => alert(error.message)

0 commit comments

Comments
 (0)