Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react, types): relax react types #1589

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

lukesmurray
Copy link
Contributor

Summary

UseBoundStore strictly enforces the shape of the setState function but does not rely on the shape of the setState function internally.

Why we should be relaxed about setState

I want to define a middleware that makes the action in devtools required (to improve debugging store mutations in a large app). But if I make the third argument to setState required, the modified setState function is no longer compatible with the default setState function.

We get the following error message (edited for readability).

Types of property 'setState' are incompatible.

'<A extends string | { type: unknown; }>(
   partial: T | Partial<T> | ((state: T) => T | Partial<T>), 
   replace: boolean | undefined, 
   action: A
) => void' 

is not assignable to 

'(partial: unknown, replace?: boolean | undefined) => void'.

Internally the react extension only seems to rely on getState and subscribe, so I made that explicit in the types.

Check List

  • yarn run prettier for formatting code and docs

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 31, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 74fed9f:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration
@pavlobu/zustand demo Configuration

@dai-shi
Copy link
Member

dai-shi commented Jan 31, 2023

I don't think this is correct, or helps anyways. We do use setState on useBoundStore.
Have you made your vanilla store type correctly?
Are you already familiar with typing simpler middleware?

Closing. You can continue discussion here or open a new discussion.

@dai-shi dai-shi closed this Jan 31, 2023
@lukesmurray
Copy link
Contributor Author

Thank you for the prompt response and for creating and maintaining zustand!

  • The useStore code doesn't seem to access setState. Is there something I'm missing? If useBoundStore uses setState then this change is definitely wrong and the issue should be closed.

zustand/src/react.ts

Lines 33 to 47 in ab4118d

export function useStore<TState, StateSlice>(
api: WithReact<StoreApi<TState>>,
selector: (state: TState) => StateSlice = api.getState as any,
equalityFn?: (a: StateSlice, b: StateSlice) => boolean
) {
const slice = useSyncExternalStoreWithSelector(
api.subscribe,
api.getState,
api.getServerState || api.getState,
selector,
equalityFn
)
useDebugValue(slice)
return slice
}

  • I'm new to typing middleware but I'm pretty sure the middleware is correctly typed. Here is an example with the error. If we can relax setState using the changes I proposed the error would go away since the middleware would be allowed to overwrite setState to be a function that is incompatible with the vanilla setState call.

Here is an image of the error in case it doesn't show up for you but I assume it will.

CleanShot 2023-01-31 at 14 03 50

@dai-shi
Copy link
Member

dai-shi commented Feb 1, 2023

If useBoundStore uses setState then this change is definitely wrong and the issue should be closed.

Users can use it. See: https://tsplay.dev/wQYPvw
image

I'm new to typing middleware but I'm pretty sure the middleware is correctly typed. Here is an example with the error.

Hmm, interesting.
We may need to ask @devanshj for help.
Here's the same one as stackblitz: https://tsplay.dev/N5O1MW
(We may need to make the type bivariant??)

@devanshj
Copy link
Contributor

devanshj commented Feb 1, 2023

I'm pretty sure the middleware is correctly typed

Your WithDevtoolsReq<StoreApi<T>> is not a subtype of StoreApi<T>, so there's a very good chance the middleware typings are incorrect. Could you please share a minimal repro on TypeScript playground with your middleware typings. EDIT: oops my bad you have already linked a stackblitz haha, afk let me check that out in sometime.

Technically we could not ask for the setState as we don't use it in the implementation (the users would still be able to use setState) but in general it's not a good practice to fine-grain types to such an extent. In the worst case we could do that but that's not needed here.

@devanshj
Copy link
Contributor

devanshj commented Feb 1, 2023

To save me from manually diffing could you tell me in what way is your devtoolsReq different from devtools? Because the code compiles using devtools instead of devtoolsReq.

@lukesmurray
Copy link
Contributor Author

only difference is the action is required instead of optional.

devtools has
(...skipTwo, action?: A)

devtoolsReq has
(...skipTwo, action: A)

@devanshj
Copy link
Contributor

devanshj commented Feb 1, 2023

Yeah I too just got that diff. So assuming it's an intended change, we'd need fine-grained type to allow passing a store with such middleware.

In that case we can reopen this PR.

Copy link
Contributor

@devanshj devanshj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this let's do...

type ReadonlyStoreApi<T> =
  Pick<StoreApi<T>, "getState" | "subscribe">

And then remove the constraint on S in WithReact (it's an internal type so it's okay) and then instead of WithReact<StoreApi<unknown>> we'd write WithReact<ReadonlyStoreApi<unknown>>. And same change for implementation type WithReact<StoreApi<TState>>.

@lukesmurray
Copy link
Contributor Author

sounds good I'll update the PR.

@dai-shi
Copy link
Member

dai-shi commented Feb 1, 2023

Does this https://tsplay.dev/wQYPvw still work with the change?

@lukesmurray
Copy link
Contributor Author

yes. i'll upload an example stackblitz with that as well or can add it to the typings test if you prefer.

@lukesmurray
Copy link
Contributor Author

the proposed change only enforces the type of getState and subscribe. All other properties are passed through, including setState and other modifications to the store from other middleware.

@dai-shi
Copy link
Member

dai-shi commented Feb 1, 2023

I see, it's the base type (extends ...). Yeah, please add tests.

@dai-shi dai-shi reopened this Feb 1, 2023
@devanshj
Copy link
Contributor

devanshj commented Feb 1, 2023

Does this https://tsplay.dev/wQYPvw still work with the change?

Yes, we're not changing the create type.

Copy link
Contributor

@devanshj devanshj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also widen the constraint on S in UseBoundStore to a readonly store.

And perhaps we should widen the deprecated overload on create.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukesmurray Can you please follow @devanshj 's suggestions?

@dai-shi dai-shi changed the title relax react types fix(react, types): relax react types Mar 2, 2023
@lukesmurray
Copy link
Contributor Author

lukesmurray commented Mar 2, 2023 via email

@lukesmurray
Copy link
Contributor Author

@dai-shi I've updated the PR. thank you for your patience

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on it.

Will merge when we prepare a next release.

@dai-shi dai-shi added this to the v4.3.6 milestone Mar 5, 2023
@dai-shi dai-shi merged commit 4517fed into pmndrs:main Mar 6, 2023
kodiakhq bot referenced this pull request in mheob/ef-calc Mar 19, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`^18.14.0` -> `^18.15.3`](https://renovatebot.com/diffs/npm/@types%2fnode/18.14.0/18.15.3) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.15.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.15.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.15.3/compatibility-slim/18.14.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.15.3/confidence-slim/18.14.0)](https://docs.renovatebot.com/merge-confidence/) |
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | [`^8.34.0` -> `^8.36.0`](https://renovatebot.com/diffs/npm/eslint/8.34.0/8.36.0) | [![age](https://badges.renovateapi.com/packages/npm/eslint/8.36.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/eslint/8.36.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/eslint/8.36.0/compatibility-slim/8.34.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/eslint/8.36.0/confidence-slim/8.34.0)](https://docs.renovatebot.com/merge-confidence/) |
| [vite](https://github.com/vitejs/vite/tree/main/#readme) ([source](https://github.com/vitejs/vite)) | [`^4.1.3` -> `^4.1.4`](https://renovatebot.com/diffs/npm/vite/4.1.3/4.1.4) | [![age](https://badges.renovateapi.com/packages/npm/vite/4.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/vite/4.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/vite/4.1.4/compatibility-slim/4.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/vite/4.1.4/confidence-slim/4.1.3)](https://docs.renovatebot.com/merge-confidence/) |
| [zustand](https://github.com/pmndrs/zustand) | [`^4.3.3` -> `^4.3.6`](https://renovatebot.com/diffs/npm/zustand/4.3.3/4.3.6) | [![age](https://badges.renovateapi.com/packages/npm/zustand/4.3.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/zustand/4.3.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/zustand/4.3.6/compatibility-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/zustand/4.3.6/confidence-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.36.0`](https://github.com/eslint/eslint/releases/tag/v8.36.0)

[Compare Source](https://github.com/eslint/eslint/compare/v8.35.0...v8.36.0)

#### Features

-   [`c89a485`](https://github.com/eslint/eslint/commit/c89a485c49450532ee3db74f2638429f1f37d0dd) feat: Add `checkJSDoc` option to multiline-comment-style ([#&#8203;16807](https://github.com/eslint/eslint/issues/16807)) (Laurent Cozic)
-   [`f5f5e11`](https://github.com/eslint/eslint/commit/f5f5e11bd5fd3daab9ccae41e270739c836c305e) feat: Serialize parsers/processors in flat config ([#&#8203;16944](https://github.com/eslint/eslint/issues/16944)) (Nicholas C. Zakas)
-   [`4799297`](https://github.com/eslint/eslint/commit/4799297ea582c81fd1e5623d32a7ddf7a7f3a126) feat: use [@&#8203;eslint-community](https://github.com/eslint-community) dependencies ([#&#8203;16784](https://github.com/eslint/eslint/issues/16784)) (Michaël De Boey)

#### Bug Fixes

-   [`92c1943`](https://github.com/eslint/eslint/commit/92c1943ba73ea01e87086236e8736539b0eed558) fix: correctly iterate files matched by glob patterns ([#&#8203;16831](https://github.com/eslint/eslint/issues/16831)) (Nitin Kumar)

#### Documentation

-   [`b98fdd4`](https://github.com/eslint/eslint/commit/b98fdd413a3b07b262bfce6f704c1c1bb8582770) docs: Update README (GitHub Actions Bot)
-   [`caf08ce`](https://github.com/eslint/eslint/commit/caf08ce0cc74917f7c0eec92d25fd784dc33ac4d) docs: fix estree link in custom formatters docs ([#&#8203;16967](https://github.com/eslint/eslint/issues/16967)) (Milos Djermanovic)
-   [`3398431`](https://github.com/eslint/eslint/commit/3398431574b903757bc78b08c8ed36b7b9fce8eb) docs: Custom Parsers cleanup/expansion ([#&#8203;16887](https://github.com/eslint/eslint/issues/16887)) (Ben Perlmutter)
-   [`19d3531`](https://github.com/eslint/eslint/commit/19d3531d9b54e1004318d28f9a6e18305c5bcc18) docs: Update README (GitHub Actions Bot)
-   [`b09a512`](https://github.com/eslint/eslint/commit/b09a512107249a4eb19ef5a37b0bd672266eafdb) docs: detect and fix broken links ([#&#8203;16837](https://github.com/eslint/eslint/issues/16837)) (Nitin Kumar)

#### Chores

-   [`602b111`](https://github.com/eslint/eslint/commit/602b11121910a97ab2bc4a95a46dd0ccd0a89309) chore: upgrade [@&#8203;eslint/js](https://github.com/eslint/js)[@&#8203;8](https://github.com/8).36.0 ([#&#8203;16978](https://github.com/eslint/eslint/issues/16978)) (Milos Djermanovic)
-   [`43c2345`](https://github.com/eslint/eslint/commit/43c2345c27024aeab6127e6bbfd55c8b70bd317e) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (ESLint Jenkins)
-   [`00afb84`](https://github.com/eslint/eslint/commit/00afb84e5039874c8745a45c953fceaf0c71c454) chore: upgrade [@&#8203;eslint/eslintrc](https://github.com/eslint/eslintrc)[@&#8203;2](https://github.com/2).0.1 ([#&#8203;16977](https://github.com/eslint/eslint/issues/16977)) (Milos Djermanovic)
-   [`698c5aa`](https://github.com/eslint/eslint/commit/698c5aad50e628ff00281dbc786e42de79834035) chore: upgrade espree@9.5.0 ([#&#8203;16976](https://github.com/eslint/eslint/issues/16976)) (Milos Djermanovic)
-   [`75acdd2`](https://github.com/eslint/eslint/commit/75acdd21c5ce7024252e9d41ed77d2f30587caac) chore: lint more js files in docs ([#&#8203;16964](https://github.com/eslint/eslint/issues/16964)) (Milos Djermanovic)
-   [`89d9844`](https://github.com/eslint/eslint/commit/89d9844b3151f09b5b21b6eeeda671009ec301e9) ci: bump actions/add-to-project from 0.4.0 to 0.4.1 ([#&#8203;16943](https://github.com/eslint/eslint/issues/16943)) (dependabot\[bot])

### [`v8.35.0`](https://github.com/eslint/eslint/releases/tag/v8.35.0)

[Compare Source](https://github.com/eslint/eslint/compare/v8.34.0...v8.35.0)

#### Features

-   [`8e34a04`](https://github.com/eslint/eslint/commit/8e34a04e3a4395bce59bc6acadf84281abc11d18) feat: add `afterHashbangComment` option to `lines-around-comment` rule ([#&#8203;16920](https://github.com/eslint/eslint/issues/16920)) (SUZUKI Sosuke)
-   [`c8c0c71`](https://github.com/eslint/eslint/commit/c8c0c715a2964cc1859b99f9d4f542675094d1d5) feat: Move all and recommended configs into package. ([#&#8203;16844](https://github.com/eslint/eslint/issues/16844)) (Nicholas C. Zakas)
-   [`71f6f0d`](https://github.com/eslint/eslint/commit/71f6f0dcd574320ee71c3eb1f313841899bdf260) feat: report more cases with `??` in no-constant-binary-expression ([#&#8203;16826](https://github.com/eslint/eslint/issues/16826)) (Daiki Nishikawa)

#### Bug Fixes

-   [`9698bc5`](https://github.com/eslint/eslint/commit/9698bc5cdec1bbee567a6a489da82e87fe65d019) fix: pin esquery v1.4.0 (fixes [#&#8203;16896](https://github.com/eslint/eslint/issues/16896)) ([#&#8203;16897](https://github.com/eslint/eslint/issues/16897)) (唯然)

#### Documentation

-   [`f9f195e`](https://github.com/eslint/eslint/commit/f9f195ef12deb114fb86763010a23ea0cb4c78d1) docs: Plugin docs cleanup & expansion ([#&#8203;16862](https://github.com/eslint/eslint/issues/16862)) (Ben Perlmutter)
-   [`df809fd`](https://github.com/eslint/eslint/commit/df809fdedc5fc92df4be8340e28baedbde605b4f) docs: Custom Formatters page cleanup/expansion ([#&#8203;16886](https://github.com/eslint/eslint/issues/16886)) (Ben Perlmutter)
-   [`0700d1b`](https://github.com/eslint/eslint/commit/0700d1b14659bf39b1a08f082c44c9084cf676a8) docs: Add PostCSS/Autoprefixer/CSSNano ([#&#8203;16502](https://github.com/eslint/eslint/issues/16502)) (Nick Schonning)
-   [`7b9e9bf`](https://github.com/eslint/eslint/commit/7b9e9bf78bedb009fe2813308ede1f46502c3890) docs: support unicode anchors ([#&#8203;16782](https://github.com/eslint/eslint/issues/16782)) (Percy Ma)
-   [`5fbc0bf`](https://github.com/eslint/eslint/commit/5fbc0bffdd9f84feb43296eb502d1e484fb323f2) docs: Update README (GitHub Actions Bot)
-   [`67865a0`](https://github.com/eslint/eslint/commit/67865a064cc1a4e320030299edc1cfdd1f9ac3b8) docs: Remove mention of mailing list ([#&#8203;16869](https://github.com/eslint/eslint/issues/16869)) (Amaresh  S M)
-   [`43af24a`](https://github.com/eslint/eslint/commit/43af24a88b939a62880c37d1332b02f677d82f16) docs: Add explanation of when to use 'warn' severity ([#&#8203;16882](https://github.com/eslint/eslint/issues/16882)) (Nicholas C. Zakas)
-   [`ed2999b`](https://github.com/eslint/eslint/commit/ed2999b38b4d61f5c278301738e294012d5d3c9e) docs: Shareable configs page edits and expansion ([#&#8203;16824](https://github.com/eslint/eslint/issues/16824)) (Ben Perlmutter)
-   [`2780635`](https://github.com/eslint/eslint/commit/27806358b5e1c4d37b63b1c61595e86ff03b5b42) docs: fix typos ([#&#8203;16884](https://github.com/eslint/eslint/issues/16884)) (Lioness100)
-   [`5bdaae2`](https://github.com/eslint/eslint/commit/5bdaae205c3a0089ea338b382df59e21d5b06436) docs: Ways to Extend ESLint page ([#&#8203;16861](https://github.com/eslint/eslint/issues/16861)) (Ben Perlmutter)

#### Chores

-   [`cdcbe12`](https://github.com/eslint/eslint/commit/cdcbe127de20cbcc4e24131a808c13b1024e61a2) chore: upgrade [@&#8203;eslint/js](https://github.com/eslint/js)[@&#8203;8](https://github.com/8).35.0 ([#&#8203;16935](https://github.com/eslint/eslint/issues/16935)) (Brandon Mills)
-   [`c954c34`](https://github.com/eslint/eslint/commit/c954c349c0c2f88919614efc95e1368c245582fd) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (ESLint Jenkins)
-   [`5a517da`](https://github.com/eslint/eslint/commit/5a517da8e55f6de28e9c028c5627fa7d82945969) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (ESLint Jenkins)
-   [`9f10926`](https://github.com/eslint/eslint/commit/9f10926d76be7cf675721b29bd5030e85cb4ab30) chore: upgrade [@&#8203;eslint/eslintrc](https://github.com/eslint/eslintrc)[@&#8203;2](https://github.com/2).0.0 ([#&#8203;16928](https://github.com/eslint/eslint/issues/16928)) (Milos Djermanovic)
-   [`da728fa`](https://github.com/eslint/eslint/commit/da728fae6c4e5fdda74195e84d45d67ad5cafc45) ci: use LTS node version in workflows ([#&#8203;16907](https://github.com/eslint/eslint/issues/16907)) (Nitin Kumar)
-   [`c57b4f3`](https://github.com/eslint/eslint/commit/c57b4f3dc6383e452120381204ee4a7c874225a0) perf: upgrade to esquery@1.4.2 ([#&#8203;16901](https://github.com/eslint/eslint/issues/16901)) (Milos Djermanovic)
-   [`9122f07`](https://github.com/eslint/eslint/commit/9122f0764031dc36970df715bc5e16973890e18d) chore: Update stale bot settings ([#&#8203;16870](https://github.com/eslint/eslint/issues/16870)) (Nicholas C. Zakas)

</details>

<details>
<summary>vitejs/vite</summary>

### [`v4.1.4`](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small414-2023-02-21-small)

[Compare Source](https://github.com/vitejs/vite/compare/v4.1.3...v4.1.4)

-   fix(define): should not stringify vite internal env ([#&#8203;12120](https://github.com/vitejs/vite/issues/12120)) ([73c3999](https://github.com/vitejs/vite/commit/73c3999)), closes [#&#8203;12120](https://github.com/vitejs/vite/issues/12120)
-   docs: update rollup docs links ([#&#8203;12130](https://github.com/vitejs/vite/issues/12130)) ([439a73f](https://github.com/vitejs/vite/commit/439a73f)), closes [#&#8203;12130](https://github.com/vitejs/vite/issues/12130)

</details>

<details>
<summary>pmndrs/zustand</summary>

### [`v4.3.6`](https://github.com/pmndrs/zustand/releases/tag/v4.3.6)

[Compare Source](https://github.com/pmndrs/zustand/compare/v4.3.5...v4.3.6)

This has a little improvement for library authors.

#### What's Changed

-   fix(react, types): relax react types by [@&#8203;lukesmurray](https://github.com/lukesmurray) in [https://github.com/pmndrs/zustand/pull/1589](https://github.com/pmndrs/zustand/pull/1589)
-   fix: typo in shallow.ts by [@&#8203;ysulyma](https://github.com/ysulyma) in [https://github.com/pmndrs/zustand/pull/1667](https://github.com/pmndrs/zustand/pull/1667)

#### New Contributors

-   [@&#8203;ctolmsted](https://github.com/ctolmsted) made their first contribution in [https://github.com/pmndrs/zustand/pull/1670](https://github.com/pmndrs/zustand/pull/1670)
-   [@&#8203;kevin51jiang](https://github.com/kevin51jiang) made their first contribution in [https://github.com/pmndrs/zustand/pull/1674](https://github.com/pmndrs/zustand/pull/1674)
-   [@&#8203;lukesmurray](https://github.com/lukesmurray) made their first contribution in [https://github.com/pmndrs/zustand/pull/1589](https://github.com/pmndrs/zustand/pull/1589)
-   [@&#8203;ysulyma](https://github.com/ysulyma) made their first contribution in [https://github.com/pmndrs/zustand/pull/1667](https://github.com/pmndrs/zustand/pull/1667)

**Full Changelog**: pmndrs/zustand@v4.3.5...v4.3.6

### [`v4.3.5`](https://github.com/pmndrs/zustand/releases/tag/v4.3.5)

[Compare Source](https://github.com/pmndrs/zustand/compare/v4.3.4...v4.3.5)

v4.3.4 has a regression in CJS build. Please use this version instead.

#### What's Changed

-   fix(build): re-export createStore from index by [@&#8203;hiendv](https://github.com/hiendv) in [https://github.com/pmndrs/zustand/pull/1661](https://github.com/pmndrs/zustand/pull/1661)

#### New Contributors

-   [@&#8203;jmantonellini](https://github.com/jmantonellini) made their first contribution in [https://github.com/pmndrs/zustand/pull/1485](https://github.com/pmndrs/zustand/pull/1485)
-   [@&#8203;hiendv](https://github.com/hiendv) made their first contribution in [https://github.com/pmndrs/zustand/pull/1661](https://github.com/pmndrs/zustand/pull/1661)

**Full Changelog**: pmndrs/zustand@v4.3.4...v4.3.5

### [`v4.3.4`](https://github.com/pmndrs/zustand/releases/tag/v4.3.4)

[Compare Source](https://github.com/pmndrs/zustand/compare/v4.3.3...v4.3.4)

This version fixes some build configs for some edge cases.

⚠️ this version has an issue in CJS build. Please use v4.3.5.

#### What's Changed

-   fix(build): UMD names by [@&#8203;dai-shi](https://github.com/dai-shi) in [https://github.com/pmndrs/zustand/pull/1632](https://github.com/pmndrs/zustand/pull/1632)
-   fix(build): possibly improve ESM for production build by [@&#8203;dai-shi](https://github.com/dai-shi) in [https://github.com/pmndrs/zustand/pull/1645](https://github.com/pmndrs/zustand/pull/1645)
-   fix(build): add explicit export paths for cjs by [@&#8203;barelyhuman](https://github.com/barelyhuman) in [https://github.com/pmndrs/zustand/pull/1659](https://github.com/pmndrs/zustand/pull/1659)

#### New Contributors

-   [@&#8203;AwesomeDevin](https://github.com/AwesomeDevin) made their first contribution in [https://github.com/pmndrs/zustand/pull/1633](https://github.com/pmndrs/zustand/pull/1633)
-   [@&#8203;adimit](https://github.com/adimit) made their first contribution in [https://github.com/pmndrs/zustand/pull/1641](https://github.com/pmndrs/zustand/pull/1641)

**Full Changelog**: pmndrs/zustand@v4.3.3...v4.3.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/mheob/ef-calc).
@holic holic mentioned this pull request Jun 5, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants