hello-preact
A PreactJS wmr starter kit for Glitch. Preact is a fast 3kB alternative to React with the same modern API. Note: You will need to know a bit of JSX to tinker with this starter kit.
Files:
-
public/index.html
: The main HTML file. -
public/index.js
: Main components and JSX template, the text, images, buttons, css, all of it is loaded by this file -
public/style.css
: Main stylesheet, mainly fonts and logos
Fun facts:
- You can import modules from npm without adding them to your package.json!
- Import stylesheets with a simple
import
statement, likeimport "./style.css"
- WMR has Built-in caching for npm modules
Commands:
-
npm run start
: Builds the preactjs app todist
and spins up a server using http-server with port3000
. -
npm run build
: Builds the preactjs app todist
. -
npm run clean
: Removes thedist
folder so old bundles do not remain and take up space.
Made with Glitch
( ᵔ ᴥ ᵔ )
Project URL/demo: https://hello-preact.glitch.me
Remix this starter kit: https://glitch.com/edit/#!/remix/hello-preact
Yes, I’m aware of the footer not spaced out, I made a change and it may be the way wmr caches stuff on why it’s not updating, so I’ma give it a little bit for the cache to expire.