Comments (5)
/*not working*/
onSuccess = (user) => {
this.props.setUser(user);
const resetAction = NavigationActions.reset({
index: 0,
key: null,
actions: [NavigationActions.navigate({ routeName: 'TabNavRoot' })],
});
this.props.navigation.dispatch(resetAction);
}
/*working*/
onPress = ()=>{
this.props.setUser({name:'aaaaaa'});
const resetAction = NavigationActions.reset({
index: 0,
key: null,
actions: [NavigationActions.navigate({ routeName: 'TabNavRoot' })],
});
this.props.navigation.dispatch(resetAction);
}
from react-native-simple-twitter.
もしよければソースコード全体を https://snack.expo.io に差し支えがない範囲で載せてもらえますか?
自分が使っている範囲ではonSuccessでNavigationActionsができるので。
使っているpackageやreact-nativeのバージョンなどの情報もあわせて欲しいです。
from react-native-simple-twitter.
https://snack.expo.io/@shoichi/login
{
"main": "node_modules/expo/AppEntry.js",
"private": true,
"dependencies": {
"expo": "^26.0.0",
"native-base": "^2.4.5",
"react": "16.3.0-alpha.1",
"react-native": "^0.54.2",
"react-native-elements": "^0.19.1",
"react-native-keyboard-aware-scroll-view": "^0.5.0",
"react-native-keyboard-aware-view": "0.0.14",
"react-native-myparallax-scroll-view": "^0.19.0",
"react-native-parallax-scroll-view": "^0.21.0",
"react-native-parallax-view": "^2.0.6",
"react-native-scrollable-tab-view": "^0.8.0",
"react-native-scrollable-tab-view-universal": "^0.1.1",
"react-native-simple-twitter": "^2.0.2",
"react-native-tab-view": "0.0.78",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^1.5.11",
"react-navigation-redux-helpers": "^1.0.5",
"react-redux": "^5.0.7",
"redux": "^4.0.0"
}
}
よろしくお願いいたします。
from react-native-simple-twitter.
@shoichi1023
多分原因はreact-native-simple-twitter
ではなく、
箇所は特定しておりませんが@shoichi1023 さんのコード内にあるのではないかと思います。
こちらでpageNation.js内のtabNav
を下記に変更し、
onSuccess時にNavigationActions.reset()
を実行したところ遷移されました。
const tabNav = TabNavigator({
Home: {
screen: () => (
<View><Text>ok</Text></View>
)
},
},{
tabBarOptions: {
inactiveTintColor: '#bbb',
activeTintColor: '#000',
showLabel: false,
},
initialRouteName: 'Home',
tabBarComponent: TabBarBottom,
tabBarPosition: 'bottom',
swipeEnabled: true,
lazy: false,
})
申し訳ないですがこちらで対応できるのはここまでですね…
よろしくお願いいたします。
from react-native-simple-twitter.
恐れ入ります、ありがとうございます。
確認してみます。
from react-native-simple-twitter.
Related Issues (15)
- callback url HOT 3
- Error 32 Could not authenticate you on account/verify_credentials.json HOT 3
- An example of logging user in HOT 1
- Not Redirect back to app HOT 1
- android token issue HOT 13
- URL callback HOT 1
- Specify which twitter callback url HOT 1
- Make this generic? HOT 1
- Tried to register two views with the same name RNCWebView HOT 1
- consumer secret
- Error while /oauth/request_token
- Expo のバージョン 45 で TextInput に入力できない問題
- "Invalid hook call" error HOT 4
- onGetAccessToken never called HOT 1
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-native-simple-twitter.