admin管理员组文章数量:1432640
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 badges1 Answer
Reset to default 6Have 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
版权声明:本文标题:javascript - React native - navigation.navigate is not a function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745600454a2665533.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论