Skip to content

Commit ac50bbe

Browse files
authored
Merge pull request #48 from ferueda/master
fix bug/typo in infinite-scroll.md
2 parents 226cce6 + 189eea0 commit ac50bbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/docs/infinite-scroll.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ function App() {
1818
function myFetchFunction () {
1919
setIsLoading(true);
2020
setIsError(false);
21-
setPage(page => page + 1);
21+
2222
2323
fetch('https://myapi.com/mylist')
2424
.then(res => res.json())
2525
.then(data => {
2626
setList(list.concat(data));
27+
setPage(page => page + 1);
2728
setIsLoading(false);
2829
setIsError(false);
2930
})

0 commit comments

Comments
 (0)