2 ms·
While not as sexy, you can do: <MyList {...{items, selectedItem, onItemClicked}} /> There's a lot of "gets you most of the way there" hacks with JSX that
by jameslk 6y ago
While not as sexy, you can do:
<MyList {...{items, selectedItem, onItemClicked}} />
There's a lot of "gets you most of the way there" hacks with JSX that will fill most needs. Where as you can imagine the incredible cacophony of screaming developers who maintain TypeScript, Preact, IDEs, etc. that would be incensed by breaking changes to JSX introduced just to solve some inconveniences.
- acemarke 6y agoTrust me, I'm well aware of both of those facts :) Doesn't mean the syntax _can't_ change . After all, the `<>` shorthand syntax for fragments was added via cooperation with the Babel and TypeScript teams, and the work on the new `jsx()` replacement for `createElement()` is going the same way.