Hacker News new | ask | show | jobs
by kaycebasques 1553 days ago
I am building my first non-trivial Next.js app now. It definitely took a couple days to get a simple "fetch data from a third party and render" use case working. And even now I'm not sure if I'm holding it right.
4 comments

I had a Next.js project due for an interview and it basically took my entire weekend, even with a working prototype in another framework. The interviewer later on told me that the assignment was his way of experimenting to find out if the company should switch stacks. I told him it was the worst experience I've ever had coding.
I find it hard to believe as I had the opposite experience

Next has amazing docs and sane defaults: it's the only way I would touch react.

It took you a few days to learn a new big & powerful React framework, and your experience apparently was bad, I'm ok with that.

But, sorry : what does that have anything to do with hooks ?

Hooks is the key architectural concept for implementing the use case I described!

The problems that this comment described are exactly where I shot myself in the foot with hooks: https://news.ycombinator.com/item?id=30754873

That's literally defining getServerSideProps to fetch data server side or just using useEffect if you want to fetch data client side.

I don't recommend react in general but it should be pretty straightforward even with little react experience.

No judgment, but what particular aspect of Next.js or React hindered you? How much JavaScript experience did you have before undertaking the task?
I was on Google's Web DevRel team for 6 years. Owned all the Chrome DevTools and Lighthouse docs for 4 years and led content strategy for https://web.dev and https://developer.chrome.com for 2 years. Lots of experience building small applications in vanilla HTML/CSS/JS and I build toy apps in whatever frameworks are currently popular. I'm a technical writer by trade so I usually don't have time / motivation / business rationale to dive into a particular framework to the point of mastery but definitely am not a novice either!

This comment [1] describes exactly how I shot myself in the foot w/ hooks. In my head this is how React talks to me now: "Tell me your dependencies. NO NOT THAT KIND OF DEPENDECY!!"

[1] https://news.ycombinator.com/item?id=30754873