https://preactjs.com/guide/v10/tutorial/
or you can use the full hyperscript markup library
https://github.com/queckezz/preact-hyperscript