Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add preact hooks to the standalone bundle #134

Merged
merged 2 commits into from
Dec 26, 2019
Merged

Conversation

zserge
Copy link
Contributor

@zserge zserge commented Oct 28, 2019

This adds exported preact/hooks functions to the standalone bundle, so that one can use htm + preact + useState etc from a single module.
I believe that Preact 10.0.0+ gains a lot from using hooks, also this functionality was requested in the relevant issue issue: #46 (comment)
There might be a better way to resolve this, if so - I'd be happy to adjust the PR.

@dy
Copy link

dy commented Oct 30, 2019

Fragments would also be useful! Eg. haunted https://github.com/matthewp/haunted#lighterhtml-etc provides a nice way to make web-components react components.
@developit @jviide

@crazy4groovy
Copy link

Hi, What's the status on this PR?

@developit
Copy link
Owner

Hiya - sorry for the radio silence on this one. The trick here is figuring out what folks are relying on htm/preact/standalone for. Personally I use it as a quick way to hotlink a nice single-dependency preact setup from unpkg. So for my purposes, I'm definitely interested in the hooks addition.

I think we can merge this, since it still allows the non-standalone preact integration to work with Preact 8.

@jviide jviide merged commit 1ec0588 into developit:master Dec 26, 2019
@jviide
Copy link
Collaborator

jviide commented Dec 26, 2019

Thanks @zserge!

@jgoux
Copy link

jgoux commented Jan 20, 2020

Hello all, is this change released yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants