Skip to content

Routes are initially mounted with undefined path parameters #124

@angryziber

Description

@angryziber

Describe the bug
Path parameters are not provided to mounted components right away; the actually values are only available after the first render, needing another update to render properly.

To Reproduce
<Route path="/something/:hello" component={MyComponent}/>

When opening /something/world in the browser, MyComponent will first get undefined as value of hello prop, and only then will get the actual value.

Expected behavior
The value of hello prop should be right on the first render to avoid re-rendering again.

The problem may be due to the Route component running all component functions with await. In Svelte5 all components are functions.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions