Older versions of React had a different way of creating components.
I am almost certain that this doesn't work in React 17.
Some research by someone who knows Reacts internals is required to bring this functionality into the modern era.
One of the things that might make things more difficult (or more easy, depending on how you look at it), is how React 17 handles event handlers.
React 17 release notes

Also a bit unrelated, but a bit less fun is that JSX can compile down to two "syntaxes".
New JS Transform
Older versions of React had a different way of creating components.
I am almost certain that this doesn't work in React 17.
Some research by someone who knows Reacts internals is required to bring this functionality into the modern era.
One of the things that might make things more difficult (or more easy, depending on how you look at it), is how React 17 handles event handlers.
React 17 release notes

Also a bit unrelated, but a bit less fun is that JSX can compile down to two "syntaxes".
New JS Transform