sau123 sau123 - 1 year ago 121
Javascript Question

using this.props.someVariable

I am using this.props.someVariable to pass on a variable from one component to another. I would like to debug the variable using console.log().

I am not able to use it in console.log(this.props.someVariable) but it works fine within a tag.

var secondComp = React.createClass({
console.log({this.props.myProp}); // doesn't work

Answer Source

Just do:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download