Experimental package for writing SPWA in Julia.
- The app is based on a single Preact state that has two parts:
- Client-only state (data)
- Server-managed state.
- The server api has a single endpoint: JSON in, JSON out
- Client sends request (server-managed state + action)
- Server sends JSON response (state to be updated)
- This turns into
this.setState(json_response)
- Preact.js (lightweight alternative to React.js).
- Tailwind.css (Lets you forget about styles, just add classes like
text-center
). - Hyperscript.jl. Lets you easily write components with many classes (as happens with Tailwind)
using Hyperscript
template = m("div")."text-gray-100"."hover:bg-gray-700"."hover:text-white"."px-3"."py-2"."rounded-md"."text-xl"."font-medium"
template("Text with lots of styling!")
# <div class="text-gray-100 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-xl font-medium">Text with lots of styling!</div>