Example of using Electric with Biff.
This fork has been modified to use electric-hiccup. See app.cljc.
This project uses tailwindcss for HTML styling in app.cljc. I've included settings for the Tailwind CSS IntelliSense plugin for VSCode to provide class autocomplete and tooltip css definitions for electric-hiccup. If you are using VSCode install the plugin to enable the features.
Other implementations of app.cljc for comparison:
- The original: app.cljc from biff-electric.
- A htmx version: app.clj from the main biff repo.
This project uses an older version of Electric and Biff. It isn't recommended to use this as the basis for a new project. See electric-multi-client-app for a simple electric-hiccup starter app.
Run bb dev
to get started. See bb tasks
for other commands.
View the latest commit to see how this differs from the regular Biff example app. To use Electric in your own Biff project, it's recommended to create a Biff app the normal way and then manually apply the changes in this project's latest commit. This ensures that your project will be created with the latest version of Biff—this repo won't necessarily be upgraded to future Biff releases.