
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
zustand-querystring
Advanced tools
A Zustand middleware that syncs the store with the querystring.
A Zustand middleware that syncs the store with the querystring.
Try on StackBlitz (You need to click "Open in New Tab")
Examples:
Quickstart:
import create from 'zustand';
import { querystring } from 'zustand-querystring';
interface Store {
count: number;
ticks: number;
someNestedState: {
nestedCount: number;
hello: string;
};
}
export const useStore = create<Store>()(
querystring(
(set, get) => ({
count: 0,
ticks: 0,
someNestedState: {
nestedCount: 0,
hello: 'Hello',
},
}),
{
// select controls what part of the state is synced with the query string
// pathname is the current route (e.g. /about or /)
select(pathname) {
return {
count: true,
// ticks: false, <- false by default
someNestedState: {
nestedCount: true,
hello: '/about' === pathname,
},
// OR select the whole nested state
// someNestedState: true
};
},
},
),
);
querystring options:
FAQs
A Zustand middleware that syncs the store with the querystring.
The npm package zustand-querystring receives a total of 947 weekly downloads. As such, zustand-querystring popularity was classified as not popular.
We found that zustand-querystring demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.