A simple react project alone is not the useful, we typically use external packages to
make things easy, get great features and improve developer experience.
Tailwind CSS has revolutionized the web development experience.
It was a headache to assign different class names and ids to html elements and then style them
in their respective css files. We developers are aren't very efficient in coming up with names and searching them
in a css file and then thinking why the overflow is occurring blows our mind.
Other than the naming issue faced by most developers, another problem with css was maintaining standardization across the website.
Writing pixels of media queries, removing default css and what not. Tailwind has made things very easy and introduced
shorthands for writing css as class names.
Setup tailwind as follows
Update the tailwind config
Then put the tailwind directives into you css file
And your tailwind setup is complete, try it out by writing
Run the app and if your tailwind is correctly configured the App background will be red else
follow the above steps again and don't forget to import the css file import "./index.css" .
React Router is by far the most import react package, it helps us creates different
routes and manage them seamlessly, it also provides us with hooks to navigate between routes, get current route
and many more.
Zustand has become my go-to state management library, it is very simple to use and
very light. Previously I used Recoil but Facebook stopped maintaining it and seriously no one likes to write context api or redux.
Shadcn UI has become my go to UI library, it is very simple to use and you get the access to
the component code, so you can customize it how ever you want. You have the full creativity and control over it.
Install shadcn with vite is a little complicated, shadcn is primarily works well with Nextjs
but I have found solutions to make it work with vite.