-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi Mo,
Currently, I'm working with the RedwoodApolloProvider and I'm finding
the use of the useApolloClient hook quite valuable for obtaining the
client. However, I've encountered a situation where I'm uncertain
about the best approach to handle it.
As far as I understand, Redwood doesn't offer a seamless method to
define the client outside of the React tree and then pass it to the
provider. This leads me to call atomsWithQuery from within the React
tree itself (to avoid calling hook for the client from outside the render function), as it requires the client to function properly. I'm
wondering if this pattern is supported or if you have any experience
with it. If so, I would greatly appreciate any insights or examples
you might have.
I've attempted a few methods, such as making a plain call (which
triggered infinite rerendering) and using useMemo (which didn't update
with new data), but I haven't found the ideal solution yet.
Thanks in advance for your assistance