Comments (3)
Sounds like a good idea. cc @ericvicenti
from react-navigation.
I agree this makes sense for redux users. PR would be accepted!
from react-navigation.
Definitely agree. Manually creating the action (e.g. dispatch({ type: 'Navigate', routeName: 'Home' });
is error prone and brittle.
On a related note:
- the current redux action types are super general (
Navigate
,SetParams
,Reset
,Back
). They should probably be prefixed to avoid collisions. For reference,react-router-redux
prefixes their actions with@@router/
(see https://github.com/reactjs/react-router-redux/blob/master/src/reducer.js) - (I think) best practice for redux is to have one place where you export your action types and then use them as constants instead of by string. It seems like this repo is only referencing them by string (e.g. https://github.com/react-community/react-navigation/blob/0c9903556242f7d9b59df88180d395774b707701/src/routers/StackRouter.js#L202).
Thoughts? It would be a breaking change for people manually using string types in their codebase but I think this is something you'd want to nip in the bud.
from react-navigation.
Related Issues (20)
- Height of header with active search input seems to be ignored during back navigation transition on iOS
- 7.0.0-alpha `static` router conditional not working on iOS HOT 6
- Issue unit testing a navigation container (createInteractionHandle is not a function) HOT 3
- Elements with `position: absolute` disappear during screen transition HOT 3
- Crash due to useNativeDriver true for tab animations with android 12 devices HOT 2
- Cannot read property 'name' of undefined in "MaterialTopTabView" HOT 4
- Dropdown and popover components opening at incorrect position in iOS when using default header in React Navigation 6 stack HOT 2
- getState typescript error after version 6.1.10 HOT 1
- Header height not getting calculated in pageY value for components in new architecture HOT 3
- Incorrect pageY value when only using default header of react navigation stack in new architecture HOT 3
- v7 Navigating back randomly causes NAVIGATE action to be dispatched instead of GO_BACK HOT 2
- Possible EventEmitter memory leak detected HOT 1
- Pressable interaction issue with StackNavigator on iPhone Xs + new architecture HOT 8
- 7.0.0-alpha.15 @react-navigation/material-top-tabs - tabBarIcons are not showing. HOT 4
- Adjust the margin of the bottom menu bar HOT 3
- DRAWER ENCERRA O APLICATIVO HOT 10
- Sometimes duplicate tab bar labels appear in bottom tabs HOT 1
- unmountOnBlur shows white screen randomly when switchint tabs HOT 1
- useHeaderHeight changes several times when orientation changes HOT 3
- Navigate into page, increase RAM, navigate back and RAM stays high
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.