DEV Community

Cover image for How To Use MillionJs In Manual Mode a Next App.

How To Use MillionJs In Manual Mode a Next App.

Tobiloba Adedeji on April 24, 2023

Introduction Following a recent announcement by the millionjs creator Aiden Bai about support of Millionjs for Nextjs apps in the newest...
Collapse
 
mattbarnicle profile image
Matt Barnicle

Looks amazing. Thanks for the article. Is there any reason not to wrap all your components with block? Also, why not wrap the Home component in this example? And if you wrap a component that has child components, do all child components get processed by the Million virtual DOM?

Collapse
 
tobysolutions profile image
Tobiloba Adedeji

Yep! It isn't exactly necessary to wrap all components with the block() componentt, but, it's very good if you do. The optimization is insane, although Millionjs has some limitations and it isn't totally a one size fits all solution

Collapse
 
ekimcem profile image
Ekim Cem Ülger

Great question, can you inform us if you can find any answer?

Collapse
 
mattbarnicle profile image
Matt Barnicle

will do

Thread Thread
 
tobysolutions profile image
Tobiloba Adedeji

I hope the above answers your questions

Thread Thread
 
mattbarnicle profile image
Matt Barnicle

Yes, thanks for the answer.

Thread Thread
 
tobysolutions profile image
Tobiloba Adedeji

Sure thing! Pleasure is all mine.

Collapse
 
clericcoder profile image
Abdulsalaam Noibi

Wow,what a detailed Article. Thanks for sharing😇

Collapse
 
tobysolutions profile image
Tobiloba Adedeji

Thank you very much boss!

Collapse
 
coderamrin profile image
Amrin

great article.
I gotta try millionJS.

Collapse
 
tobysolutions profile image
Tobiloba Adedeji

Thank you very much Amrin!

Collapse
 
subhamburnwal profile image
Subham Burnwal

theres this error with the nextjs versions 13.5 and above. It says "Page "src/app/page.tsx" has an invalid "default" export:
Type "MillionProps" is not valid."

I created using create-next-app@latest

what are the most latest compatible versions? am i doing it wrong?

Collapse
 
rpadro93 profile image
Ramiro

I keep having the same error when importing million to next.config.js:

SyntaxError: Cannot use import statement outside a module

I already had this error in another project and solved it with a decorator but it was a component decorator. Does anyone know any other way to fix this ?