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].
(Replying to PARENT post)