Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can write custom jsx function and let typescript call your function instead of react's.

Your custom jsx function can return data in reusable format, that is passed to different functions for difference use case.

ts-liveview is using this approach to use jsx for both server-side rendering and compact over-the-wire updates



What I'd like is for it to have been a standard language feature, that can be used with or without a framework and without any build involvement




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: