How JSX abstracts JavaScript
Nowadays, coding React applications without JSX is not recommended, though it is possible. For instance, you can write a React.createElement(component, props, ...children)
function to describe a UI.
However, you can easily describe a button UI in JSX with the following code:
<Button color="wine"> Click a Wine Button </Button>
Writing the preceding code without JSX would require you to describe a button UI with the following code:
React.createElement(Button, {color: 'wine'}, ' Click a Wine Button')
Doing this in a large React project could lead to multiple issues, such as having to deal with more bugs in your code base and facing a steeper learning curve to become a code-savvy developer who could function optimally at writing this low-level code to describe a UI. However, with very little to disagree on, you would agree that JSX...