Asynchronous data fetching / other effects
See original GitHub issueHey, first of all thank you for releasing this - looks great so far! š
I have gotten a basic app working now, with some placeholder interactions. Now I would like to show some ālive dataā in the Home Tab, and was wondering if there was an example for this or if you had any hints. My attempts either resulted in stale state, that was only refreshed after another interaction, or lots of requests triggered that didnāt do anything at all š
Something like āsend a GET request on load, fetch data, show result to userā. In a normal React app Iād use useEffect(() => fetch(requestTarget).then(data => setState(data)), [requestTarget])
or something like that and Iād expect that to cause an update of the view. However that didnāt seem to work for me š¤
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (10 by maintainers)
Top GitHub Comments
Closing this for #19
Ah yeah, that seems reasonable-- canāt think of a case that doesnāt cover off hand