Skip to content

Allow successive navigation without intermediate rendering #19

@sv2dev

Description

@sv2dev

There should be a router.render() method that allows navigation without intermediate rendering.
This can solve situations where you want to manipulate the history stack, but don't want to actually render this intermediate step.
Example:

await router.render(async () => {
  router.go(-3); // Same as history.go(-3)
  await router.go("/route1"); // history state pushed
  await router.go("/route2"); // Same here
});
// Render once all navigation steps are done

Alternatives:

router.go(-3, {skipRender: true});
await router.go("/route1", {skipRender: true});
await router.go("/route2", {skipRender: true});
await router.render();

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions