This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-25
Channels
- # announcements (5)
- # beginners (74)
- # boot (5)
- # cider (57)
- # cljdoc (5)
- # cljs-dev (45)
- # clojure (37)
- # clojure-dev (6)
- # clojure-europe (4)
- # clojure-italy (17)
- # clojure-nl (11)
- # clojure-spec (48)
- # clojure-uk (96)
- # clojurescript (79)
- # cursive (17)
- # data-science (1)
- # datomic (27)
- # emacs (2)
- # fulcro (22)
- # immutant (1)
- # java (62)
- # juxt (4)
- # kaocha (4)
- # lein-figwheel (5)
- # leiningen (6)
- # midje (1)
- # mount (1)
- # music (3)
- # nrepl (6)
- # off-topic (49)
- # pathom (10)
- # pedestal (2)
- # re-frame (43)
- # reagent (2)
- # ring (2)
- # shadow-cljs (78)
- # spacemacs (6)
- # test-check (2)
- # tools-deps (4)
@tony.kay I think you did some routing work recently. I wonder if this would make your life easier: https://clojureverse.org/t/shadow-lazy-convenience-wrapper-for-shadow-loader-cljs-loader/3841
Looks nice. I’m not providing code splitting support directly (beyond giving hooks that make it possible for routing to work with it), but I’m sure users will appreciate the simpler support.
@tony.kay after your help with the form, I’m trying to figure out how to tie the inputs together, seems just passing the prop of the form value isn’t work - should I be passing something else? The value is correct, but errors out on change.
(defsc DetailsForm [this props]
{:query (fn [] ['* fs/form-config-join])
:ident (fn [] (generate-ident props))}
(dom/div "Details Form"
(dom/input {:value (:total props) :onChange #(m/set-string! this (:total props) :event %)})))
This is getting me closer, but React still seems angry. Warning: value prop on input should not be null. Consider using the empty string to clear the component or undefined for uncontrolled components.
and wrapped-input is changing a controlled input of type undefined to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa
@tony.kay Strangely enough this only happens on the first onChange, and going into the next step and back shows initial state.
that warning is that your :value on an input went from nil to non-nil….good idea just to say something like :value (or x "")
if you don’t want to see the warning
Oh I see, any idea why its not maintaining the value of the field after editing and going to the next step? Or do I need to do a mutation to update it on step change?
I think it all boils down to this:
(defn generate-ident [{:keys [booking]}]
[:booking/id (:id booking)])
Something isn’t lining up correctlyconfirmed, the props passed into this are changing into fulcro.client.primitives{:computed {:step 1}}
onChange @tony.kay Any ideas?
um…the props refresh relies on the query of the component that the system has mounted at that location…do all of the components in question have queries for the props you’re trying to use?
I may have led you down a shady path. The way Fulcro refreshes UI has to do with it finding the portion of the UI that needs refreshed and using the component at that path to pull the props…I honestly don’t remember how it selects the query off the top of my head…I think it uses the component that is in the query. Thus, whichever component does the query should query for all of the possible props…this subbing out stuff I’m having you do might not end up working right with the sub-components having queries…you might need to delete the ident/query for the steps and just treat them more like rendering functions. I’m sorry I’m just a bit too busy to help you more than that.
I'm once again with that strange No app connected.
in fulcro inspect
debugging the inspect window i found Extension server error: Operation failed:
It keep retrying (and failing) forever
There is also a Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined
Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined
devtools_compatibility.js:57 Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined
at DevToolsAPIImpl._dispatchOnInspectorFrontendAPI (VM1369 devtools_compatibility.js:57)
at DevToolsAPIImpl.dispatchMessage (VM1369 devtools_compatibility.js:134)
at <anonymous>:1:13
_dispatchOnInspectorFrontendAPI @ devtools_compatibility.js:57
dispatchMessage @ devtools_compatibility.js:134
(anonymous) @ VM1371:1
Extension server error: Operation failed:
Extension server error: Operation failed: has no execution context
makeStatus @ shell.js:7831
evaluate @ shell.js:7827
_onEvaluateOnInspectedPage @ shell.js:7744
_onmessage @ shell.js:7796
try reinstalling it, I have seen some cases were the code get corrupted for no aparent reason