Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
CSR and SSR together with next

I have basically three user roles in my app, Consumer, Merchant and Admin. The pages that Consumer accesses to should be SEO friendly and will be server rendered. And I want my Merchant and Admin pages to be client rendered, each having a different build so that for merchant it will have only merchant js build rendered to browser. So it will act like full on react project, same way for admin also.

Besides, these all three roles will be using same reusable components. Also all has to be a single repository.

Can this be achieved by next.js? How should I be managing the project? Also, when the merchant is a wholly a react app, how does react's routing affect next's routing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use all the Basic React feature in Nextjs which includes useEffect, useState,etc..

Also You can choose which pages should be rendered server side, which pages should be statically generated and which pages should be rendered client side.

Next uses SSR, SSG, And CSR

Client Side rendering

import { useEffect, useState } from 'react';

function foo() {
  const [state, setState] = useState({
    foo: 'bar',
  });

  useEffect(() => {
    setState({foo:'bar'});
  }, []);

  return <>{state}</>;
}

For Server Side Rendering and Static-stie Generation refer to this LINK

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!