Introduction
There is no doubt that React is the most popular frontend framework. New web applications are made using React or its frame...
For further actions, you may consider blocking this person and/or reporting abuse
And how are these libraries essential? What's the basis? Not to mention that Redux is outdated and suggests Redux/Toolkit by itself.
Yep if you need Redux then what you really want is Redux Toolkit, unless you really love writing boiler plate!
As this provide more functionality such as routing, testing and components building.
What you want is called Next JS sir π
Definetly a good choice instead of CRA but still you will need libraries to make it evern more powerful.
You don't need a "powerful" environment. You need an environment that can cover your needs while being dynamic enough so you can add building blocks into it whenever necessary.
With something like that you're good to go for a full E2E project as starter:
*Swap sequelize by Mongoose if you use Mongo DB.
I go with Prisma when starting any new projects instead of sequelize, Have you heard about it?
Has a pretty developer experience imo
I've sure heard of it!
I've recently checked the details on both Prisma and TypeORM and I decided to go for Prisma on my next side-project to test it on my own π
Did you use Sequelize before? Or Mongoose?
I saw that Prisma can handle both SQL and Mongo (among others) but i don't really know the pros and cons of using it vs Sequelize/Mongoose yet (tech details, performance...).
Any advice/tip that you can provide would be much appreciated π
For some reason I didn't like the Developer Experience with Sequelize or even Mongoose so I prefer Prisma for everything,
I love their simple language they use in the schema file, makes it really simple to define relationships.
I dont know much about the performance & benchmarks compared to other ORMs but I haven't ran into any such bottle necks yet, so I keep using it π
Well, using Sequelize you just throw the CLI command and it does everything for you, you don't need to write schemas manually π
e.g.
Can't you do that with Prisma? π±
No, you can't do that in Prisma, seems interesting though
π₯² disappointing, I've been interacting with ORMs this way for 10 years in different languages/platforms...
In my opninion toolkit is king compared to Redux, however i prefer zustand over all of the above.
I think these are all great librairies. They all solved something that we needed with React.
I personally used all of them, but the only ones I'd only ChakraUI and React Testing Library nowadays. And I'm only including ChakraUI because of their roadmap for V3. If it doesn't fulfil their promises, I'll most likely remove it from my toolbelt.
The huge problem with all these librairies is that once you install them all, you already bust the recommended JS bundle size of 130 to 170 KB. Just for a "hello world" page...
React Router is nice, but the migrations over the years are making it a very risky move. I prefer using NextJS, but if I had to use a router, I'd probably go with the one from Tanner Linsley (aka the Tan stack).
I still haven't found a good use for Redux or Redux Toolkit. React Query will definitely do better with a smaller JS footprint. The problem with Redux is that it's a very big for the small amount of global state you should use. Server state, local state and url state should cover pretty much all your needs, what's left is very few outliers and you're definitely paying a huge price if you're going for Redux in these cases...
Chakra is awesome, I love it. But I also hate the 100 KB of gzip JS just so you get a button displayed on the screen. The V3 roadmap could really help lower the bundle size, but until then I'd look at ZagJS which was created by ChakraUI creators to tackle the JS bundle size problem among other problems.
Axios is perfectly fine, but I usually don't have 11KB to burn on my JS bundle size. Especially now that fetch is supported in all browsers, NodeJS and Cloudflare workers...
React Helmet is a must if you're not using a framework that manages it for you. Fortunately, I use NextJS so I never had to use it.
React Testing Library is awesome. I have absolutely nothing negative to say about it.
Framer-Motion is a great animation library. Unfortunately, it's a pile of poo when looking at the JS bundle size and it's not tree-shakeable (technically it is, but you'll tree-shake 5KB at most, which is a drop in the ocean at this point). It's almost as costly as the whole React-Dom package, it makes no sense whatsoever to use it. Especially since most animations could be done with 2 CSS classes and less than 5 lines of JS.
Again, all these libraries are great. They work well and are usually a blast to develop with. The only problem is the cost the clients need to pay is simply too big to be performant. There's a reason the new generation of JS frameworks are all looking into reducing their bundle size as much as possible...
Great reality check :)
Where chakra ui roadmap is located? Can you give a link?
Here you go: Chakra UI V3 roadmap
Completely agree.
If you think it in depth, developments that put 15-20 libs to begin with are not so different than picking a Wordpress and just push plug-ins into it and in this situation probably the second's way faster to GTD π
someone coming up with what is react , angular post after seeing this
I miss CoreUI React Library like here: coreui.io/react/
Nice Article Suraj, Newbies like us will definitely get value from this
Glad that you like it!
What you install with React when setting up project?
I install zero dependencies (aside from react, react-dom and testing libs) and just add things when I really need them.
Adding libs for simple tasks that can be accomplished easily without them is a very bad practice that pays off later on.
You'll need to handle the versions of each one and solve compatibility issues and it's definitely better to do so with 4 dependencies than doing it when you've like 20.
Yes, that a good thing. Having low library will definetly improve performance.
I don't even use CRA whenever I need to use React.
npm i -D parcel-bundler
npm i react react-dom
Create an
index.js
file in your root directory like that:Create an index.html file in your root directory:
Add this inside the
<body>
tag:add the start command in your
package.json
:"start": "parcel index.html --open"
and you're good to go π
Thank you for sharing these,
The link to the react testing library is showing a 404. Please could you update the link
It has been fixed. Thanks for repoting it.
It's worth putting MSW on this list.
I don't even know what MSW is, that's what google point me where searching for it:
magicseaweed.com/ and now I'm more confused than before π
Well, for me Fancyapps UI components are also essential, but it definitely depends on the project.