Gerardo Bautista
Gerardo Bautista

Reputation: 891

How can I print something on the client console from a react component?

I do not know if I gave myself to understand for example in the file server / main.js place something like this

Meteor.startup (() => {
     console.log ('where am I');
     // example of collection and map
   });

and you can see the message but within an extended react component how can I do it or would I have to import some method?

Upvotes: 3

Views: 12475

Answers (1)

Elie Steinbock
Elie Steinbock

Reputation: 5098

You can use console.log in client side code too. Stick console.log at the top of your render() function if you'd like and you'll see a message in the web browser's console.

Upvotes: 0

Related Questions