Skip to content

React to preact#21

Open
RamazanIttiev wants to merge 15 commits intoevilmartians:mainfrom
RamazanIttiev:react-to-preact
Open

React to preact#21
RamazanIttiev wants to merge 15 commits intoevilmartians:mainfrom
RamazanIttiev:react-to-preact

Conversation

@RamazanIttiev
Copy link

React

dist/api.js 15.76 kB │ gzip: 6.17 kB
dist/index.html 497.47 kB │ gzip: 251.45 kB

Preact

dist/api.js 15.76 kB │ gzip: 6.17 kB
dist/index.html 354.69 kB │ gzip: 207.84 kB

@RamazanIttiev
Copy link
Author

There is a slight glitch on hover on tooltip appearance. Not sure what is the cause. Trying to figure out

@followdarko
Copy link

Probably if drop preact/compat the size will be lower?


export const formatForOklchDisplay = (oklch: Oklch): string => {
return `${toPercent(oklch.l)} ${clearValue(oklch.c)} ${clearValue(
export const formatForOklchDisplay = (oklch: Oklch): string => `${toPercent(oklch.l)} ${clearValue(oklch.c)} ${clearValue(

Choose a reason for hiding this comment

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

Jfyi, looks a bit strange to mix preact migration with style fixes not related to the main issue

Copy link
Author

Choose a reason for hiding this comment

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

i guess it happened when i changed eslint react to preact

@ai
Copy link
Member

ai commented Aug 6, 2025

Probably if drop preact/compat the size will be lower?

Yes! It will be nice to avoid preact/compat to see the potential of true Preact experience.

@ai
Copy link
Member

ai commented Aug 7, 2025

What is the final size?

plugins: ['preact', 'prettier', 'jsx-a11y', 'boundaries'],
rules: {
'no-undef': 'off',
'react/jsx-no-bind': 'off',
Copy link

@followdarko followdarko Aug 7, 2025

Choose a reason for hiding this comment

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

Minor issue: I'm not sure, but could we completely get rid of react in any form? Remove or rename this prop?

Otherwise, good job, thank you 👍

Copy link
Author

Choose a reason for hiding this comment

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

Actually we cant. There is no such rule as preact/jsx-no-bind. I have tried to remove it but es lint tests don't pass

package.json Outdated
"dependencies": {
"@figma/plugin-typings": "^1.79.0",
"@floating-ui/dom": "^1.7.3",
"@floating-ui/react": "^0.25.2",

Choose a reason for hiding this comment

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

Need to remove @floating-ui/react

@RamazanIttiev
Copy link
Author

What is the final size?

349.46 kB comparing to react with 497.47 kB

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.

3 participants