Why would you not use a tool that makes your job easier? JSX is not HTML, it is just a different syntax for working with JavaScript that is contextually more similar to a markup language. You can write react components using standard syntax, but why would you want to?
This: JSX isn't HTML, it's just syntactic sugar for a tree structure of JS values. (Take one look at the compiled output in Babel's REPL - you'll likely get over the initial "HTML phobia" as soon as you understand why JSX is just JavaScript and not HTML at all.)
If you want more separation, use functional components and put them in separate files - there's almost no ceremony around the JSX elements, just an export statement and some braces. (I don't mind mixing, but the degree of separation is entirely your choice.)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why would you not use a tool that makes your job easier? JSX is not HTML, it is just a different syntax for working with JavaScript that is contextually more similar to a markup language. You can write react components using standard syntax, but why would you want to?
This: JSX isn't HTML, it's just syntactic sugar for a tree structure of JS values. (Take one look at the compiled output in Babel's REPL - you'll likely get over the initial "HTML phobia" as soon as you understand why JSX is just JavaScript and not HTML at all.)
If you want more separation, use functional components and put them in separate files - there's almost no ceremony around the JSX elements, just an export statement and some braces. (I don't mind mixing, but the degree of separation is entirely your choice.)