Skip to content

Conversation

@tefkah
Copy link
Member

@tefkah tefkah commented Jun 3, 2025

Issue(s) Resolved

High-level Explanation of PR

Enables the react compiler!

Also adds a way to detect excessive refreshes through react-scan

This can be disabled by turning it off in the bottom right, or by setting REACT_SCAN_ENABLED=false in core/.env.local

Test Plan

Best way to test is to locally

  • do pnpm -F core dev
  • Go to /compiler-demo (this page will be removed when this is merged).
  • play around by changing a color (on the left), see everything being smooth
  • go to next.config.ts. set experimental.reactCompiler: false.
  • reload page
  • try to select color again.
  • see disaster!

I also did the same in storybook, bc that requires specific configuration.

ill add a video tomorrow

Screenshots (if applicable)

Notes

@tefkah tefkah requested review from 3mcd and allisonking and removed request for allisonking June 3, 2025 19:23
Copy link
Member Author

Choose a reason for hiding this comment

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

need to enable eslint to catch things that would break the react-compiler in context-editor

Comment on lines 36 to -40
export const LinkMenu = ({ mark, onChange }: LinkMenuProps) => {
if (!(mark.type.name === "link")) {
return null;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

can't early return if you use hooks

Copy link
Member Author

Choose a reason for hiding this comment

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

@tefkah tefkah marked this pull request as draft June 4, 2025 09:24
@tefkah tefkah removed the request for review from 3mcd June 4, 2025 09:24
@tefkah tefkah removed the request for review from allisonking June 4, 2025 09:24
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