(Replying to PARENT post)

You can have complex logic and functions in JSX but that doesn't mean that you have to, so the example is very contrived. That way of writing the code is completely discouraged in the documentation and I haven't run across it often or at all in the real world.
๐Ÿ‘คhaukur๐Ÿ•‘8y๐Ÿ”ผ0๐Ÿ—จ๏ธ0

(Replying to PARENT post)

The example in the article was lifted from the front page of the official React website [0].

[0] https://facebook.github.io/react/

๐Ÿ‘คautoreleasepool๐Ÿ•‘8y๐Ÿ”ผ0๐Ÿ—จ๏ธ0