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

Million.js Implementation with Docusaurus #9289

Closed
2 tasks done
anaclumos opened this issue Sep 7, 2023 · 3 comments
Closed
2 tasks done

Million.js Implementation with Docusaurus #9289

anaclumos opened this issue Sep 7, 2023 · 3 comments
Labels
proposal This issue is a proposal, usually non-trivial change status: needs more information There is not enough information to take action on the issue.

Comments

@anaclumos
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Motivation

Million.js is a Virtual DOM Replacement for React. It claims to make React 70% faster. However, it requires some Webpack setup, and I would like to learn how to do it. Docusaurus Support · Issue #566 · aidenybai/million

Self-service

  • I'd be willing to do some initial work on this proposal myself.
@anaclumos anaclumos added proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels Sep 7, 2023
@slorber
Copy link
Collaborator

slorber commented Sep 8, 2023

Curious: what's the outcome you expect in your app by installing Million?
https://million.dev/blog/virtual-dom#lots-of-static-content-with-little-dynamic-content

It looks for for quite static content, but on Docusaurus we don't do many React re-renders anyway because the whole site is quite stateless.

Does it have the possibility to reduce hydration time?

Does it have the possibility to reduce page transition time?

Also we are going to start using React Server Components in the future (#9089). Once most of the React code of our theme is RSC running at build time, is Million still worth using?

cc @aidenybai @tobySolutions


If the Webpack setup is that simple, you could just create a Docusaurus plugin and use the configureWebpack hook, to install the Millions webpack plugin: https://docusaurus.io/docs/api/plugin-methods/lifecycle-apis#configureWebpack

But is it enough to make it work? Will it also compile our theme code too, that is inside a library and is not first-party site code?

@slorber slorber added status: needs more information There is not enough information to take action on the issue. and removed status: needs triage This issue has not been triaged by maintainers labels Sep 8, 2023
@anaclumos
Copy link
Contributor Author

I didn't know about Docusaurus moving to RSC! If then, there wouldn't be much incentive to implement it.

@aidenybai
Copy link

hydration currently is a WIP. we can revisit this in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue is a proposal, usually non-trivial change status: needs more information There is not enough information to take action on the issue.
Projects
None yet
Development

No branches or pull requests

3 participants