3 ms·
I don't get the "reinventing JSX" part, it's not what's happening here. JSX allows you to render a list by iterating over the elements of a JS array, using dire
by ggregoire 2y ago
I don't get the "reinventing JSX" part, it's not what's happening here. JSX allows you to render a list by iterating over the elements of a JS array, using directly the .map method of the Array object. It's one of the main features of JSX. I'm very confused by the title, is it just clickbait?
- recursive 2y agoThat's not even a feature of JSX. The curly braces are a feature of JSX. Inside is arbitrary expressions. .map is an array method that exists independently. You can have just about any expression inside the curly braces. This is not part of the JSX specification, but the host language.