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:

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
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 â‹… 10 min read
Handling Dates In JavaScript With Tempo

Handling dates in JavaScript with Tempo

Use the Tempo library to format dates and times in JavaScript while accounting for time zones, daylight saying time, and date internationalization.

Amazing Enyichi Agu
Apr 30, 2024 â‹… 8 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