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

Simplifies vanilla StoreApi #2507

Closed
wants to merge 5 commits into from

Conversation

ahrjarrett
Copy link

@ahrjarrett ahrjarrett commented Apr 24, 2024

Related Issues or Discussions

I will circle back later today and add comments explaining in more detail

Summary

  • removes SetStateInternal in favor of inline definition
  • replaces Partial with a greedy version (lets us show users concrete types sooner)
  • removes the type assertion on partial by fixing the variance hack elsewhere
  • moves deprecated subset of the StoreApi to separate interface, to create some separation between them

Check List

  • yarn run prettier for formatting code and docs

Copy link

vercel bot commented Apr 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zustand-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2024 2:33pm

Copy link

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.

@ahrjarrett
Copy link
Author

Ah, I see now why this doesn't work.

Closing, but I have a couple ideas that I think might allow us to get around T being invariant.

Will open a separate PR in the future when I have more time to explore them.

@ahrjarrett ahrjarrett closed this Apr 25, 2024
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.

1 participant