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

React can, but less ergonomically than most developers are used to.


Could you comment more on how it's done?


Modern React uses JSX which is then transformed at build time into function calls.

You can write those function calls yourself, but it would be a tremendous PITA.


In this case, you could use `htm`: https://github.com/developit/htm#usage


That's cool- but unless you're targeting greenfield browsers only you aren't going to use the syntax in that documentation without a build step or using the babel transpiler directly in the browser which, while cool from a POC standpoint, isn't a good solution. At that point you might as well just add build tools and use JSX or whatever the framework you're trying to use intended or otherwise is well documented.


Yeah totally. Or even use Preact by the same author which is smaller and faster than React.




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

Search: