I read this attribute expression with jsx, and can’t figure when to use “” and {}?
Read:
Link: https://facebook.github.io/react/docs/jsx-in-depth.html
Attribute Expressions
To use a JavaScript expression as an attribute value, wrap the expression in a pair of curly braces ({}) instead of quotes ("").
// Input (JSX):
var person = <Person name={window.isLoggedIn ? window.name : ''} />;
// Output (JS):
var person = React.createElement(
Person,
{name: window.isLoggedIn ? window.name : ''}
);
How to solve this syntax error: EDIT: SOLVED