Skip to content

Store timing with useEffect #107

Answered by lostpebble
hohenp asked this question in Q&A
Apr 7, 2021 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

Hi @hohenp ,

I'm sorry, I've read over your code a few times and I'm very confused as to what could be going wrong- I cannot really understand what it exactly is meant to do... There's probably a much easier way to achieve what you're trying to do here. It looks like you're wrapping many async functions and requests all together in multiple layers and its not easy to reason about.

Its very hard for me to debug exactly what could be going wrong here. It may have something to do with the fact that you're calling functions in higher hooks which do things outside of the React "component" pattern- so you're getting state that hasn't been updated yet from the GlobalStore.useState() hook- or an …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@lostpebble
Comment options

@hohenp
Comment options

@lostpebble
Comment options

@hohenp
Comment options

@hohenp
Comment options

Answer selected by hohenp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants