Skip to content

Removed react-native-router-flux and added custom navigation logic - #101

Closed
hmhealey wants to merge 19 commits into
masterfrom
navigation2
Closed

Removed react-native-router-flux and added custom navigation logic#101
hmhealey wants to merge 19 commits into
masterfrom
navigation2

Conversation

@hmhealey

@hmhealey hmhealey commented Dec 6, 2016

Copy link
Copy Markdown
Member

The basic way this works now is that we have the navigation section of the redux store that's controlled with standard actions and a reducer. Right now, it only uses simple actions that push, pop, and reset the stack, but it has support for anything that NavigationExperimental can handle.

Since this is based off the store changes, here are the changes specific to this PR: b1d9c63...e4f7a63

Overview of directory changes:

  • src/actions/navigation - For simple navigation actions that can be reused. It might make sense to move these into view actions in the future since while they seem reusable now, they'll become more view specific once we tighten up the app navigation fow
  • src/navigation
    • .../router.js - This is what uses the navigation state to render the whole app using NavigationExperimental. It also renders things like the navigation bar and transitions.
    • .../routes.js - These are plain objects representing each route in the app. It can also store properties of that route such as whether it has a title, back button, how it transitions, etc
      -src/scenes - This used to be named src/routes, but I think it was a good idea to separate the definition of a route (which usually involves how you get there) from a scene (which is the actual contents of the route) and to make it more clear that this navigation isn't using a router with a path like we had before.
    • .../index.js - This provides a function mapping route keys to the scene that they use. This could've just been a field in src/navigation/routes.js, but I wanted to keep them separate to simplify dependencies because the actions and reducer for navigation both import routes.js

@hmhealey hmhealey added the 2: Dev Review Requires review by a core commiter label Dec 6, 2016
@enahum

enahum commented Dec 6, 2016

Copy link
Copy Markdown
Contributor

OK lets merge my PR first so this one get a lot smaller (I think) and after that I'll review

@hmhealey hmhealey closed this Dec 6, 2016
@hmhealey hmhealey removed the 2: Dev Review Requires review by a core commiter label Feb 2, 2017
@lindy65 lindy65 added the Tests/Not Needed Does not require tests label Apr 14, 2019
yasserfaraazkhan added a commit that referenced this pull request Aug 17, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
yasserfaraazkhan added a commit that referenced this pull request Aug 17, 2026
Staging will run #101 at this tip; keep mobile action pin in lockstep.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests/Not Needed Does not require tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants