2 ms·
You may use both of the syntaxes; but the former allows to easily inject JS variables directly, rather than by interpolating strings. For example: var userPara
by heavenlyblue 9y ago
You may use both of the syntaxes; but the former allows to easily inject JS variables directly, rather than by interpolating strings.
For example:
var userParagraphMarginSetting = '5em';
styles={{ marginLeft: userParagraphMarginSetting }}
Against:
var styles='marginLeft:'+userParagraphMarginSetting;
styles={styles}