Skip to content

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