Do you need Next.js just to get SSR working? Maybe there’s another way.
In this article:
There’s a lot of frameworks for server-side rendering (SSR), and they’re all highly-opinionated. Sometimes these opinion can clash with what you want. Instead… what if we don’t use a framework?
vite-plugin-ssr is an alternative. It requires a bit more DIY’ing, but it unlocks flexibility that others don’t quite have:
It’s not a framework. It’s a library that lets you build your own framework. I think this makes for a great playground for experimenting with new tech!
I just came across a unique performance optimisation that’s just so obvious: what if we make functions pause every now and then to breathe?
Using async/await makes this very easy. A calling simple function to use
setTimeout(0) will allow other things to run in the background. It’s really counter-intuitive, but pausing work periodically can things feel faster by making UI feel more responsive.
When building an API, it seems the only choices are GraphQL and Rest. But before there was Rest, it was popular to expose raw, arbitrary functions called remote procedure calls (RPC’s.)
RPC’s don’t require you to to build your data model as objects and resources like GraphQL and Rest do, which might make it a good fit for simpler API’s.
I recall seeing places like Facebook have custom linters for their code which can validate business logic—for example, enforcing the use of design tokens for building UI’s.
map() don’t have native equivalents in Lua.
I just found we can now write Lua scripts in TypeScript! TypeScriptToLua is a compiler that can do exactly what its name says it can do.