facebook / facebook/relay

Preload strategies on React Native

Open
#4,860 2 comments 7 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

## Prefetching with preload feature

### Context

At Artsy, we're trying to increase the prefetching in our App. We implemented a custom behavior based on `fetchQuery,` but it's not as solid as Relay's preloaded queries.

### Problem

We want to be able to use preload more extensively, especially before navigating somewhere in the app. The combo of grabbing a query reference via `loadQuery` works but requires us to store unserialized data(query ref) somewhere so the next screen can use `usePreloadedQuery`. This has been challenging because react-navigation, for instance, doesn't recommend passing unserialized data from one screen to another, and this is also related to a bigger problem within deep links where you don't have the opportunity to preload any stuff(theoretically) before landing on a screen.

### Summary

We're looking for some ways that enable us to use preload more extensively in React Native apps, especially given the limitation of passing unserializable data from one place to another and deep links functionality, any ideas would be welcome 🙇

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.