Search code examples
javascriptreactjsremixhydrogenshopify-hydrogen

How to console log in Hydrogen v1 server components


I am a beginner starting using Hydrogen the react-based headless commerce stack, however when I try to console.log in .server.tsx components, I dont get any outputs. How can I do that?


Solution

  • While doing console inside component, it will treat it as client side and you will be able to see that console in browser console.

    But while doing console inside server component, it will be running on server side, thus that console will be visible in terminal from where you have started your application for local development.