Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Use relay pre-caching to warm up the root view controllers #839

Open
orta opened this issue Nov 19, 2017 · 4 comments
Open

Use relay pre-caching to warm up the root view controllers #839

orta opened this issue Nov 19, 2017 · 4 comments

Comments

@orta
Copy link
Contributor

orta commented Nov 19, 2017

Aim: We use background fetch to keep an up-to-date cache of the initial home and user creds.

How: On the fetch, we download a query then store the details to the FS, then we can use the new prefetching in Relay Modern to fill the cache before the JS runtime is up and running.

Tricky: There's no docs we can find so far

@orta
Copy link
Contributor Author

orta commented Nov 19, 2017

There's a lot of useful discussion in facebook/relay#676 (comment) and this diagram of what it looks like.

This comment: facebook/relay#676 (comment) shows that maybe we can execute the query through relay, persist the store and then reload with on launch?

@alloy
Copy link
Contributor

alloy commented Nov 19, 2017

The context of that thread is rehydration and the linked to comment also very much seems to be about serializing/deserializing a full Relay store, i.e. one that has data loaded on the server-side and then continues to use that on the client-side.

@orta
Copy link
Contributor Author

orta commented Nov 19, 2017

@orta
Copy link
Contributor Author

orta commented Dec 22, 2017

Apollo are getting into this game too: https://dev-blog.apollodata.com/the-future-of-state-management-dd410864cae2

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

No branches or pull requests

2 participants