Don't want to duplicate, but
I posted a issue back in React (didn't got much love TBH)
But I think would make perfect sense in here in Preact
Please have a look at
=> facebook/react#11322
I think that some kind of abstraction that behind the scenes converts (or equivalent) to JSX render() function would be ideal.
Hi @IamManchanda - I actually built a compiler that does exactly what you're asking for:

I haven't been able to polish it up for release yet, but you can follow along on Twitter:
https://twitter.com/_developit/status/898952382960119808
Most helpful comment
Hi @IamManchanda - I actually built a compiler that does exactly what you're asking for:
I haven't been able to polish it up for release yet, but you can follow along on Twitter:
https://twitter.com/_developit/status/898952382960119808