Comments (5)
I'm afraid that what you're asking is not possible. You do need to register the routes somewhere before navigating to them. This configuration will likely involve a StackNavigator or some other navigator which will handle things like going back to previous route, header appearance and more. This is different from from eg. react-router where you can just present any component (at least I think so).
from react-navigation.github.io.
I’m all set now. I was confused about several different things simultaneously. For one thing, I was a bit confused about the concept of a stack. It helps if I think of a stack as a section of the app, in the sense that websites are often said to have sections. React Navigation became very easy once I started using it exclusively and not trying to combine it with another library.
from react-navigation.github.io.
The answer may be to create a custom navigator. With a minimalistic custom navigator and a custom router, I then have a place to specify components for routes, and then I can use navigation.navigate(‘someRoute’).
Now that I see that the navigator renders the screen component, rather than the navigation elements, it make sense. As the docs state, “The navigators render application screens which are just React components.”.
from react-navigation.github.io.
Returning to this task today, I just find it a little hard to believe I need to implement a custom navigator to accomplish the very simple task I am trying to accomplish: add a button to a screen that, when tapped, transitions the user to another screen. Is there a simple way to do this in React Navigation? This does not appear to be documented.
from react-navigation.github.io.
@arnoldbird - what is a route to you aside from a binding from a name to a component, on a particular type of navigator? I think you need to define what a route is in your mind and describe a use case that is based in something that you will realistically do before we can discuss much further here
from react-navigation.github.io.
Related Issues (20)
- Stack navigator for each tab code example warning HOT 1
- Inconsistent TypeScript behavior with optional arguments in useNavigation
- Request for a sandbox environment for React Navigation
- Found screens with the same name nested inside one another HOT 2
- React Navigation logo has multiple control points
- In "Help" page witgh presentation set value to "transparentModal", I want push one new Page of name "Profile", How shuld i do?
- [email protected] -> Compiling JS failed .... invalid expression Buffer
- Improve/Update React-Navigation SVGs
- Remove 'make me a sandwich' references from documentation .mov
- Most of the react navigation examples on snack are not working HOT 2
- Use Deep Link, occur error
- React-native physical iOS devices not showing images
- NavigationContainer: initialRouteName: Issue with TypeScript
- Group Component Information HOT 2
- Nested navigation Snack Expample NOT FOUND
- Missing import on multiple-drawers
- Modal example issue - `RNSScreen` must be a function HOT 1
- Broken outbound URL HOT 1
- Remove mention of deprecated 'jest-native' in docs
- How to use the Drawer.CollapsedItem component with react-navigation/drawer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-navigation.github.io.