
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Generates a Route Manifest for you. It allows you to refer to a page by name instead of location
Delir
generates a Route Manifest for you. It allows you to refer to a
page by name instead of location:
npm install -g delir
delir ./your-output-file
delir ./your-output-file --workspace ./your-next-app-folder
// Assume you have a page at app/pages/products/[productId].tsx
export default function ProductsPage() { ...
// You can then use Routes...
import { Link } from "next"
import { Routes } from "../path-to-manifest-file"
// ...to refer to it by name...
<Link href={Routes.ProductsPage({ productId: 123 })} />
// ...instead of looking up the location!
<Link href={`/products/${123}`} />
The Route Manifest has some advantages:
Query parameters can be specified together with route parameters.
// instead of ...
<Link href={`/products/${pid}?offerCode=capybara`} />
// ... you can do:
<Link href={Routes.Product({ pid, offerCode: "capybara" })} />
Simple cli which is an extract of the routes manifest feature from blitz. Thanks for the super framework ❤️
// Assume you have a page at app/pages/products/[productId].tsx
export default function ProductsPage() { ... }
import { useRouter } from 'next/router';
// You can then use Routes...
import { Routes } from "../path-to-manifest-file";
// in your server api
Routes.ProductsPage.isActive(someobject.path)
// generically without next router
Routes.ProductsPage.isActive(window.location.pathname)
// with asPath from useRouter
const { asPath } = useRouter();
Routes.ProductsPage.isActive(asPath);
FAQs
Generates a Route Manifest for you. It allows you to refer to a page by name instead of location
We found that delir 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.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.