Rafael Nunes
1 min readApr 25, 2019

--

The approach of the cited package creates multiples providers/consumers indeed.

Toggling the link via context is indeed a very good ideia! In your approach you end up with less instances and you can even share the Cache, which is great, but you have to guarantee that there will not be schema collision.

Do you think it worths trying to create a package for wrapping your approach or would it be more complex to do it through a package other than writing the code itself in other apps?

One though is that your examples show this approach working fine with the hook useQuery, how would it be using the Query component, for example?

--

--

Rafael Nunes
Rafael Nunes

Written by Rafael Nunes

Software Engineer @ Airtasker | casual blog post writer & open sourcerer https://peaonunes.com

Responses (1)