WebReflection / lighterhtml

The hyperHTML strength & experience without its complexity 🎉
https://medium.com/@WebReflection/lit-html-vs-hyperhtml-vs-lighterhtml-c084abfe1285
ISC License
735 stars 20 forks source link

Question: isomorphic support? #24

Closed bstro closed 5 years ago

bstro commented 5 years ago

Hi there, I'm a bit new to all this, but am wondering, does lighterhtml support building isometric apps? Maybe a renderToString method? Haven't seen anything like this so far, but this lib looks cool as hell and I'd love to use it in this way.

joshgillies commented 5 years ago

Currently there's no renderToString support by default in lighterhtml. But to achieve similar results, you could take something like basichtml and follow the https://github.com/WebReflection/basicHTML#good-old-way-to-init-with-basic-selectors example.

Also, when you say "Isometric" I'm assuming you mean "Isomorphic".

bstro commented 5 years ago

@joshgillies Thanks! Hah, yeah, I meant isomorphic (been dabbling in pixelart lately so the brain wires got crossed).

joshgillies commented 5 years ago

Haha, no worries! I hope basicHTML works out for you. Do report back if there are any issues. 👍

WebReflection commented 5 years ago

you can use viperHTML for server side rendering.

const {bind, wire} = require('viperhtml');
const html = (...args) => wire()(...args);

it want be 1:1 API experience like it would with hyperHTML but it should be fine to play around with that.