Closed igormcsouza closed 3 years ago
Open stackoverflow question https://stackoverflow.com/questions/65876577/usereducer-typescript-on-a-async-maner
Added new question on StackOverFlow
https://stackoverflow.com/questions/65968229/dispatch-from-usereducer-not-working-as-i-wanted
Fixed!! Finally! I took all the async/await things to be done outside the reducer, and on the reducer, I just trigger the populate!
I'm trying to populate the tasklist from the backend information fetching it as soon as the application starts. I also want to update it everytime an change is made on backend (when add, update or delete tasks).
I tried to use useEffect, but the Promise mess everything up.
I'm running out of ideas and this problem is driving me crazy! haha... :) I really would like to know what I can do to overcome it!