Unable to show "real" app, after pressing done.
See original GitHub issueHi, thanks for the amazing repo. My doubt may not exactly be an issue as such but I’m finding it hard to open a component once done is pressed. Any help will be highly appreciated. Code:
import StartApp from ‘./StartApp’
Trial 1:
render() {
return (
<AppIntroSlider slides={slides} onDone={() => <StartApp/>}/>
);
}
Trial 2:
_onDone = () => {
// User finished the introduction. Show "real" app
<StartApp/>
}
render() {
return (
<AppIntroSlider slides={slides} onDone={this._onDone}/>
);
}
None of the above two open the StartApp component which I imported.
Thanking in advance.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
If an app on your iPhone or iPad stops responding, closes ...
Force the app to close. Then open the app to see if it works as expected. Restart your device. Restart your iPhone or...
Read more >How to Fix Apps That Will Not Open on an iPhone
Open the App Store and tap "Updates" to see if there are newer versions of problematic apps. Tap the "Update All" if updates...
Read more >My iPhone Apps Won't Open! Here's The Real Fix.
Your iPhone apps won't open because your iPhone has a software problem. When an app crashes, it usually doesn't take the whole iPhone...
Read more >No apps connected. Sending "reload" to all React Native apps ...
It happens on Real device connection. When I work with IOS simulator, there is not problem. NOTE: My phone and macbook on SAME...
Read more >Fix problems downloading apps from the Play Store
More troubleshooting steps · Close & reopen the Play Store · Uninstall & reinstall Play Store updates · Restart your device · Clear...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @shibbyy,
You’re really close, but what you are getting wrong is how React works. You can’t return a component from a random function and expect it to be rendered, so currently nothing happens with the
StartApp
-component. What you’d probably want to do (if you’re don’t want to use your navigation library) is something like this:Notice how we use
state
to keep track of when the user has finished the introduction and how we use the render-function to return a component. I’ll close since this is not actionable, but please let me know if the approach above does not work for you!Hi @Jacse ,
Thank you so much for taking out some time to explain me this, works like a dream! Cheers!