choojs / nanocomponent-adapters

🔌 - Convert a nanocomponent to a component for your favourite API or library (web components, (p)react, angular)
MIT License
96 stars 17 forks source link

preact adapter #2

Closed yoshuawuyts closed 7 years ago

yoshuawuyts commented 7 years ago

Would be neat if we could expose nanocomponent to preact. I suspect this would be a minor deviation from our react adapter.

cc/ @developit if you have a few mins to spare, would you mind helping out? Would be radd if all components we build for dat from now on would be natively compatible with preact :sparkles: :grin:

developit commented 7 years ago

I really need to read up on this project - lot to catch up on. Definitely interested, will try to find some time shortly. FYI I think Kye fleshed out some ideas in #4

yoshuawuyts commented 7 years ago

The idea of nanocomponent is that it allows you to create native DOM elements that have a rich lifecycle events: onload, onunload, onresize, onenter, onexit, lazy loading etc. This makes it a cool abstraction to write DOM elements with.

This project is so nanocomponent elements can be rendered super easily inside almost all frameworks. What makes it even cooler is if you then use a light framework (like preact or choo) inside nanocomponent you get interop with all frameworks for free :sparkles:

Hope this makes sense haha :grin:

yoshuawuyts commented 7 years ago

landed in v1.2.0 :tada: