Skip to content

Example of React Native Navigation with re-frame/re-natal

License

Notifications You must be signed in to change notification settings

vikeri/re-navigate

Repository files navigation

Update 2017-02-01: Got a VERY quick and dirty version for the new React Navigation library going. If you are looking for the old one for NavigationExperimental it is on the branch old-re-navigate

re-navigate

Example of React Navigation with re-frame/re-natal

This example uses React Native's new Navigation component React Navigation that eventually will replace the current React Native navigation solutions (or so they say).

The one thing that does not work is to read the state of the tabs in re-frame. If you do that the tab switching will flicker. So currently it is a hack that saves the state to the re-frame db but uses the Navigators own state management to actually update the state.

If someone wants to give the full re-frame solution a stab that can be found on commit 78c79aa.

Reading the state of the stack from re-frame works just fine.

Example code

It is based on the scaffold from re-natal, almost everything is found in re-navigate.ios.core

Run

Requirements:

  • node & npm/yarn
  • leiningen brew install leiningen
  • re-natal & react-native-cli npm install -g re-natal react-native-cli

cd into the directory.

yarn && lein prod-build && react-native run-ios

Notes

  • React (15.4.2)
  • React Native (0.40.0)

Contributors

Viktor Eriksson (vikeri)

Anthony Mittaz (sync)

Sam Liu (wind13)