This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-11
Channels
- # announcements (21)
- # aws (2)
- # babashka (20)
- # beginners (47)
- # bristol-clojurians (2)
- # calva (63)
- # cider (24)
- # clj-kondo (22)
- # cljs-dev (3)
- # cljsrn (6)
- # clojars (3)
- # clojure (147)
- # clojure-europe (21)
- # clojure-france (2)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-spec (2)
- # clojure-uk (70)
- # clojurescript (37)
- # core-logic (6)
- # cursive (4)
- # data-science (2)
- # datomic (99)
- # events (1)
- # figwheel-main (20)
- # fulcro (26)
- # graalvm (6)
- # graphql (5)
- # kaocha (8)
- # leiningen (20)
- # meander (22)
- # nrepl (4)
- # off-topic (27)
- # pathom (5)
- # pedestal (3)
- # re-frame (20)
- # reagent (4)
- # shadow-cljs (43)
- # spacemacs (11)
- # tools-deps (55)
- # tree-sitter (6)
- # vim (8)
- # xtdb (18)
- # yada (14)
Trying to get Workspaces set up for the very first time. Looking at the examples for Fulcro cards, I'm wondering if this defsc
code needs to change for Fulcro 3? https://github.com/nubank/workspaces#122-fulcro-cards
(ns myapp.workspaces.fulcro-demo-cards
(:require [fulcro.client.primitives :as fp]
[fulcro.client.localized-dom :as dom]
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro :as ct.fulcro]
[nubank.workspaces.lib.fulcro-portal :as f.portal]
[fulcro.client.mutations :as fm]))
(fp/defsc FulcroDemo
[this {:keys [counter]}]
{:initial-state (fn [_] {:counter 0})
:ident (fn [] [::id "singleton"])
:query [:counter]}
(dom/div
(str "Fulcro counter demo [" counter "]")
(dom/button {:onClick #(fm/set-value! this :counter (inc counter))} "+")))
(ws/defcard fulcro-demo-card
(ct.fulcro/fulcro-card
{::f.portal/root FulcroDemo}))
the Fulcro-template https://github.com/fulcrologic/fulcro-template/ includes workspaces, look at it. I believe worksp. has a different namespace for F.3.
notice that nothing follows the "in" so I guess the props are nil
I don't think so. With (when-let [props (.-value data)]
it fails exactly the same way.
the rad book mentions datomic/add-datomic-env
but I can't find it in ns.
Oh there is new pathom-plugin
that replaces.
I have some nicely focused tasks in RAD if anyone has time to help. This one is just optimizing an already working thing: https://github.com/fulcrologic/fulcro-rad/issues/16
The Datomic version of this https://github.com/fulcrologic/fulcro-rad/issues/7 requires a refinement of the current save-form logic. Right now it assumes something like :account/id
means exactly that, but what we’d like to to be able to add ::attr/use-native-ids? true
(or something similar) to an identity attribute and then have :account/id
really mean :db/id
.
Also, some of the bits of this one https://github.com/fulcrologic/fulcro-rad/issues/11 are tractable. I would at least like to get the “boolean marker” option supported, and since delete is a stand-alone mutation in the state machine and database adapter it does not seem to be too much trouble, other than the resolver generators would also have to be updated to overlook things that are marked.
@ecaspary @adam622 did you guys want any of that? I know you’d said you wanted to help.
I’m attempting to implement this code: https://github.com/atlassian/react-beautiful-dnd/blob/591ff2c3f3fe96ece7223a0f7b46e3eedb68c5c6/stories/src/table/with-clone.jsx#L97 in Fulcro and am finding that it depends on React’s getSnapshotBeforeUpdate
which then creates an optional arg snapshot
in componentDidUpdate
like :componentDidUpdate (fn [this prev-props prev-state snapshot])
but my snapshot value is always nil
. Is there support in Fulcro for snapshots?
Thanks. just knowing it’s supposed to be there means I’ll look deeper into my side of things …