Fork me on GitHub
#fulcro
<
2018-12-21
>
Mark Addleman02:12:23

hi folks! i'm trying to work through the fulcro tutorial at http://book.fulcrologic.com and running into problems getting the remote server to work. It does not appear that the :started-callback function is being executed from the client. I have slightly altered the code to display an popup alert when the callback is executed but it never is:

(defonce app (atom (fc/new-fulcro-client
                     :started-callback
                     (fn [app]                                         ; (2)
                       (js/alert "hello!")
                       (df/load app :current-user root/Person)))))
where would i begin debugging this?

claudiu08:12:41

@UAMEU7QV7 Did you mount the app ? new-fulcro-client alone will not trigger anything. The execution happens in mount.

Mark Addleman00:12:51

Thanks. It turns out that was the problem.

kszabo11:12:37

If I have an edn prop in my components, that I want to make editable via a textarea, while keeping it checked via the form state clojure.spec helpers/etc. Is this the best solution?

:onChange #(do
                                        (fm/set-string! this :ui/query-params-str :value %)
                                        (when-let [v (util/safe-read-string %)]
                                          (fm/set-value! this :ui/query-params v)))
This way the map the is updated and is synced from the string value to the EDN one, when it is not partial like {:a "x

kszabo12:12:39

my problem with this is that parents of this component need to know about this -str suffixed attribute as well if they want to modify this child of theirs

pauld20:12:06

Hi I'm noticing an error when I try deploying a basic fulcro app with advanced compilation. I followed the tutorial and it works in dev mode, but I get the following in advanced compilation:

pauld20:12:15

I'm going to guess that I need to require my mutations.clj namespace somewhere in my clojure code path.

pauld20:12:31

Yup! That was it.

pauld20:12:37

Lein uberjar will throw out code any namespace that doesn't get required.

pauld22:12:02

Ok now I have a different problem. I've deployed the jar to a vps and I'm getting 403 forbidden when the app tries to reach /api on the server. Any ideas why that is?

pauld22:12:10

I wonder if it could be that I need to set my legal-origin config setting in config/prod.edn

pauld23:12:07

Hmmm, I don't think that's it. I assume that is for doing api requests from somewhere other than localhost.

pauld23:12:31

What could be different about my vps and my dev environment? I really don't want to get into using virtualbox and ansible right now.