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

[DEPRECATED] Passing a vanilla store will be unsupported in a future version #60

Closed
alshdotme opened this issue Jul 26, 2023 · 3 comments · Fixed by #70
Closed

[DEPRECATED] Passing a vanilla store will be unsupported in a future version #60

alshdotme opened this issue Jul 26, 2023 · 3 comments · Fixed by #70
Labels
bug Something isn't working

Comments

@alshdotme
Copy link

Description

When running unit tests I see the following deprecation warning in my console when using this package.

console.warn
      [DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.

It seems it is this line of createStore that is causing it:

middlewares.push(vanilla.createStore);

If I comment out this line, the console warning no longer propagates.

Steps

  1. Create a few stores, and merge into a global store
  2. Run a unit test on a component that is consuming a value from the store

Expectation

There are no console.warns propagating.

@bolshchikov
Copy link

@zbeyens , any updates on this one?

@zbeyens
Copy link
Member

zbeyens commented Oct 16, 2023

None, PR's welcome

@zbeyens
Copy link
Member

zbeyens commented Dec 10, 2023

Got it fixed. Note I've renamed the package to zustand-x. If you're using Jotai, take a look at jotai-x!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants