Is seeing console.log on client expected for SSR? (Next JS)

1.9k views Asked by At

I've created a simple page to test SSR implementation. There is one thing I couldn't be sure. If you could help to understand would be great!

const EmptyPage = () => {
  console.log("rendered !!!");
  return (
    <Fragment>
      <span>/empty-page-with-next</span>
    </Fragment>
  );
};

export async function getServerSideProps({ query }) {
  return {};
}

export default EmptyPage;

If I open the page, I see that rendered !!! on the server and client(browser's console) both.

I was expecting not to see that on the client.. Is that normal to see it? There is no use-effect, no trigger to re-render the page..?

0

There are 0 answers