![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A small efficient framework-agnostic client-side routing library, written in TypeScript.
A small efficient framework-agnostic client-side routing library, written in TypeScript.
It is currently under development and API might slightly change.
Those features may be the ones you are looking for.
Esroute is written with no external dependencies, so it does not require you to use a library.
A configuration can look as simple as this:
import { Router } from "esroute";
const router = new Router({
"/": ({ go }) => go("/foo"),
foo: () => load("routes/foo.html"),
nested: {
"/": () => load("routes/nested/index.html"),
"*": ({ params: [param] }) => {
console.log(param);
return load("routes/nested/dynamic.html");
},
},
});
router.onResolve(({ value }) => render(value));
You can of course compose the configuration as you like, which allows you to easily modularize you route configuration:
const router = new Router({
"/": ({ go }) => go("/mod1"),
mod1: mod1Routes,
composed: {
...mod2Routes,
...mod3Routes,
},
});
A Resolve<T> = (navOpts: NavOpts) => T | NavOpts | Promise<T | NavOpts>;
is a function type that derives a value from the navigation options. This value is of a certain type and the router can be restricted to allow only certain value types.
const router = new Router<string>({
"/": () => "some nice value",
async: loadString(),
weird: () => 42, // TS Error
});
esroute comes with no dependencies and is quite small. The route spec object that is passed into the router instance is not processed and is very concise.
The route resolution is done by traversing the route spec tree and this algorithm is based on simple string comparisons (no regex matching).
Route guards provide a way to check whether the current route should be routed to. If the given route resolution should not be applied, you can redirect to another route.
A guard can be applied to any route and it is called for the route it was applied to and it's sub-routes.
const router = new Router({
members: {
...protectedRoutes,
"?": ({ go }) => isLoggedIn || go(["login"]),
},
login: () => renderLogin(),
});
FAQs
A small efficient framework-agnostic client-side routing library, written in TypeScript.
The npm package esroute receives a total of 2 weekly downloads. As such, esroute popularity was classified as not popular.
We found that esroute 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.