hyperapp/quickstart.0e6b9c83.html

3 lines
1017 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h2 id="quickstart">quickstart</h2><p>1 Install Hyperapp with npm or Yarn:</p><hr><pre><code class="language-console">npm i hyperapp</code></pre><hr><p>2 Then with a module bundler like <a href="https://parceljs.org">Parcel</a> or <a href="https://webpack.js.org">Webpack</a> import it in your application and get right down to business.</p><hr><pre><code class="language-js">import { h, app } from &quot;hyperapp&quot;</code></pre><hr><p>3 Don&#39;t want to set up a build step? Import Hyperapp in a <code>&lt;script&gt;</code> tag as a module. Don&#39;t worry; modules are supported in all evergreen, self-updating desktop, and mobile browsers.</p><hr><pre><code class="language-html">&lt;script type=&quot;module&quot;&gt;
import { h, app } from &quot;https://unpkg.com/hyperapp&quot;
&lt;/script&gt;</code></pre><hr><p>Here&#39;s the first example to get you started: a counter that can go up or down. You can try it online <a href="https://codesandbox.io/s/hyperapp-playground-fwjlo">here</a>.</p><hr>