This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-30
Channels
- # announcements (6)
- # bangalore-clj (1)
- # beginners (169)
- # boot (8)
- # calva (20)
- # cider (32)
- # clj-kondo (78)
- # cljdoc (42)
- # cljs-dev (4)
- # clojure (126)
- # clojure-china (35)
- # clojure-dev (5)
- # clojure-europe (3)
- # clojure-italy (40)
- # clojure-nl (15)
- # clojure-portugal (1)
- # clojure-spec (4)
- # clojure-uk (67)
- # clojurescript (89)
- # community-development (2)
- # core-async (34)
- # cursive (46)
- # datomic (14)
- # dirac (1)
- # duct (8)
- # emacs (11)
- # events (5)
- # fulcro (21)
- # jackdaw (14)
- # jobs-discuss (6)
- # off-topic (37)
- # pedestal (24)
- # perun (1)
- # quil (3)
- # reagent (27)
- # reitit (1)
- # remote-jobs (1)
- # shadow-cljs (47)
- # sql (1)
- # vim (9)
- # yada (1)
Are there any modal examples for Fulcro? Was thinking about making a global modal that has some root level ui/
app-state entry
I use material-ui and modals are just a component that can be used at any level of the app.
@njj there's a modal working with ui state machine in fulcro3-template https://github.com/fulcrologic/fulcro3-template/search?q=modal&unscoped_q=modal
is there a way in fulcro to get the instance of a component that is currently being rendered ( i have the ident for it but not sure where to look )
it is an odd use case i will grant you
Q: I sometimes use this snippet to query for something in the DB from within a transaction:
(-> [{ident query}]
(prim/db->tree state-map state-map)
(get-in [ident]))
Is there a way in which I can query all entries in a Fulcro DB "table" at once, currently i loop over a manually created collection of idents using the snippet above.Is it possible to pass the same this
into a prim/factory to a child from a parent? Or should I just use a regular defn
and pass this
as an arg?
You can do the latter. You should never pass this
to prim/factory
…it takes classes. If you mean “can you pass this
as a prop to a factory?“, the answer is “only as computed data”.
factories of Fulcro classes expect to be passed props that are generated from the query
You can do both ways, but usually you don't need this
, you need #(some-thing-with this)
I’ve made good progress on a tool that can help with porting F2 to F3. Right now it is a general tool that I have not finished, but it currently does most of everything needed to make it possible to set up something to automate porting, and is meant to be a “better sed” for fixing clj/cljs/cljc files. Would appreciate feedback. The README is up-to-date, and it should generally work as described. More to come 🙂 https://github.com/fulcrologic/porting-tool
I’ve decided to switch over to rewrite-clj
for the file handling on this…so there’s a bit of rewrite work to do. The plain reader handling of files is insufficient for our purposes. Rewrite-clj will allow me to preserve whitespace, comments, etc. without have to basically customize the reader through hacks.
Fulcro has indexes of every component on-screen by class, ident, and keywords that they query for.
class->any
, class->all
, ref->components
, ref->any
, and key->components
(this latter one is in the protocol, but has no prim
wrapper)
technically ref->components
directly uses key->components
in F2, so it will work for kws, but you should not trust that F3 will preserve that, since it is semantically incorrect.
@thomasmoerman RTM: http://book.fulcrologic.com/#_link_queries realize that tables are jsut top-level (entries in the root node), so you can use link queries…then you can use vals
on the map you get back. oh…you mean within a mutation. No, if you need denormalized data you have to run db->tree
yourself. Fulcro has no idea “which view” to denormalize against…there could be many diff components that “share” idents but have diff queries against that data. You might consider passing the data to the mutation as a param, since the UI will have the denormalized data.
Thanks. The issue in my app is that there is a circularity in the data model which makes some UI queries impossible (I think), or at least difficult to design. That's why I need a non-trivial query in one of my mutations to connect the dots.