React · Lesson 118 of 120
The React Ecosystem
Libraries and tools.
React focuses on the user interface. Around it is a huge ecosystem of libraries. You don't need them all, but it helps to know the popular ones.
- React: the UI
- A huge ecosystem
- Know the popular ones
Popular libraries
TanStack Query handles server data, caching, and refetching. Zustand is a small, simple state store. React Hook Form and Zod handle forms and validation. Tailwind is a popular way to style. And Vitest with Testing Library covers tests.
| Need | Library |
|---|---|
| Server data | TanStack Query |
| Global state | Zustand |
| Forms | React Hook Form + Zod |
| Styling | Tailwind CSS |
| Tests | Vitest + Testing Library |
Choosing libraries
Start with plain React. Add a library when you feel real pain, not before. Prefer popular, well maintained ones. And read their docs, they're usually excellent.
| key | value |
|---|---|
| Start | plain React |
| Add | when it hurts |
| Prefer | popular, maintained |
| Read | the docs |
Summary
Add libraries when you need them, not before. Next, where React is going.
Key takeaways- TanStack Query
- Zustand
- Tailwind
Next up: Where React Is Going — compiler and server