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(#58695): improve zustand example #58696

Merged
merged 6 commits into from
Jan 6, 2024
Merged

fix(#58695): improve zustand example #58696

merged 6 commits into from
Jan 6, 2024

Conversation

N-Ziermann
Copy link
Contributor

@N-Ziermann N-Ziermann commented Nov 20, 2023

What?

Improvements to the with-zustand example

Why?

Because it ran into an error right when you started it and it also rerendered unnecessarily often.

How?

  • I fixed the error when opening the page by fixing an hydration issue caused by using "Date.now()" both on the server and the client
  • I made the example rerender less often by using zustand's useShallow optimisation
  • I removed the target: "es5" from the tsconfig.json to also address this Issue: #58640
  • I also made some generell code-style changes to make the code easier to read and/or consistent

Fixes #58695
Fixes #58640 (partially)

@N-Ziermann N-Ziermann requested review from a team as code owners November 20, 2023 18:19
@N-Ziermann N-Ziermann requested review from manovotny and delbaoliveira and removed request for a team November 20, 2023 18:19
@ijjk ijjk added the examples Issue/PR related to examples label Nov 20, 2023
@ijjk
Copy link
Member

ijjk commented Jan 6, 2024

Allow CI Workflow Run

  • approve CI run for commit: de3621a

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@leerob leerob merged commit 781fa77 into vercel:canary Jan 6, 2024
31 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples locked
Projects
None yet
3 participants