Quantcast
Channel: How do I separate api / async request logic from react components when using recoil - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Andy for How do I separate api / async request logic from react...

get data from back end and set it in stateYou may be looking for useRecoilValueLoadable:"This hook is intended to be used for reading the value of asynchronous selectors. This hook will subscribe the...

View Article



Answer by Matthew Jonat for How do I separate api / async request logic from...

So I dont know if this is the best answer but it does work and ultimately what I wanted to do was seperate the logic from the screen component.The answer in my situation is a bit long winded but this...

View Article

How do I separate api / async request logic from react components when using...

So at the moment I am having to put my request / api logic directly into my components because what I need to do a lot of the time is set state based on the response I get from the back end.Below is a...

View Article
Browsing latest articles
Browse All 3 View Live


Latest Images