React Native Navigation - Navigating without the navigation prop is not working Announcing the...

How do I find out the mythology and history of my Fortress?

What order were files/directories outputted in dir?

Why is Nikon 1.4g better when Nikon 1.8g is sharper?

How does Python know the values already stored in its memory?

Is it fair for a professor to grade us on the possession of past papers?

How to react to hostile behavior from a senior developer?

Converted a Scalar function to a TVF function for parallel execution-Still running in Serial mode

Generate an RGB colour grid

Did Deadpool rescue all of the X-Force?

What do you call the main part of a joke?

What is "gratricide"?

Effects on objects due to a brief relocation of massive amounts of mass

When a candle burns, why does the top of wick glow if bottom of flame is hottest?

Hangman Game with C++

Do I really need to have a message in a novel to appeal to readers?

Why do we bend a book to keep it straight?

Dating a Former Employee

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

What is the difference between globalisation and imperialism?

What initially awakened the Balrog?

Is there hard evidence that the grant peer review system performs significantly better than random?

How do living politicians protect their readily obtainable signatures from misuse?

How to install press fit bottom bracket into new frame

Putting class ranking in CV, but against dept guidelines



React Native Navigation - Navigating without the navigation prop is not working



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How to hide 'Back' button on navigation bar on iPhone?How to get the browser to navigate to URL in JavaScriptCustom navigation with Navigator component in React-NativeResetting the navigation stack for the home screen (React Navigation and React Native)React-Native NavigationActions vs The Navigation PropHow to incorporate NavigationExperimental.Navigator with react-native-circular-action menu?pass props through navigation react nativeReact Native React NavigationReact-Native react-navigationNavigation not working in react native app





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















My App.js



import React from "react";
import { StyleSheet, Text, View, StatusBar, Button } from "react-native";
import { createStackNavigator, createAppContainer } from "react-navigation";
import NavigationService from "./NavigationService";

import Register from "./components/auth/Register";
import Login from "./components/auth/Login";

import SocketIOClient from "socket.io-client";

const AppNavigator = createStackNavigator({
Login: { screen: Login },
Register: { screen: Register }
});

const AppContainer = createAppContainer(AppNavigator);

export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Register />
<StatusBar backgroundColor="#4d82cb" barStyle="light-content" />
<AppContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#82b1ff",
alignItems: "center",
justifyContent: "center"
}
});


I took my NavigationService code from its website, and



in Register.js, I imported the NavigationService.



import NavigationService from "../../NavigationService";
<Button
style={styles.login}
onPress={() => {
NavigationService.navigate("Login");
}}
>


It throws Invariant Violation: The title prop of a Button must be a string error. It says undefined.










share|improve this question













migrated from superuser.com 8 hours ago


This question came from our site for computer enthusiasts and power users.

























    0















    My App.js



    import React from "react";
    import { StyleSheet, Text, View, StatusBar, Button } from "react-native";
    import { createStackNavigator, createAppContainer } from "react-navigation";
    import NavigationService from "./NavigationService";

    import Register from "./components/auth/Register";
    import Login from "./components/auth/Login";

    import SocketIOClient from "socket.io-client";

    const AppNavigator = createStackNavigator({
    Login: { screen: Login },
    Register: { screen: Register }
    });

    const AppContainer = createAppContainer(AppNavigator);

    export default class App extends React.Component {
    render() {
    return (
    <View style={styles.container}>
    <Register />
    <StatusBar backgroundColor="#4d82cb" barStyle="light-content" />
    <AppContainer
    ref={navigatorRef => {
    NavigationService.setTopLevelNavigator(navigatorRef);
    }}
    />
    </View>
    );
    }
    }

    const styles = StyleSheet.create({
    container: {
    flex: 1,
    backgroundColor: "#82b1ff",
    alignItems: "center",
    justifyContent: "center"
    }
    });


    I took my NavigationService code from its website, and



    in Register.js, I imported the NavigationService.



    import NavigationService from "../../NavigationService";
    <Button
    style={styles.login}
    onPress={() => {
    NavigationService.navigate("Login");
    }}
    >


    It throws Invariant Violation: The title prop of a Button must be a string error. It says undefined.










    share|improve this question













    migrated from superuser.com 8 hours ago


    This question came from our site for computer enthusiasts and power users.





















      0












      0








      0








      My App.js



      import React from "react";
      import { StyleSheet, Text, View, StatusBar, Button } from "react-native";
      import { createStackNavigator, createAppContainer } from "react-navigation";
      import NavigationService from "./NavigationService";

      import Register from "./components/auth/Register";
      import Login from "./components/auth/Login";

      import SocketIOClient from "socket.io-client";

      const AppNavigator = createStackNavigator({
      Login: { screen: Login },
      Register: { screen: Register }
      });

      const AppContainer = createAppContainer(AppNavigator);

      export default class App extends React.Component {
      render() {
      return (
      <View style={styles.container}>
      <Register />
      <StatusBar backgroundColor="#4d82cb" barStyle="light-content" />
      <AppContainer
      ref={navigatorRef => {
      NavigationService.setTopLevelNavigator(navigatorRef);
      }}
      />
      </View>
      );
      }
      }

      const styles = StyleSheet.create({
      container: {
      flex: 1,
      backgroundColor: "#82b1ff",
      alignItems: "center",
      justifyContent: "center"
      }
      });


      I took my NavigationService code from its website, and



      in Register.js, I imported the NavigationService.



      import NavigationService from "../../NavigationService";
      <Button
      style={styles.login}
      onPress={() => {
      NavigationService.navigate("Login");
      }}
      >


      It throws Invariant Violation: The title prop of a Button must be a string error. It says undefined.










      share|improve this question














      My App.js



      import React from "react";
      import { StyleSheet, Text, View, StatusBar, Button } from "react-native";
      import { createStackNavigator, createAppContainer } from "react-navigation";
      import NavigationService from "./NavigationService";

      import Register from "./components/auth/Register";
      import Login from "./components/auth/Login";

      import SocketIOClient from "socket.io-client";

      const AppNavigator = createStackNavigator({
      Login: { screen: Login },
      Register: { screen: Register }
      });

      const AppContainer = createAppContainer(AppNavigator);

      export default class App extends React.Component {
      render() {
      return (
      <View style={styles.container}>
      <Register />
      <StatusBar backgroundColor="#4d82cb" barStyle="light-content" />
      <AppContainer
      ref={navigatorRef => {
      NavigationService.setTopLevelNavigator(navigatorRef);
      }}
      />
      </View>
      );
      }
      }

      const styles = StyleSheet.create({
      container: {
      flex: 1,
      backgroundColor: "#82b1ff",
      alignItems: "center",
      justifyContent: "center"
      }
      });


      I took my NavigationService code from its website, and



      in Register.js, I imported the NavigationService.



      import NavigationService from "../../NavigationService";
      <Button
      style={styles.login}
      onPress={() => {
      NavigationService.navigate("Login");
      }}
      >


      It throws Invariant Violation: The title prop of a Button must be a string error. It says undefined.







      routing navigation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 10 hours ago









      fsuaterdoganfsuaterdogan

      164




      164




      migrated from superuser.com 8 hours ago


      This question came from our site for computer enthusiasts and power users.









      migrated from superuser.com 8 hours ago


      This question came from our site for computer enthusiasts and power users.


























          1 Answer
          1






          active

          oldest

          votes


















          0














          Button needs a title.
          Form:



          <Button title="Text you want" />


          Example:



          <Button title="Login" />





          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55753173%2freact-native-navigation-navigating-without-the-navigation-prop-is-not-working%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Button needs a title.
            Form:



            <Button title="Text you want" />


            Example:



            <Button title="Login" />





            share|improve this answer




























              0














              Button needs a title.
              Form:



              <Button title="Text you want" />


              Example:



              <Button title="Login" />





              share|improve this answer


























                0












                0








                0







                Button needs a title.
                Form:



                <Button title="Text you want" />


                Example:



                <Button title="Login" />





                share|improve this answer













                Button needs a title.
                Form:



                <Button title="Text you want" />


                Example:



                <Button title="Login" />






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 8 hours ago







                David







































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55753173%2freact-native-navigation-navigating-without-the-navigation-prop-is-not-working%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                    Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...