Giter Site home page Giter Site logo

Comments (5)

shoichi1023 avatar shoichi1023 commented on June 22, 2024
/*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.

watanabeyu avatar watanabeyu commented on June 22, 2024

@shoichi1023

もしよければソースコード全体を https://snack.expo.io に差し支えがない範囲で載せてもらえますか?
自分が使っている範囲ではonSuccessでNavigationActionsができるので。
使っているpackageやreact-nativeのバージョンなどの情報もあわせて欲しいです。

from react-native-simple-twitter.

shoichi1023 avatar shoichi1023 commented on June 22, 2024

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.

watanabeyu avatar watanabeyu commented on June 22, 2024

@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,
})

output

申し訳ないですがこちらで対応できるのはここまでですね…

よろしくお願いいたします。

from react-native-simple-twitter.

shoichi1023 avatar shoichi1023 commented on June 22, 2024

恐れ入ります、ありがとうございます。
確認してみます。

from react-native-simple-twitter.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.