Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda