Multiple components being loaded
See original GitHub issueResources: Before submitting an issue, please consult our docs.
Stencil version: (run npm list @stencil/core
from a terminal/cmd prompt and paste output below):
@stencil/core@0.11.0
I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
Given these routes:
<stencil-route url='/enviroment/new' component='create-enviroment-view' />
<stencil-route url='/enviroment/:id' component='enviroment-details-view' />
And a user visits the URL /enviroment/new
the correct view is rendered; however the enviroment-details-view
componentWillLoad will load method still gets called.
Expected behavior:
enviroment-details-view
should not be instantiated.
Steps to reproduce:
Related code:
I think the above code shows it all.
Other information:
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to load multiple components at same time in reactJs?
It should work, <Loader/> component will be shown untill all components are loaded. React lazy will not control the api calls that individual ......
Read more >Manually Lazy Load Modules And Components In Angular
Based on this configuration data, multiple modules and/or components need to be lazy-loaded and its routes dynamically added to the application.
Read more >How to load multiple components with the ... - Jazz.net
To load all the components in the RWS into a sandbox using the Load wiza... ... We could do it from the CLI...
Read more >Entry components - Angular
A bootstrapped component is an entry component that Angular loads into the DOM during the bootstrap process (application launch). Other entry components are ......
Read more >Angular: Reload/Refresh a Component or Entire Application ...
There is a lot of difference between reloading a single component and reloading the entire application. We shall see how both can be...
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 FreeTop 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
Top GitHub Comments
I think the issue might only occur on page refreshes if I go to the route using a
<stencil-route-link>
then there’s no issue.Hey man I made a new repo replicating the bug. https://gitlab.com/rodzzlessa24/stencil-router-bug
As you can see I just created a new component
new-profile
and added it to the routes.I added a
console.log
in thecomponentWillLoad
function of theapp-profile
component. If you visit/profile/new
you’ll see the log message fromapp-profile
also being logged.