2022-10-04
2148
#nextjs#react
Ogundipe Samuel
1803
Oct 4, 2022 â‹… 7 min read

Build a server-rendered React app with Next.js and Express

Ogundipe Samuel Software engineer and technical writer.

Recent posts:

Leveraging React Server Components In Redwoodjs

Leveraging React Server Components in RedwoodJS

RedwoodJS announced support for server-side rendering and RSCs in its Bighorn release. Explore this feature for when it’s production-ready.

Stephan Miller
May 6, 2024 â‹… 9 min read
Exploring The Aha Stack: Astro, Htmx, Alpine — A Complete Tutorial With A Demo Project And Comparison To Other Stacks

Exploring the AHA stack: Tutorial, demo, and comparison

The AHA stack — Astro, htmx, and Alpine — is a solid web development stack for smaller apps that emphasize frontend speed and SEO.

Oyinkansola Awosan
May 3, 2024 â‹… 13 min read
Comparing Hattip Vs Express Js For Modern Application Development

Comparing Hattip vs. Express.js for modern app development

Explore what Hattip is, how it works, its benefits and key features, and the differences between Hattip and Express.js.

Antonello Zanini
May 2, 2024 â‹… 8 min read
Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 â‹… 14 min read
View all posts

8 Replies to "Build a server-rendered React app with Next.js and Express"

  1. I was having problems with the ‘/p/:id’ request. I solved it adding a return to the app.render line:
    return app.render(req, res, actualPage, queryParams);

  2. server.js file executes client side rendering and sever side rendering??
    i think when client side rendering, server.js doesn’t execute..

  3. Hello,
    I tried it, the response in the route ‘posts/:id’ is returning all the posts but not only my post id…..(I tested the url “http://localhost:3000/posts?id=123” with Postman, with the id as a query params).
    Am i missing something? Thanks!

  4. How do you access, the queryParams object in the rendered page ? Sorry if it’s an obvious answer but I’m just starting to play around with nextjs

Leave a Reply