This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-25
Channels
- # announcements (1)
- # beginners (338)
- # calva (41)
- # cider (19)
- # cljdoc (10)
- # cljsrn (6)
- # clojure (116)
- # clojure-europe (15)
- # clojure-italy (25)
- # clojure-nl (5)
- # clojure-spec (19)
- # clojure-uk (52)
- # clojurescript (99)
- # clojurex (14)
- # cursive (47)
- # data-science (1)
- # datomic (5)
- # duct (1)
- # figwheel (13)
- # fulcro (58)
- # graalvm (93)
- # jobs (3)
- # joker (9)
- # luminus (4)
- # nrepl (21)
- # off-topic (41)
- # pathom (25)
- # re-frame (7)
- # reitit (8)
- # ring-swagger (13)
- # tools-deps (13)
I'm trying to get a modal working from react-modal
(https://github.com/reactjs/react-modal), but when I set up a workspace defcard
, I get an Invalid join, {:ui/root nil}
error. Google brought back nothing on that. I can post some of the code, but even a hint of what that error might mean would help.
The card shows up in the workspace UI, but fails to mount. Here's the stacktrace:
"Error: Invalid join, {:ui/root nil}
at new cljs$core$ExceptionInfo ()
at Function.cljs$core$IFn$_invoke$arity$3 ()
at Function.cljs$core$IFn$_invoke$arity$2 ()
at
at Object.fulcro$client$impl$parser$join__GT_ast [as join__GT_ast] ()
at Object.fulcro$client$impl$parser$expr__GT_ast [as expr__GT_ast] ()
at fulcro$client$impl$parser$parser_$_self_$_step ()
at
at
at Object.cljs$core$IReduce$_reduce$arity$3 ()"
I don’t know whether this could be related, but modals tend to use react portals, which are rendered elsewhere in the real dom than that they are rendered in the virtual: https://reactjs.org/docs/portals.html
I have a weird situation in Fulcro Inspect where the State after of my last transaction doesn't match with the DB. Could anyone take a guess at what could be causing that?
I have a few elements that mysteriously (at least to me) got removed from my DB. I can confirm that with the history slider. But when I try to use the transaction view to debug it, I can't find it there.
Doesn't post-mutations show up in the Transactions tab? I found the mysterious change and it was done in a post mutation step, which I can't seem to find any traces of in the Transactions tab.
Wow we are just playing with Ghostwheel, How do people us this in Fulcro components? Would be pretty cool if you could just add ^::g/trace
to a component to quickly see all the bindings
@robert.mather.rmm The error message means your join is invalid 😜 On your query. You have something in your root after [{:ui/root HERE}]
that is returning nil.
@maxt Inspect is a chrome extension. It does not have access to your db. The client-preload watches the state atom and sends deltas to the extension (for speed). The diff algorithm is optimized for Fulcro normalized dbs, and also the data has to be serializable, or it just sends a placeholder for it. All sorts of things “could be” going wrong.
On post mutations: don’t remember…would have to look at the source. Most likely not: post mutations in F2 are a hack internally and not real mutations.
I don’t remember at the moment how I’ve addressed that in F3…pretty sure post mutations are real mutations there, with full support for everything (including remotes), which they cannot manage in 2
@mitchelkuijpers I personally use gw all over the place, but not in components…what would you like there? I personally have not even tried the tracing, because I mostly wanted it for consistent control of instrumentation and shorter notation. Be interested in your thoughts for F3. Are you suggesting the trace affect render
?
Yes that is exactly what I mean
I just tried it out for a function and it is very handy to quickly spot bugs
But we just started using it last week, and the automatic outstrument is extremely usefull during development
Ah that sucks, is it solvable?
Yeah that can take a lot of time
Ah yeah probably not
it looks at all the bindings in scope in a function
So that would make it really tough to use then
Not sure if it's pluggable somehow
(render [this] (let [props (prim/props this) ...] ...))
is what render looks like for real
Ah that might work
Not sure if it's pluggable, and or usefull enough
But maybe first try trace out, it is really handy
Sorry gotta go but will look at it, and think about it some more
It might work, it can also trace anonymous functions
I will thnx!
So I played around and ran into a problem that Fulcro uses a 0.4.0-SNAPSHOT and there is no artifact for ghostwheel.tracer
with the same version and 0.3.9
seems to not be compatible.
But I found out that there is this macro in ghostwheel:
https://cljdoc.org/d/gnl/ghostwheel/0.3.9/api/ghostwheel.core#%7C%3E
And we could make a Option for Component where you can give it ::g/trace 3
and it wraps the render code inside of |>
. Would you take a PR for that?
Btw the codebase in Fulcro3 feels very simple when compared with Fulcro2
Sorry, I never responded to your question. The answer is “conditionally yes”:
- The change has to be supported by his stubs library so it is elided when disabled.
In fact, you can already do that as a “library concern” in Fulcro 3…see render-middleware
option of app/fulcro-app
.
Ah cool, will look at both options
But first I have to find a ghostwheel.trace 0.4.0-SNAPSHOT
But I cannot find a repository for it..
yeah, I don’t use trace (yet)…I needed 0.4.0 to get gw/>def
, which allows me to easily elide specs when I elide ghostwheel.
Yeah I found that in the commit history, that is interesting
That is also very nice to create UI component specs for dev
I’m having to cut down how much I maintain. A lot of ancillary things like that are not of personal importance to my use of Fulcro…community maintenance will be required for such things
I do think that once a project has that initial push by the lead dev, it should be the entire community who takes up the task of maintaining and updating the ecosystem.
I do think that once a project has that initial push by the lead dev, it should be the entire community who takes up the task of maintaining and updating the ecosystem.