Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Add Support for useReactiveVar hook #8

Open
nuwanwre opened this issue Aug 28, 2020 · 2 comments
Open

Add Support for useReactiveVar hook #8

nuwanwre opened this issue Aug 28, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@nuwanwre
Copy link
Owner

Add support for useReactiveVar and remove useQuery hook for component level updates. This update needs to done with apollo-client 3.2.0.

Reference: PR

@nuwanwre nuwanwre added the enhancement New feature or request label Aug 28, 2020
@nuwanwre
Copy link
Owner Author

apollo-client 3.2.0 released. Needs integration for useReactiveVar hook.

@nuwanwre
Copy link
Owner Author

nuwanwre commented Nov 2, 2020

Apollo Client 3 for React Native uses apollo-cache-persist as it's persistence layer. However, current implementation of ReactVars handles storage outside of the cache, hence persisting ReactiveVars does not function as expected.

A recent issue points out ReactiveVars are not being persisted. However, this PR seems to address the issue pointed out by the mentioned issue, and suggests a workaround for persisting ReactiveVars. Until official support for persisting ReactiveVars is merged, local fields as mentioned here, is a viable option.

Keeping this issue open until there is a stable solution.

Reference implementation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant