gmp26 / fulcro-with-reframe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An Experiment with Fulcro and Reframe

This is a simple project that plays with the idea that Fulcro could be used to manage the full-stack behavior of a re-frame application. I am by no means a Reframe expert, so my integration experiments in this repository may violate some central bit of wisdom that I am unaware of. That said, I know that Reframe does not come with any sort of predefined data model, nor does it have a standardized approach to full-stack operation. Fulcro does.

Fulcro, on the other hand, does not have a built-in mechanism for a disconnected event/subscription model. Reframe does.

Thus, I thought it would be interesting to explore if the two could be unified into a system where the features of both could be leveraged to good effect.

This repository assume you have a (very) basic understanding of both libraries, but I’ve tried to include comments in the interesting places just to help with understanding.

Usage

Install the NPM deps, and start the Clojurescript build:

$ yarn
$ npx shadow-cljs watch main

Use calva jack-in to start a shadow-cljs REPL connected to the editor pointing at the :main build.

clojure -A:dev

At this point you should be able to run (start) to start, and (restart) to stop/reload/start.

The application should now be available at http://localhost:3000.

Connect to the CLJS nREPL:

  1. Open and connect an nREPL to localhost:9000.

  2. MAKE SURE you have loaded the app in a browser, otherwise there is no execution environment.

  3. Execute (shadow/repl :main) to connect.

Fulcro Inspect

Fulcro inspect will preload on the development build of the main application and workspaces. You must install the plugin in Chrome from the Chrome store (free) to access it. It will add a Fulcro Inspect tab to the developer tools pane.

About

License:MIT License


Languages

Language:Clojure 99.1%Language:HTML 0.9%