This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-30
Channels
- # babashka (46)
- # beginners (234)
- # bristol-clojurians (4)
- # cider (7)
- # clj-kondo (39)
- # cljdoc (8)
- # cljs-dev (10)
- # cljsjs (10)
- # cljsrn (24)
- # clojure (84)
- # clojure-brasil (7)
- # clojure-europe (12)
- # clojure-germany (4)
- # clojure-italy (3)
- # clojure-nl (41)
- # clojure-spec (17)
- # clojure-uk (66)
- # clojurescript (64)
- # conjure (161)
- # cursive (12)
- # data-science (45)
- # datomic (20)
- # devops (11)
- # docker (2)
- # duct (9)
- # events (7)
- # figwheel (1)
- # figwheel-main (20)
- # fulcro (32)
- # graalvm (5)
- # helix (82)
- # jackdaw (9)
- # jobs-discuss (19)
- # kaocha (11)
- # local-first-clojure (1)
- # malli (6)
- # meander (3)
- # nrepl (12)
- # off-topic (2)
- # other-lisps (15)
- # pathom (14)
- # rdf (6)
- # re-frame (8)
- # reactive (1)
- # reagent (5)
- # reitit (4)
- # rum (3)
- # shadow-cljs (77)
- # spacemacs (3)
- # sql (9)
- # test-check (31)
- # tools-deps (13)
- # vim (62)
- # xtdb (18)
I’m a little more familiar with SQL than graphing. The sample:
(fdn/db->tree [{:friends [:list/label]}] (comp/get-initial-state app.ui/Root {}) {})
Is kind of like?
SELECT label FROM (SELECT friends FROM state) list
i think that's a fair comparison. the other piece is that in fulcro you'll get back a tree of data (nested maps) instead of a table with foreign keys that you'd have to turn into a tree with the sql
i suppose you could think of it like that, but eventually the comparisons run out because it's a different paradigm. it's a graph db, some similar ideas are things like http://neo4j.com
Fair enough, will just have to let go of the comparisons and treat it as something new.
in the fulcro 3 docs for mutations it says this
but Fulcro 3 includes a way to declare them so that they auto-quote themselves for convenience
does this mean we no longer have to use (declare-mutation blah `blah) anymore ? I think it does
you don't need to quote them if there are no circular dependencies (mostly would happen with a component that uses the mutation and a mutation that uses a component ns) http://book.fulcrologic.com/#_using_defmutation that section has the info on a mutation now returning itself as a list when call as a function
gotcha .. @danvingo thanks .. i read that and was just confused a bit but happy to do longer have to use that declare-mutation anymore
I am trying to use the external react component ‘material-table’ in my app, but I am getting the following error:
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Here is a summary of how I am using it:
(:require ["material-table" :refer [MaterialTable]])
...
(def mtable (interop/react-factory MaterialTable))
...
(mtable ...)
For testing purpose, I have also tried to import a VictoryChart component as shown in the Fulcro book and that works.
What am I doing wrong with material-table?Yes, it fixed it. Thank you very much @UH9091BLY.
are there any best practices for encoding errors from server responses? Specifically for validation and auth sort of concerns - do you just come up with a well-known key in your all your server responses :server/message :server/error or something and then pull that out of the :result of the env? It would be great to use returning
but then you'd need every component to know about the server interaction field
i think this has what i'm looking for http://book.fulcrologic.com/#_demo_of_mutation_joins
:workspaces {:target :browser
:modules {:main {:entries [app.demo-ws] :init-fn app.demo-ws/main}}
:ns-regexp "-(test|ws)$"
:output-dir "resources/public/workspaces/js"
:asset-path "/workspaces/js"
:devtools {:preloads [com.fulcrologic.fulcro.inspect.preload]
:http-root "resources/public/workspaces"
:http-port 8023
:http-resource-root "."}}
but for me, the build was failing completely, so i'm not sure you're having the same issue
The key for root is wrong
You are using
::f.portal/root
it should be:
::ct.fulcro/root
@U4VT24ZM3 Updated to ct.fulcro and still not loading the card
@grierson hello, are you requiring the file? you can use the workspaces target to automatically load, otherwise you have to require the namespaces yourself