7 ms·
dot.dom: A feature-rich JavaScript template engine in 510 byes
- hubert123 10y agoWhat is this syntax? const {clicks=0} = state;
- icharala 10y agoIt's object deconstructuring, including a default value: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Default_values_2 https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
- icharala 10y agoI created a codepen where you can try it in action: https://codepen.io/anon/pen/Kargex?editors=0010#0 https://codepen.io/anon/pen/Kargex?editors=0010#0