Fork me on GitHub
Tyler Nisonoff00:07:11

Hello - I'm trying to get started with fulcro, and figured id try to run the example app, which pointed to the I'm having trouble getting that running. At first the javascript wasn't loading, but I changed the script loading in the index.html from js/examples/main.js to js/main/main.js based on the asset-path in shadow-cljs.edn

main.js:2231 An error occurred when loading com.example.client.js
main.js:2232 ReferenceError: fulcro_network_csrf_token is not defined
shadow.module.main.append.js:4 An error occurred when calling ..

(index):12 Uncaught TypeError: com.example.client.start is not a function
    at (index):12
and at this point, I figured I'm probably doing something wrong, or I maybe I shouldn't be using this as the demo app. has anyone else ran it recently? Or if anyone has a better suggestion of a way to get started / an example app I can run and look at, let me know! I'm also going through the developer guide.


if you're just getting started you should probably use the plain template: fulcro RAD is an extension suite that's still in alpha

Jakub Holý (HolyJak)16:07:24

The Readme of ☝️ reads: > There is a Fulcro RAD demo that is perhaps a better starting point for a project. :)


i also personally found it helpful to look at the video series code (see the different tags in the repo) since it's less real-world-ready, meaning it just focuses on the fundamental concepts:

Tyler Nisonoff00:07:38

ah great, thanks!!


@tylernisonoff So, the README for RAD demo should be correct. Make sure you follow the directions carefully.


including starting the server, and using the URL given


and staring the compile of the js

Tyler Nisonoff00:07:49

EDIT: Ahh apologies, you are correct. The server is listening on 3000, I was connecting to the devtools port :face_palm:Thanks for the help


yep…I should delete that HTML file


I’m using RAD in production. I’ve not promoted it from alpha, but it’s pretty stable


we have many many forms/reports on it now, so chances that big changes will happen are slim in the core parts

Tyler Nisonoff01:07:41

great to hear, excited to dig into it!

Quentin Le Guennec12:07:33

Can I use the fulcro data normalization feature in a re-frame app?


what's the best strategy for rolling back an optimistic update when there's a server error and you need to undo your optimistic update? i see three options: 1. hold on to a copy of state from before the optimistic update and roll back to it on error 2. apply the inverse of the optimistic update in the body of the error 3. reload from the server any of the relevant parts of state on error


very helpful, thanks!