
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
zustand-querystring
Advanced tools
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:
false for standalone mode where each state key becomes a separate query parameter.readable from zustand-querystring/format/readable for human-readable URLs.Only values that differ from the initial state are synced to the URL.
By default (syncNull: false, syncUndefined: false), null and undefined values are not synced to the URL. This means setting a value to null or undefined effectively "clears" it back to the initial state on page refresh.
If you want to preserve null or undefined values in the URL (so they persist across refreshes), set syncNull: true or syncUndefined: true in options.
{}) are recursively compared with initial state - only changed properties are syncedFAQs
Zustand middleware for URL query string sync.
The npm package zustand-querystring receives a total of 1,294 weekly downloads. As such, zustand-querystring popularity was classified as 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 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.