WebReflection / hyperHTML

A Fast & Light Virtual DOM Alternative
ISC License
3.07k stars 112 forks source link

How to use some 3rd UI Kit/component in hyperhtml? #89

Closed zwz closed 7 years ago

zwz commented 7 years ago

It would save a lot of work if we can easily convert and use other UI kit/component in hyperhtml, e.g. pretty datepicker, interactive file uploader, etc..

In fact, this question associates with the ecosystem of hyperhtml, which I think should be illustrated in detail in the document.

As far as I can tell, hyperhtml has a better syntax over JSX. But the css style is not well scoped for component-driven development (maybe I am wrong, is there any good way?).

For Vue or React, you can find a lot of 3rd components (js/css/html are well encapsulated). And you can also easily develop a component and share it with others.

WebReflection commented 7 years ago

it's the newest (and mature with its pattern) library out there.

You cannot expect same documentation, components, and examples you have in React and Vue for two simple reasons:

  1. nobody is contributing creating that, it's just me so far
  2. nobody is sponsoring me, so it's just me, also needing to make money for living with some spare time over my days

TL;DR everything is coming, and every help is needed.

WebReflection commented 7 years ago

In case it wasn't clear: https://www.patreon.com/webreflection

and https://github.com/WebReflection/donate

also https://twitter.com/velmu/status/901072329928781825

BentleyDavis commented 7 years ago

You donation page on GitHub says Patreon monthly support but you patreon is set to per creation. What is you unit of creation or can you change it to monthly?

WebReflection commented 7 years ago

Thank you @BentleyDavis , I've just changed to monthly since I don't have a "per creation" concept (yet).

Good catch, the paypal for a one off should cover the rest.

zwz commented 7 years ago

@WebReflection Yes, I totally understand your situation. What I mean is that if there is a "good way" (like vue or react) to build 3rd component, then others can easily contribute and help you. This is the start of a ecosystem of hyperhtml. In fact, I was trying to develop some components in hyperhtml those days that could be easily shared, but I do not find the "good way". That is why I bring up the issue.

I know hyperhtml is new. I just hope there is an inherent mechanism of hyperhtml from the begin of the design.

WebReflection commented 7 years ago

There is and it's called HyperHTMLElement.

It's in the doc, a post will come soon

zwz commented 7 years ago

But as far as I know, the css style is not scoped in HyperHTMLElement. This may be a problem when one use components from different 3rd sources.

WebReflection commented 7 years ago

if you use ShadowDOM components can be easily styled: https://viperhtml.js.org/hyperhtml/examples/#!fw=Polymer&example=Compose%20with%20shadow%20DOM

If you don't use ShadowDOM you need CSS that styles your-custom-element

If you want to put a style attribute in your nodes, you can.

And so on. If you have hints on how to improve please share in HyperHTMLElement repository, thanks.