In my view it works well when writing a function component that doesn't contain conditional logic (especially nested). Then, instead of HTMLish it becomes hard to read due to overused logical and ternary operators. If you want to use if statements, it becomes a mix of HTML and JavaScript and it doesn't look like a markup language anymore.
Passionate generalist conquering the web one project at a time. Whether authoring libraries for node, JS, PHP, or Rust, I am always on the lookout for better solutions to common problems.
Location
USA
Work
Lead Developer & Co-founder at corpscrypt, CTO at REtech
In my view it works well when writing a function component that doesn't contain conditional logic (especially nested). Then, instead of HTMLish it becomes hard to read due to overused logical and ternary operators. If you want to use if statements, it becomes a mix of HTML and JavaScript and it doesn't look like a markup language anymore.
Agreed! The most common tasks any templating must fulfill is conditional rendering and iteration. Both aren't solved well in JSX.
Neither trouble me at all in jsx. There are very easy ways to implement both things