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

meta: added million.js compiler (react) and updated packages #6475

Closed
wants to merge 2 commits into from

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Mar 17, 2024

This PR adds the Million.js Compiler, which supposedly drastically reduces React's re-rendering times and complexity by "certain" bypasses of its reconciliation algorithm and another sort of magic.

This PR also updates all our packages to latest ✅ versions.

@ovflowd ovflowd requested review from a team as code owners March 17, 2024 11:25
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Mar 17, 2024
Copy link

vercel bot commented Mar 17, 2024

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 17, 2024 11:25am

@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Mar 17, 2024
Copy link

github-actions bot commented Mar 17, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟢 90 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 91 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 90 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟠 89 🟢 96 🟢 91 🔗
/en/blog 🟢 100 🟢 90 🟢 100 🟢 92 🔗

Copy link

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 84%
80.07% (450/562) 79.55% (144/181) 71.17% (79/111)

Unit Test Report

Tests Skipped Failures Errors Time
90 0 💤 0 ❌ 0 🔥 4.447s ⏱️

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

Also you should use the For component.
it would certainly avoid this
Capture d’écran 2024-03-17 à 14 36 26

Other point, you should add million in docs.

@@ -127,10 +133,13 @@ const sentryConfig = {
// Next.js Configuration with `next.intl` enabled
const nextWithIntl = withNextIntl('./i18n.tsx')(nextConfig);

// Enables Million.js React Compiler for Next.js
const nextWithMillion = million.next(nextWithIntl, { auto: true, rsc: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const nextWithMillion = million.next(nextWithIntl, { auto: true, rsc: true });
const nextWithMillion = million.next(nextWithIntl, {
// support react server components
auto: { rsc: true },
// We don't want to send telemetry data to Million
telemetry: false,
});

docs ref for rsc
docs ref for telemetry

@AugustinMauroy
Copy link
Contributor

also strange behaviour search box is accessible by cmd + k but not on click

@ovflowd
Copy link
Member Author

ovflowd commented Mar 17, 2024

Well if this addition is not a drop-in placement then I don't think we should adopt the Million.js at the moment.

I don't think that wrapping each iteration with this For component and other stuff is worth it.

I don't want us to get dependent on yet another ecosystem.

Im closing this

@ovflowd ovflowd closed this Mar 17, 2024
@ovflowd ovflowd deleted the chore/added-million-js-and-updated-packages branch March 17, 2024 14:09
@ovflowd
Copy link
Member Author

ovflowd commented Mar 17, 2024

ALSO, I assume this is the issue with Million.js duplicating and crashing: aidenybai/million#991

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