Created
June 13, 2022 05:34
-
-
Save junhoyeo/1c3b9ef7afa215bda92c1f496ef33d6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handler = () => {} | |
// params should be serialized key? | |
const [pages, setPages] = useState() | |
useEffect(() => { | |
while (cursor) { | |
const { data, cursor } = requester(params) | |
setPages(prev => [...prev, data]) | |
} | |
}, [params]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment