I am envolved in project which use NextJS, I really don't apprehend it's complexity.
If I was asked what SSR/Javascript to use, I would without any doubt choose : Jeasx
Here is a simple products route component, in a file named : [products].jsx.
Notice how easily it handles asynchronous request, and fill the page in
a very comprehensive way.
No hooks, no states, no effects, no resources...
export default async function Products() {
const { products } = await (
await fetch("https://dummyjson.com/products")
).json();
return (
<Layout title="Products">
{products.map(({ id, title, description }) => (
<article>
<a href={`?id=${id}`}>{title}</a>
<p>{description}</p>
</article>
))}
</Layout>
);
}
If NextJS is not your thing, give it an eye.
Here are some demos
Top comments (0)