question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

oncreate always fired

See original GitHub issue

Thanks for sharing svelte-routing. Been playing around with it today and noticed this…

<Route path="/dashboard"><Dashboard /></Route>

Dashboard will always fire it’s oncreate method even if the path isn’t active.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rob-balfrecommented, Nov 30, 2017

Looks good. Also FYI Rich is planning to allow for dynamic components hopefully very soon. https://github.com/sveltejs/svelte/issues/640

0reactions
EmilTholincommented, Feb 23, 2018

I added the option of rendering a route with a component in 0.1.0, with the help of dynamic components. Thank you for the suggestion @rob-balfre!

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - OnCreate method keeps getting called repeatedly
The problem probably is that the onResume event is immediatelly fired when you resume your MainActivity . That is because the MainActivity was...
Read more >
The activity lifecycle | Android Developers
In the onCreate() method, you perform basic application startup logic ... the activity has finished running, and is about to be terminated.
Read more >
onCreate() method of Application class not working ... - GitHub
The reason you are seeing onCreate being fired when the app is swiped away after add OneSignal is it adds a SyncService Service...
Read more >
The Soft Key Bar - Top 10 App Optimizations for Kindle Fire
A screen orientation change will always fire the onCreate() event, destroying and recreating the activity. If you do not take this into account, ......
Read more >
Android: When does application's onCreate() method get ...
The application object is already the first components started. It is also always the last component of the application, which is terminated. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found