3 ms·
Should have made the distinction clearer but I was just saying JSX _and_ Angular specific templates. The fact of JSX being an abstraction over the React API tha
by halfmatthalfcat 7y ago
Should have made the distinction clearer but I was just saying JSX _and_ Angular specific templates. The fact of JSX being an abstraction over the React API that equates to what the DOM _should_ look like is must easier to grep then defining them as literal code, imo.
When I used React Native with Typescript (this was about a year ago) the initial setup to get all of the types playing well together either wasn't clear from the documentation or I ended up debugging/writing custom definitions to get things to work. It just felt sidelined or treated as a second class citizen, but I feel like this has been a common theme throughout the life of React generally.
- duncanawoods 7y ago> equates to what the DOM _should_ look like is must easier to grep then defining them as literal code, imo It's a common view but really quite a funny form of path dependence / mental fixedness. The fact that html elements have been defined with angle brackets is essentially historical accident. It's just a simple hierarchical structure that can be in any notation and any given programming language can happily support this already without new syntax. Yet because of the history, we feel more comfortable with some angle brackets and so we have all this redundant syntactic complexity in jsx/tsx which we would never design without the history. I'd encourage you to be open minded for going to all code because although there will be an acclimatisation period as you break the historical connection, those familiar angle brackets are totally superfluous.
- halfmatthalfcat 7y agoI've worked with frameworks like GWT and Vaadin enough to know I prefer the DOM way of doing things over visualizing the view through code. Hell, I've used the React programmatic API before I used JSX...never going back.