How to pass numbers to React component?

You should be passing the numbers via curly braces({}) where as strings in quotes

React.render(<User age={30} department={'IT'} />, document.getElementById('container'));

Author of content
Edit this page

Made by Michael Sakhniuk

Twitter