admin管理员组

文章数量:1023782

I got this yellow warning message when trying to navigate the through pages.

navigation.navigate is not a function

My code

export default (navigation) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

This solution not really helping - navigation.navigate is not a function.

Reference:

I got this yellow warning message when trying to navigate the through pages.

navigation.navigate is not a function

My code

export default (navigation) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

This solution not really helping - navigation.navigate is not a function.

Reference: https://github./datomnurdin/auth-reactnative

Share Improve this question edited Dec 24, 2018 at 23:54 halfer 20.4k19 gold badges109 silver badges202 bronze badges asked Dec 24, 2018 at 10:24 NurdinNurdin 23.9k47 gold badges140 silver badges315 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Have you tried to add curly braces around the navigation

export default ({navigation}) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

I got this yellow warning message when trying to navigate the through pages.

navigation.navigate is not a function

My code

export default (navigation) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

This solution not really helping - navigation.navigate is not a function.

Reference:

I got this yellow warning message when trying to navigate the through pages.

navigation.navigate is not a function

My code

export default (navigation) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

This solution not really helping - navigation.navigate is not a function.

Reference: https://github./datomnurdin/auth-reactnative

Share Improve this question edited Dec 24, 2018 at 23:54 halfer 20.4k19 gold badges109 silver badges202 bronze badges asked Dec 24, 2018 at 10:24 NurdinNurdin 23.9k47 gold badges140 silver badges315 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Have you tried to add curly braces around the navigation

export default ({navigation}) => (
  <View>
    <Card>
      <Button
        onPress={() => {
          onSignIn().then(() => navigation.navigate("SignedIn")); //yellow warning message
        }}
      />
    </Card>
  </View>
);

本文标签: javascriptReact nativenavigationnavigate is not a functionStack Overflow