A web mail client written in Clojure(Script).
Attempts to follow the data-flow described in this Christian Johansen's article Stateless, data-driven UIs
render!
is called with empty global state and an initial component, creating the initial UI.- A global event handler is defined to listen for UI events (e.g., clicks, input changes).
- When a user interacts with the UI, it triggers an event captured by the global handler.
- The handler processes each action and generates a new state. This is done by the pure
handle-action
function. * - The global state atom (store) is updated with the new state.
- The store watcher detects the state change and triggers a re-render.
- All components are re-rendered based on the new state, updating the UI.
* There is an additional step for API calls: the event handler checks for actions with the :api
namespace (e.g., :api/make-request) and routes them to a separate function (perform-api-call!
) for handling asynchronous API requests.
FIXME: provide a deps.edn command to compile shadow-cljs first and start the backend
Copyright © 2024 Mateo
Distributed under the Eclipse Public License version 1.0.