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

Update slices-pattern.md #2046

Merged
merged 5 commits into from
Sep 12, 2023
Merged

Update slices-pattern.md #2046

merged 5 commits into from
Sep 12, 2023

Conversation

dbritto-dev
Copy link
Collaborator

@dbritto-dev dbritto-dev commented Sep 11, 2023

Related Issues or Discussions

Improving docs

Summary

The current guide could misguide people in sense that they could use create slice functions to access functions but also any non function which is wrong

Check List

  • yarn run prettier for formatting code and docs

@vercel
Copy link

vercel bot commented Sep 11, 2023

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 Sep 12, 2023 11:53am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 11, 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 4b1ce37:

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

@norama
Copy link

norama commented Sep 11, 2023

Super, just please include typescript example as well.

@dbritto-dev
Copy link
Collaborator Author

dbritto-dev commented Sep 11, 2023

Super, just please include typescript example as well.

we've already a ts guide -> https://docs.pmnd.rs/zustand/guides/typescript

@norama
Copy link

norama commented Sep 11, 2023

Super, just please include typescript example as well.

we've already a ts guide -> https://docs.pmnd.rs/zustand/guides/typescript

Yes, I have seen that as well, just please include this get() access as well as some explanation for

StateCreator<
  BearSlice & FishSlice,
  [],
  [],
  FishSlice
>

here:
https://docs.pmnd.rs/zustand/guides/typescript#slices-pattern

@dbritto-dev
Copy link
Collaborator Author

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.

Looks okay to me, but leaving others to review.

Copy link
Collaborator

@sewera sewera left a comment

Choose a reason for hiding this comment

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

Looks good :)

docs/guides/typescript.md Outdated Show resolved Hide resolved
docs/guides/typescript.md Outdated Show resolved Hide resolved
dbritto-dev and others added 2 commits September 12, 2023 06:52
Co-authored-by: Blazej Sewera <code@sewera.dev>
Co-authored-by: Blazej Sewera <code@sewera.dev>
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.

4 participants