Reputation: 2539
I'm using react and next.js. I build the same project in both of them.
One might logically expect that next.js should be compiled slower than react.
But my next.js project gets compiled in less than 10 second, while my react project takes more than 40 seconds to compile. And it also uses a lot of CPU.
What should I do to make react as fast as next.js?
Upvotes: 1
Views: 584
Reputation: 376
NextJS is always faster than React. But, You can try another way to fast up, ReactJS App with snowpack or vite. Usually React App uses webpack as Bundler. Webpack is slow in many cases.
Creating App with Snowpack is easy by,
npx create-snowpack-app my-react-app --template @snowpack/app-template-react
You can also try with Vite,
npm init vite@latest my-react-app -- --template react
Links for Reference
Upvotes: 2
Reputation: 65
There are some simple tricks:
these are simple tricks, I think there's no way to make react next
Upvotes: 1