React best practices are a bit out of scope for th...
# pact-js
t
React best practices are a bit out of scope for this channel, but in general, I don't think it's good practice to have API fetch code directly in the hook. I suspect the reason the example in the react code has the fetch directly in the hook is just so all the context is there (and API layering is out of scope for the example).
💯 1
l
That example was super helpful to me as I get to grips with this stuff. Thank you!
🙌 1
t
You’re welcome!