Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pmndrs/zustand
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.5.0
Choose a base ref
...
head repository: pmndrs/zustand
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.5.1
Choose a head ref
  • 10 commits
  • 13 files changed
  • 7 contributors

Commits on Jan 20, 2024

  1. docs(persist): add info about createJSONStorage helpful function (#…

    …2299)
    
    * first pass at docs
    
    * add jump-to-section
    charkour committed Jan 20, 2024
    1 Configuration menu
    Copy the full SHA
    27bffb1 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. Update docs related to SSR/Hydration and SSR Apps (#2298)

    * Update deprecation comments
    
    * Update testing guide
    
    * WIP
    
    * Minor fixes
    
    * WIP
    
    * Update docs/guides/ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * WIP
    
    * Minor changes
    
    * Minor changes
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hygration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Minor fixes
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Blazej Sewera <[email protected]>
    
    * Update docs/guides/nextjs.md
    
    Co-authored-by: Charles Kornoelje <[email protected]>
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Charles Kornoelje <[email protected]>
    
    * Update ssr-and-hydration.md
    
    * Update docs/guides/ssr-and-hydration.md
    
    Co-authored-by: Charles Kornoelje <[email protected]>
    
    ---------
    
    Co-authored-by: Blazej Sewera <[email protected]>
    Co-authored-by: Charles Kornoelje <[email protected]>
    3 people committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    f64a111 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Configuration menu
    Copy the full SHA
    02ddd70 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. Update nextjs.md (#2324)

    dbritto-dev committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    b466a75 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. docs(middleware): modify both set and setState (#2306)

    * docs(middleware): modify `set` and `setState`
    
    * update middleware docs
    charkour committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    eb8443f View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Update nextjs guide (#2328)

    * Update nextjs guide
    
    * Minor changes
    
    * Minor changes
    
    * Minor changes
    
    * Minor changes
    
    * Minor changes
    
    * Minor changes
    dbritto-dev committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    8c1a1f0 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. refactor: Relax types for persist middleware (#2332)

    Right now, we're requiring new `StateStorage` implementations to forcefully return `void` from inside `setItem` and `removeItem`.
    
    When using a library that returns the set value for `setItem` or `removeItem`, therefore returning  a `string`, it causes Typescript to fail, requiring some weird workarounds.
    
    For example, when using `localforage` (https://github.com/localForage/localForage) one needs to do what we describe below. Notice the `void` keyword.
    
    ```typescript
    const storage: StateStorage = {
       ...localForage,
       setItem: void localForage.setItem.bind(localForage)
    }
    ```
    
    Another, longer, alternative is
    
    ```typescript
    const storage: StateStorage = {
       ...localForage,
       // Curly braces are required because we need to "return `void`"
       setItem: (name, value) => {
           localStorage.setItem(name, value)
      }
    }
    ```
    
    By changing the type implementation to ignore types - using unknown - we can simply use `localforage` - and similar libraries - as if we were using `window.localStorage`
    rafaeelaudibert committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    7d2525e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a85865b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e174cc8 View commit details
    Browse the repository at this point in the history
  4. 4.5.1

    dai-shi committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    6109bc3 View commit details
    Browse the repository at this point in the history
Loading