Next.js 13.4
nextjs.org
nextjs.org
I figured with all the other releases, this keynote would show something really big — maybe they should've saved the databases reveal.
Instead we get "the thing we announced months ago is out of beta".
Vercel, you've been inconsiderate with my time.
Those appear to be mostly equivalent if you're watching it online.
If you don't feel they're almost equivalent, lockdown might have been easier. Personally I find online conferences disappointing and only watch if it's the same sort of content I would watch in a simple video.
But as a developer I just can't stand all the complexity and the magic going on. And now a React compiler is on its way too. This is just too much.
I googled for this and couldn't find anything. Do you have any links that give more info about this?
The latest update is mentioned in the March 2023 blog post: https://react.dev/blog/2023/03/22/react-labs-what-we-have-be...
My tldr of this is it'll be a transform of easy to read idiomatic react code using hooks etc into more performant code that avoids unnecessary rerenders by statically analysing where optimisations like memoisation can be injected without changing behavior.
Pretty smart stuff but also, yeah, perhaps a bit of a black hole of complexity. I can immediately imagine issues with debugging or somehow relying on the side effects of spurious rerenders and that breaking things in the real world.
You'd hope code like this does not exist in the wild... and yet exist it does :-)
Automatic memoization, signals under the hood, eventually moving away from the VDOM — so much of what people have come to find cumbersome about React can be eliminated by a compilation step doing a lot of these things for us. It's a bit strange that so many React developers don't know when or why to utilize useCallback, useMemo, etc... but maybe it was a mistake to expose those and leave it to developers to know when to use them, given that in a declarative system it can be automatically determined where it would be beneficial or not.
I'd prefer to use something else with a more thoughtful design and implementation, but React is well-entrenched. I don't think we'll stop using it any time soon. I still like it, too. The frontend world has arguably had to deal with much worse problems than the complexity of React, and it's a well-worn path that's typically easy to traverse by now. So, net positive I hope.
I’m not saying it’s perfect, but I expect the case you’re anticipating will be less common (though harder to resolve) than the ones which plague people today (whether they realize it does or not… The lack of awareness is one of the worst parts in my opinion, and why resolving it in the background seems ideal).
It's compilers and abstractions all the way down, I don't get why people want to be able to hold the entire stack in their head at once. That ship sailed - decades ago.
Some of us got into the field because of the curiosity of wanting to know how things worked and weren’t satisfied by vague, high level, abstract versions. I imagine this is why I’m so poor at math and physics though.
I find the "complexity bad and makes me sad" attitude around development to be almost paradoxical - our job is literally to abstract things. If you seek for complete understanding you'll never find it. There's always an abstraction underneath and one to build on top.
There’s also that thing about understanding your layer and the layer below to be able to debug. At this point “my layer” is complex enough that I can’t even think on debugging what’s going on with an error in a hook that was inserted by a compiler while SSRing a client side component which toggles a drop-down.
For example, in one small file, two functions, you have a reactive UI, styling (Tailwind), backend with database fetching, routing, and deployment handled:
async function getPostsFromDb() {
return await prisma.posts.findMany();
}export default async function PostsPage() {
const posts= await getPostsFromDb();
return (
<main className="flex min-h-screen flex-col items-center justify-center">
{posts.map((post) => {
return (
<GradientCard
key={post.name}
title={post.name}
/>
);
})}
</main>
);
}Sounds like a recipe for spaghetti.
Other platforms have been here before (ASP.NET Web Forms comes to mind) and it always ends up bad.
My team is developing a server-rendered nextjs app which is deployed on AWS. We haven't really configured it beyond the defaults, but nextjs seems to provide very little visibility into what's happening (e.g., no request logs).
If you could share any tips or lessons learned from operating a production nextjs app, it would be much appreciated.
https://nextjs.org/docs/pages/building-your-application/rout...
[0] https://nextjs.org/docs/app/building-your-application/render...
Feel free to reach out. My GitHub is @Colton
Maybe there is someone here who knows more!
https://nextjs.org/docs/app/building-your-application/upgrad...
Depending on the app it could be easy or difficult.