Fork me on GitHub
#fulcro
<
2020-07-23
>
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 https://github.com/fulcrologic/fulcro-rad-demo 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.

lgessler00:07:23

if you're just getting started you should probably use the plain template: https://github.com/fulcrologic/fulcro-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. :)

lgessler00:07:40

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: https://github.com/fulcrologic/video-series

Tyler Nisonoff00:07:38

ah great, thanks!!

tony.kay00:07:40

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

tony.kay00:07:02

including starting the server, and using the URL given

tony.kay00:07:11

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

tony.kay01:07:57

yep…I should delete that HTML file

tony.kay01:07:30

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

tony.kay01:07:51

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?

lgessler17:07:22

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

lgessler23:07:36

very helpful, thanks!