
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@swan-io/chicane
Advanced tools
A simple and safe router for React and TypeScript.
$ yarn add @swan-io/chicane
# --- or ---
$ npm install --save @swan-io/chicane
import { createRouter } from "@swan-io/chicane";
import { match } from "ts-pattern";
const Router = createRouter({
Home: "/",
Users: "/users",
User: "/users/:userId",
});
const App = () => {
const route = Router.useRoute(["Home", "Users", "User"]);
// route object is a discriminated union
return match(route)
.with({ name: "Home" }, () => <h1>Home</h1>)
.with({ name: "Users" }, () => <h1>Users</h1>)
.with({ name: "User" }, ({ params }) => <h1>User {params.userId}</h1>) // params are strongly typed
.otherwise(() => <h1>404</h1>);
};
$ git clone git@github.com:swan-io/chicane.git
$ cd chicane/example
$ yarn install && yarn dev
# --- or ---
$ npm install && npm run dev
history
and the Link
creation code.FAQs
A simple and safe router for React and TypeScript
The npm package @swan-io/chicane receives a total of 1,129 weekly downloads. As such, @swan-io/chicane popularity was classified as popular.
We found that @swan-io/chicane demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.