This is a demonstration of using Preact without any build tooling. The library is linked from the esm.sh CDN, however a standalone JS file exporting HTM + Preact + Hooks can also be downloaded here.
HTML
<script type="module" src="./main.js"></script>
JS
import { render } from 'https://esm.sh/preact@10.7.2';
import { useState, useCallback } from 'https://esm.sh/preact@10.7.2/hooks'; import { html } from 'https://esm.sh/htm@3.0.4/preact'; |
No comments:
Post a Comment