3 ms·
The "handlebars" are just plain javascript syntax for a block, not template markers. You can try it in your browser console. { console.log(123); }
by ricardobeat 11y ago
The "handlebars" are just plain javascript syntax for a block, not template markers. You can try it in your browser console.
{ console.log(123); }
- deleted 11y ago[deleted]
- couchand 11y agoNot exactly... within JSX the handlebars signify "now I'm going back to plain JS". compare <div> console.log(123) </div> with <div> { console.log(123) } </div> The first outputs a div with the text "console.log(123)" inside. The second logs "123" and outputs an empty div (since console.log returns undefined).
- ricardobeat 11y agoThat's the point.