I get asked about this a lot (especially since the launch of Epic Web), so I've written it down.
Here's why I won't use Next.js:
https://t.co/crVN7hOszL
Damn is frontend development getting overly complex. Hooks, server components, "tainted" references. I get a feeling that frameworks try to do everything at once instead of focusing on a single thing.
I've been using React for 7 years and the present makes me overwhelmed.
as const fixes everything.
Making a custom hook that returns a tuple?
You've probably hit this weird error before.
This is happening because TypeScript thinks your hook returns an array, not a tuple.
So, add an 'as const' to make it infer properly.
Is there anything 'as const' can't do?
No.
I have a life outside work.
After 8 hours of work, I want to spend time with my family, relax, and do my hobbies.
The only time I might build side projects, IS if I don’t have a job or contribute to a real-world project already.
If you have time & the mental capacity, build them. But they’re not mandatory.
What’s your take, by the way?
*Note: They’re great for learning new stuff or developing your skills further, but they are time consuming and mentally taxing.*
Imagining a CLI that:
- You run on your tsconfig.json
- Asks you a BUNCH of questions about your setup and what you're building.
- Sets your tsconfig.json to the right values
- Tells you WHY it's adding those values and links you to the right resources.
Would you use it?