WebReflection / neverland

React like Hooks for lighterhtml
https://medium.com/@WebReflection/neverland-the-hyperhtmls-hook-a0c3e11324bb
ISC License
244 stars 7 forks source link

Component not rendering #44

Closed CaptainJKoB closed 4 years ago

CaptainJKoB commented 4 years ago

Hello again.

In this example the Button component won't render.

import { html, svg, render} from 'https://unpkg.com/neverland?module';

const Button = (props) => html`<button type="button">${ props.title }</button>`;

render(document.body, html`<div>Click me: ${ Button({ title: 'Click' }) }</div>`);

Same goes for the other examples in the README.MD

Thanks for your time. :)

WebReflection commented 4 years ago

Oh yeah, I've missed that ... although, if you don't import neverland wrapper at all, you're better off with just lighterhtml, it would work out of the box in this case (but I'll fix neverland too)

CaptainJKoB commented 4 years ago

I always test both for the examples just to see if the behaviour was any different. I am working on a project that uses neverland. lighterhtml is awesome but i need the power of hooks too. Imports in the example are just the needed ones to reproduce it, besides the svg.

WebReflection commented 4 years ago

Done, thanks!