Skip to content

fix: Improve React Re-render Loops #1820

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

justsml
Copy link
Contributor

@justsml justsml commented Jul 7, 2025

Adjusted state structurally to allow for simpler useMemo/useCallback usage.

Copy link

vercel bot commented Jul 7, 2025

@justsml is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

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

This all looks correct to me, thanks for the PR. Did you run into a react re-rendering issue that needs this?

Copy link

vercel bot commented Jul 8, 2025

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

Name Status Preview Updated (UTC)
blocknote-website ❌ Failed (Inspect) Jul 8, 2025 7:09am

Copy link

pkg-pr-new bot commented Jul 8, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@1820

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@1820

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1820

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@1820

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1820

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@1820

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@1820

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@1820

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@1820

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-email-exporter@1820

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@1820

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@1820

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@1820

commit: d004ae2

@justsml
Copy link
Contributor Author

justsml commented Jul 8, 2025

This all looks correct to me, thanks for the PR. Did you run into a react re-rendering issue that needs this?

Yes. 😺

This is the 1st of (hopefully) a couple of targeted PRs to address excess re-render issues.

Excess = 10-100's or re-renders a second.

My goal is to improve the performance story around Custom toolbar UX, animating editor height (effect), programmatic select, custom slash UX, etc.

@nperez0111
Copy link
Contributor

Hm, 10s or 100s sounds a bit excessive, I'm not sure that we see that in our test harness so maybe there is something in your blocknote integration that is overly rendering.

Either way, would happily accept more PRs for performance updates

@nperez0111 nperez0111 merged commit 906a455 into TypeCellOS:main Jul 8, 2025
6 of 8 checks passed
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.

2 participants