https://github.com/oieduardorabelo/scu-react-navigation-stack
Avoiding re-rendering of hidden screen in react-navigation
https://github.com/oieduardorabelo/scu-react-navigation-stack
Last synced: about 1 month ago
JSON representation
Avoiding re-rendering of hidden screen in react-navigation
- Host: GitHub
- URL: https://github.com/oieduardorabelo/scu-react-navigation-stack
- Owner: oieduardorabelo
- Created: 2018-04-06T23:23:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-06T23:30:08.000Z (about 7 years ago)
- Last Synced: 2025-02-08T12:12:25.103Z (3 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Avoiding re-rendering of hidden screen in react-navigation
In this repository you'll find 2 examples of how to avoid re-rendering a hidden screen while using [react-navigation](https://github.com/react-navigation/react-navigation);
* I'm using `react-navigation@^2.0.0-rc.1`, but they also works in `^1.5.11`
They are:
* [1-PerScreen](./1-PerScreen.js) - Kind of subscription-ish, where each screen have their own "instance"/state of the publisher
* [2-ScreenProps](./2-ScreenProps) - Where your main stack is the subscriber and propagate updates to all screens via `screenProps`You can check the [Twitter thread](https://twitter.com/sseraphini/status/981510349588516864) where it all started.