Fork me on GitHub
#fulcro
<
2018-04-26
>
cjmurphy04:04:43

Can anyone tell me where the react lifecycle methods are supposed to go? Thanks.

cjmurphy04:04:45

It works fine without the :componentWillMount.

cjmurphy04:04:16

Answer is just put as a peer of :initial-state etc, in the same map in other words.

troglotit08:04:41

The main issue is that my app crashes and shows blank screen in production using shadow-cljs release.

thheller08:04:46

@troglotit run shadow-cljs release your-build --debug to make this easier to debug

troglotit08:04:47

I'm not 100% sure that is because of that logging - I wanted to turn it off.

thheller08:04:13

pretty hard to make sense of the code otherwise 🙂

nha10:04:57

Has fulcro thought about applying to Clojurists togethers? I see there is hoplon/reagent but I would rather see fulcro/om-next (and I donate to Clojurists togethers)

troglotit10:04:33

so TL/DR of my issue is: logger is null in logging.cljc in fulcro, and it 's called in primitives.cljc when it's built via shadow-cljs release

Jörg11:04:21

Hi, I just started with Fulcro and like that it seems so very complete! Unfortunately the live update of a page via Figwheel (I am following The Book so far) seems quite slow, 15-30 seconds before changes are shown in the browser. Is that normal and can I speed things up somehow?

claudiu11:04:31

@jorg.ramb Should not be that slow. If you plan on using npm javascript libraries might be a idea to also take a look at showdow-cljs. The fulcro-lein-template has both figwheel and shadow-cljs

Jörg11:04:19

Ok, will try shadow-cljs then! Thanks for the confirmation and the suggestion!

Jörg12:04:09

Confirmed, shadow-cljs is much faster (2-3 seconds). Thanks @claudiu!

thheller12:04:52

2-3secs is still pretty darn slow

Jörg12:04:19

What I did (just FYI): 1) lein new fulcro app-lein nodemo ALT lein new fulcro app-scljs shadow-cljs nodemo 2) cd app-lein ALT cd app-scljs 3) lein run -m clojure.main script/figwheel.clj ALT npx shadow-cljs watch main cards test 4) Coffee break 5) open page in browser, http://localhost:3449/ ALT http://localhost:8020/ (using Chromium) 6) I see "TODO" 7) I change the file "ui/root.cljc": "TODO" -> "DONE" 8 ) Wait for the web page to reflect that. 15-30 seconds with lein, 2-3 seconds with shadow-cljs Of course I shut down the instances between those two tests. I have performed similar figwheel tests with other frameworks (for example following the om.next tutorial), the updates there (which use figwheel) were subsecond, on the same machines (tested on two different)).

Jörg12:04:58

(running Linux on i7 CPU, 12 resp 32 GB memory, SSD disk)

thheller13:04:23

@jorg.ramb what is the [:main] Build completed. (433 files, 2 compiled, 0 warnings, 0.46s) time for you? was that 2-3secs?

Jörg14:04:59

[:main] Compiling ... [:main] Build completed. (433 files, 2 compiled, 0 warnings, 1.16s) [:main] Compiling ... [:main] Build completed. (433 files, 2 compiled, 0 warnings, 0.85s)

Jörg14:04:20

My estimates 2-3 seconds is for the browser (guessed, not measured) (shadow-cljs). I had :verbose true for the figwheel updates and I think I have seen recompile times about 27 seconds in the log. But I am happy with the speed of shadow-cljs, will use that until further then.

tony.kay15:04:45

@troglotit happy for a patch. The new logging stuff is known to need polish

😱 4
troglotit15:04:10

I'm having FORM NOT NORMALIZED error when I dispatch mutation fs/mark-complete!

troglotit15:04:23

It fails on https://github.com/fulcrologic/fulcro/blob/98cca33e27e7ac573590d3f9cc0117446eb943b1/src/main/fulcro/ui/form_state.cljc#L513 - and I quite not understand. The conj'ed form-config-path points to the map {:fulcro.ui.form-state/complete? #{:first-name :last-name}

tony.kay17:04:07

@troglotit It means what it says…you have to make sure your form has ident, so that the form state itself gets normalized into the database. You need to make sure your component’s query has the form config join: http://book.fulcrologic.com/#_defining_the_form_component

tony.kay17:04:24

@troglotit I released 2.5.3-SNAPSHOT to clojars which should fix your logging issue for release builds

tony.kay17:04:26

@levitanong 2.5.3-SNAPSHOT also has your type annotation adds

tony.kay17:04:52

If either of you can confirm that this works well, I can cut it as an official release

levitanong18:04:47

@tony.kay Will do! will take it for a spin.

levitanong20:04:55

@tony.kay seems to be working fine.

parrot 8
tony.kay20:04:49

great, thanks

tony.kay20:04:34

2.5.3 on clojars

upside_down_parrot 12