←back to thread

Next.js is infuriating

(blog.meca.sh)
1033 points Bogdanp | 2 comments | | HN request time: 0.451s | source
Show context
recroad ◴[] No.45102253[source]
I feel a poor tool choice for your use case should not give you the right to blast the tool and it's design decisions. Most of those complaints are resulting from not understanding how NextJS works and the design decisions that it's creators have made. For example, the middlewares. they're to be treated as a hook. If NextJS had a mechanism for having handlers like Express does, you'd have complained about handler execution order or something.

If you picked NextJS without knowing how it structures its middleware, the vendor lock-in to Vercel, its SSR strategy, its hydration schemes etc. that's on you. I, and many others, have had a lot of success with NextJS increasing delivery speed and ultimately, customer value.

Two years ago I moved off of the React ecosystem to Elixir/Phoenix/LiveView, and it's been great. But that's had its own challenges stemming from the design decisions its creators have made. You're always going to be running into things that you don't like, and I feel NextJS has just become an easy target for people who are looking to vent.

replies(3): >>45102295 #>>45104320 #>>45105168 #
1. FredPret ◴[] No.45105168[source]
What challenges did you pick up with Elixir?
replies(1): >>45120308 #
2. recroad ◴[] No.45120308[source]
Elixir/Phoenix is awesome, no complaints overall. A few small things:

- Passing data from LiveComponent's/JS is a bit of a pain (need to use update())

- phx-hook doesn't always pay well with re-rendering state changes

- Directly calling JS functions (e.g, getting Apple Pay to work) isn't clean

- Can't use attr when using LiveComponents (need to wrap them in a functional component)

- Unique ID requirement for LiveComponent is a pain (so is wrapping them in a div)

- No great APIs for updating session data when using sockets

- Can't pass params to LiveView in live_render, have to use session