solidjs / solidjs/solid-router

[FEATURE REQUEST] Add support for middlewares

Open
#75 11 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.3k
Forks
180
Avg merge
1d 13h
Merged PRs (30d)
19

Description

Hi Ryan,

What do you think about adding support for Navigation Guards in order to allow middleware implementation like authorization.

Vue did it this way:
https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards

While I like all the possible hooks they deliver, having a beforeEnter on the route definition level could be already a life saver, and open tens of door for middlewares. The meta property with router events like willTransition and didTransition will be also a great replacement.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point; start by reviewing the router's existing navigation lifecycle and the linked Vue navigation-guards reference. Done requires an agreed scope and validation for middleware or navigation-guard support, including whether route-level beforeEnter, meta, or transition hooks are included.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.