Let the Light In

Let the Light In

Today I'm quoting Lana del Rey as always - this is one of the songs off her new album.

It's beautiful and I can't stop listening to it today - it took a while to grow on me, though. Interesting. 

I think it was so beautiful and so forward-thinking that it was hard to 'let in' - quite literally, ha ha ha.

Why you should use Create React App vs. why you should use Parcel

I did a little bit of research for my bootcamp today.

Art for Lana del Rey 'Let the Light In'.

In general...

While CRA is easy to use and has little configuration, Parcel has even less - and is even easier to use and set up.

CRA is maintained by the core React team. 

Parcel has a built-in dev server with live reload.

Create React App is...

Better for more complex projects.

It abstracts something called a "Webpack" configuration. 

Better if you ever want to "eject" your project and manage it independently. 

Parcel is...

Simpler because it has no configuration needed. It therefore "greatly reduces the learning curve". 

It also "removes the headaches often associated with managing Webpack configs". 

It apparently "works great for building single or multi-page React apps".

Interestingly, parcel only works with functional programming in react - i.e. it works with "functional components" and "Hooks". It does not work with "class components".

You can only export React components in this type of file. 

You can however use TypeScript with it. 

CONCLUSION:

It seems that for simple React apps, especially practice ones, Parcel is better. It has less setup and less configuration and you don't need to do anymore.

However for more advanced projects CRA would be best - not least because you can 'eject' it and make it an independently-run project should the need ever arise to.


Comments

  1. Depending on your needs, if you're doing a complex app I'd skip CRA and use Remix or NextJS instead.

    You're also getting into the murky world of build tools. Ever changing. Parcel is great and a lot better than trying configure webpack by hand. Personally I'd reach for Vite though.

    ReplyDelete

Post a Comment

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing