How I created, moved to next.js from react, Create React App

October 17, 2022,
By Mackral
How I created, moved to next.js from react, Create React App

The highlighted features of Next.js mentioned on their website were the main reason to move to Next.js.

As a newbie to react I had started the journey with CRA(Create React App), which isn’t a bad option at all but for a bigger vision you cannot rely on CRA due to various reasons like it’s difficult to add custom build configs. One way to add custom configs is to eject the app, but then it overrides the Only one build dependency advantage. The other way is you can use packages like customize-cra or react-app-rewired but then they have limited capabilities. Abstracts everything. It’s important to understand the things that need to run a React app. But due to it’s Only one build dependency advantage, a beginner might think that react-scripts is the only dependency needed to run react apps and might not know that transpiler(babel), bundler(webpack) are the key dependencies which are used under the hood by react-scripts. This happened to me until I read this awesome article. CRA is bloated – IMO. For example, CRA comes with SASS support, if you are using plain CSS or Less it’s an extra dependency that you will never use.