Skip to content

v0.3.0

Choose a tag to compare

@nitedani nitedani released this 21 Nov 08:39
· 31 commits to main since this release

What's New

Human-Readable URL Format

Added an optional readable format for cleaner, more compact query strings:

import * as format from "zustand-querystring/format/readable";

const useStore = create()(
  querystring(
    (set) => ({ count: 0, name: "John" }),
    { format }
  )
);

Before: ?state=%7B%22count%22%3A5%2C%22name%22%3A%22John%22%7D
After: ?state=count:5..name=John

Bug Fixes

  • Fixed double-encoding issue where query parameters were encoded twice

Other Changes

  • Added comprehensive test suite with 50+ edge case tests
  • Updated documentation

Breaking Changes

  • Fixed double-encoding bug. URLs from v0.2.0 will not be compatible and will reset to default state.