Skip to content

SyncRouterState delay #135

@adriaanwm

Description

@adriaanwm

Since updating to the new Router component, I needed the router values in state, so I used SyncRouterState. Unfortunately this has lead to a delay between the route values being in state and the component that is being rendered. For example if I have a user page /users/:userId and get the userId with useMapped state in the User component, the value will be undefined first, adding extra if logic (which is especially annoying when using hooks since you can't have any hooks after the if statement)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions