
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
solid-named-router
Advanced tools
A third party router library for solidjs. Includes named routes inspired by vuejs.
This router relies on the route-parser package.
Note: This library is not complete. Please contribute and submit PRs to improve this library đź’–
Install it:
npm i solid-named-router
Wrap your root component with the Router component:
import { render } from "solid-js/web";
import { createRouter } from "solid-named-router";
import App from "./App";
const Router = createRouter({
routes: [
{
name: 'Home',
path: '/',
element: () => <div>Home</div>
},
{
name: 'Users',
path: '/users/:userId',
element: () => <div>Users</div>
},
]
});
render(
() => (
<Router>
<App />
</Router>
),
document.getElementById("app")
);
Now add the RouterView component to display the current route.
import {RouterView, Link} from "solid-named-router";
const App = () => {
return (
<>
<RouterView/>
</>
);
};
<Link to={{name: 'Users', params: {userId: 1234}, query: {hideInfo: "1"}}}>User</Link>
<Link to='app/users/1234'>User</Link>
navigate({name: 'Users', params: {userId: 1234}, query: {hideInfo: "1"}})
navigate('app/users/1234')
const namedRoute = useNamedRoute(); // -> {name, params, pathname, query};
<div>
<div>name: {namedRoute.name}</div>
<div>params: {namedRoute.params.userId}</div>
<div>params: {namedRoute.pathname}</div>
</div>
const params = useParams(); // -> {userId};
<div>
<div>name: {params.userId}</div>
</div>
const Router = createRouter({
routes: [
{
name: 'Users',
path: '/users/:userId',
elements: {
drawer: () => <div>Drawer Here</div>,
content: () => <div>Content Here</div>
},
element: () => (
<div>
<Outlet name="drawer">
<Outlet name="content">
</div>
),
},
]
});
FAQs
A third party router library for solidjs.
We found that solid-named-router demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.