Fork me on GitHub
#fulcro
<
2019-02-28
>
tony.kay00:02:54

@mdhaney some tips on state machine: Remember that Fulcro’s app state is already pretty much a state machine (sans the names for states)…sometimes a bit of data is all that is needed to represent something that a traditional SM would have a named state for (which then leads to state explosion and the desire for state charts). In Fulcro, my experience is that the “state explosion” problem doesn’t happen because you can target a SM at a single simple problem (because you can have instances of as many diff ones as you please). For a navigation system like this it might not even make a lot of sense to use SM, because there really aren’t “states”….that said, the SM organization allows you to clump some things together as an organizational tool…e.g. one state with various event handlers that just leave you in that state. Advantages of that include: having a place to “save” (via store/retrieve) private data that never goes on the UI, logical grouping of the “things that can happen”, etc. All that said: for this particular use-case a couple of mutations might make just as much (or more) sense.

👍 10
souenzzo00:02:32

About No app connected. When I start the app via

(defn ^:export -main
  []
  (let [client (fc/make-fulcro-client)]
    (render! client)
    client))
(defonce client (-main))
The inspect dont work When I use (def client (-main)) it works on the first reload