How to move from intro slider to “real app”










0















So as the title says I'm new to this world and decided to create a small app as a test. I wanted an intro slider and found this on GitHub. Separately I had made my app so I figured oh ok I can use this GitHub code and then just point it to my app when the state changes however, I'm not sure how do I do that.



Do I need to create another .js file where I enter the code and then have it call my current App.js? I know the "app" will be rendered when this if becomes true:



render() 
if (this.state.showRealApp)
return <App />;
else
return <AppIntroSlider slides=slides onDone=this._onDone/>;




But I am unsure what should I put instead of just <App />; I am looking at the docs but I'm not sure of what I'm looking for so it's a bit of a moot point. Any pointers please?










share|improve this question
























  • change showRealApp state to true in _onDone method

    – Rutvik Bhatt
    Nov 14 '18 at 3:59
















0















So as the title says I'm new to this world and decided to create a small app as a test. I wanted an intro slider and found this on GitHub. Separately I had made my app so I figured oh ok I can use this GitHub code and then just point it to my app when the state changes however, I'm not sure how do I do that.



Do I need to create another .js file where I enter the code and then have it call my current App.js? I know the "app" will be rendered when this if becomes true:



render() 
if (this.state.showRealApp)
return <App />;
else
return <AppIntroSlider slides=slides onDone=this._onDone/>;




But I am unsure what should I put instead of just <App />; I am looking at the docs but I'm not sure of what I'm looking for so it's a bit of a moot point. Any pointers please?










share|improve this question
























  • change showRealApp state to true in _onDone method

    – Rutvik Bhatt
    Nov 14 '18 at 3:59














0












0








0








So as the title says I'm new to this world and decided to create a small app as a test. I wanted an intro slider and found this on GitHub. Separately I had made my app so I figured oh ok I can use this GitHub code and then just point it to my app when the state changes however, I'm not sure how do I do that.



Do I need to create another .js file where I enter the code and then have it call my current App.js? I know the "app" will be rendered when this if becomes true:



render() 
if (this.state.showRealApp)
return <App />;
else
return <AppIntroSlider slides=slides onDone=this._onDone/>;




But I am unsure what should I put instead of just <App />; I am looking at the docs but I'm not sure of what I'm looking for so it's a bit of a moot point. Any pointers please?










share|improve this question
















So as the title says I'm new to this world and decided to create a small app as a test. I wanted an intro slider and found this on GitHub. Separately I had made my app so I figured oh ok I can use this GitHub code and then just point it to my app when the state changes however, I'm not sure how do I do that.



Do I need to create another .js file where I enter the code and then have it call my current App.js? I know the "app" will be rendered when this if becomes true:



render() 
if (this.state.showRealApp)
return <App />;
else
return <AppIntroSlider slides=slides onDone=this._onDone/>;




But I am unsure what should I put instead of just <App />; I am looking at the docs but I'm not sure of what I'm looking for so it's a bit of a moot point. Any pointers please?







react-native






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 7:57









Suresh Prajapati

1,3082923




1,3082923










asked Nov 13 '18 at 23:08







user6673915



















  • change showRealApp state to true in _onDone method

    – Rutvik Bhatt
    Nov 14 '18 at 3:59


















  • change showRealApp state to true in _onDone method

    – Rutvik Bhatt
    Nov 14 '18 at 3:59

















change showRealApp state to true in _onDone method

– Rutvik Bhatt
Nov 14 '18 at 3:59






change showRealApp state to true in _onDone method

– Rutvik Bhatt
Nov 14 '18 at 3:59













2 Answers
2






active

oldest

votes


















0














Your question wasn't very clear. so this is the method you'll have to follow in order to use external packages in your react-native app.



First download the package through NPM,



`npm install react-native-app-intro-slider`. 


and import it where you call this



`<AppIntroSlider slides=slides onDone=this._onDone/>` 


using import AppIntroSlider from 'react-native-app-intro-slider';






share|improve this answer






























    0














    Ok so looking at the repo for the slider they have simply given a skeleton of the sample. App basically means what you want to render.



    To answer your question yes you can create a separate .js file where you have something rendering and then import that component and replace App with whatever you call that component. Or to make it work and make sure your importing and everything works you can just replace App with a View with some styling to see that it works when the state changes.



    Make sure you import View or whatever component you decide to use.



    For example you can use



    render() 
    if (this.state.showRealApp)
    return <Text>Yay, it rendered properly</Text>;
    else
    return <AppIntroSlider slides=slides onDone=this._onDone/>;





    after importing Text from react-native






    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%2f53290854%2fhow-to-move-from-intro-slider-to-real-app%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown
























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Your question wasn't very clear. so this is the method you'll have to follow in order to use external packages in your react-native app.



      First download the package through NPM,



      `npm install react-native-app-intro-slider`. 


      and import it where you call this



      `<AppIntroSlider slides=slides onDone=this._onDone/>` 


      using import AppIntroSlider from 'react-native-app-intro-slider';






      share|improve this answer



























        0














        Your question wasn't very clear. so this is the method you'll have to follow in order to use external packages in your react-native app.



        First download the package through NPM,



        `npm install react-native-app-intro-slider`. 


        and import it where you call this



        `<AppIntroSlider slides=slides onDone=this._onDone/>` 


        using import AppIntroSlider from 'react-native-app-intro-slider';






        share|improve this answer

























          0












          0








          0







          Your question wasn't very clear. so this is the method you'll have to follow in order to use external packages in your react-native app.



          First download the package through NPM,



          `npm install react-native-app-intro-slider`. 


          and import it where you call this



          `<AppIntroSlider slides=slides onDone=this._onDone/>` 


          using import AppIntroSlider from 'react-native-app-intro-slider';






          share|improve this answer













          Your question wasn't very clear. so this is the method you'll have to follow in order to use external packages in your react-native app.



          First download the package through NPM,



          `npm install react-native-app-intro-slider`. 


          and import it where you call this



          `<AppIntroSlider slides=slides onDone=this._onDone/>` 


          using import AppIntroSlider from 'react-native-app-intro-slider';







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 '18 at 3:59









          Naveed SheriffdeenNaveed Sheriffdeen

          451415




          451415























              0














              Ok so looking at the repo for the slider they have simply given a skeleton of the sample. App basically means what you want to render.



              To answer your question yes you can create a separate .js file where you have something rendering and then import that component and replace App with whatever you call that component. Or to make it work and make sure your importing and everything works you can just replace App with a View with some styling to see that it works when the state changes.



              Make sure you import View or whatever component you decide to use.



              For example you can use



              render() 
              if (this.state.showRealApp)
              return <Text>Yay, it rendered properly</Text>;
              else
              return <AppIntroSlider slides=slides onDone=this._onDone/>;





              after importing Text from react-native






              share|improve this answer



























                0














                Ok so looking at the repo for the slider they have simply given a skeleton of the sample. App basically means what you want to render.



                To answer your question yes you can create a separate .js file where you have something rendering and then import that component and replace App with whatever you call that component. Or to make it work and make sure your importing and everything works you can just replace App with a View with some styling to see that it works when the state changes.



                Make sure you import View or whatever component you decide to use.



                For example you can use



                render() 
                if (this.state.showRealApp)
                return <Text>Yay, it rendered properly</Text>;
                else
                return <AppIntroSlider slides=slides onDone=this._onDone/>;





                after importing Text from react-native






                share|improve this answer

























                  0












                  0








                  0







                  Ok so looking at the repo for the slider they have simply given a skeleton of the sample. App basically means what you want to render.



                  To answer your question yes you can create a separate .js file where you have something rendering and then import that component and replace App with whatever you call that component. Or to make it work and make sure your importing and everything works you can just replace App with a View with some styling to see that it works when the state changes.



                  Make sure you import View or whatever component you decide to use.



                  For example you can use



                  render() 
                  if (this.state.showRealApp)
                  return <Text>Yay, it rendered properly</Text>;
                  else
                  return <AppIntroSlider slides=slides onDone=this._onDone/>;





                  after importing Text from react-native






                  share|improve this answer













                  Ok so looking at the repo for the slider they have simply given a skeleton of the sample. App basically means what you want to render.



                  To answer your question yes you can create a separate .js file where you have something rendering and then import that component and replace App with whatever you call that component. Or to make it work and make sure your importing and everything works you can just replace App with a View with some styling to see that it works when the state changes.



                  Make sure you import View or whatever component you decide to use.



                  For example you can use



                  render() 
                  if (this.state.showRealApp)
                  return <Text>Yay, it rendered properly</Text>;
                  else
                  return <AppIntroSlider slides=slides onDone=this._onDone/>;





                  after importing Text from react-native







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 14 '18 at 4:54









                  Nemi ShahNemi Shah

                  38138




                  38138



























                      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%2f53290854%2fhow-to-move-from-intro-slider-to-real-app%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

                      Use pre created SQLite database for Android project in kotlin

                      Darth Vader #20

                      Ondo