developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.73k stars 170 forks source link

Include Preact signal #229

Open HappyStriker opened 2 years ago

HappyStriker commented 2 years ago

Hey there,

thank you for providing htm and thus a simple build tools free solution to use Preact!

Recently a new extension to Preact has been published, namely @preact/signals. As this is an amazing improvement to the way to use Preact I am wondering if there are any plans to include it into the whole htm standalone package?

This would be amazing.

Thanks you very much!

Sincerely, Happy Striker

arturi commented 2 years ago

+1 for this

mujahidfa commented 2 years ago

I love this idea but I can't wait longer, so I made a standalone version of Preact + HTM + Preact Signals myself!

Y'all can check it out here: preact-htm-signals-standalone

Usage:

<script type="module">
  import { html, render, signal } from "https://cdn.jsdelivr.net/npm/preact-htm-signals-standalone/dist/standalone.js";
  ...
</script>
badpenguin commented 1 year ago

Hi, where i can find ESM modules for this to be included directly into a buildless app? I'm creating a PWA and need to store the files locally for offline usage. Thanks.

johansatge commented 1 month ago

Hi! I had the same request and ended up developing a UI to configure and generate a standalone file that bundles Preact / hooks / signals / htm (as IIFE or ESM):

https://standalonepreact.satge.net/

Hope that helps 🙏

HappyStriker commented 1 month ago

Hi! I had the same request and ended up developing a UI to configure and generate a standalone file that bundles Preact / hooks / signals / htm (as IIFE or ESM):

https://standalonepreact.satge.net/

Hope that helps 🙏

Wow, thats amazing. In the meantime I have built my own little "compiler" for the stuff I use, but yours with support for offering all the specific features of Preact is unparalleled!