This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-21
Channels
- # alda (1)
- # bangalore-clj (1)
- # beginners (7)
- # boot (88)
- # carry (2)
- # cider (8)
- # cljs-dev (60)
- # cljsjs (2)
- # cljsrn (45)
- # clojure (255)
- # clojure-belgium (5)
- # clojure-boston (1)
- # clojure-dusseldorf (3)
- # clojure-greece (49)
- # clojure-italy (10)
- # clojure-russia (30)
- # clojure-spec (78)
- # clojure-uk (11)
- # clojurebridge (1)
- # clojurescript (80)
- # cursive (14)
- # datomic (33)
- # defnpodcast (4)
- # devcards (2)
- # dirac (15)
- # editors (23)
- # emacs (5)
- # events (11)
- # funcool (1)
- # hoplon (1)
- # juxt (1)
- # luminus (2)
- # mount (7)
- # off-topic (15)
- # om (152)
- # om-next (2)
- # onyx (17)
- # parinfer (1)
- # proton (38)
- # re-frame (35)
- # reagent (110)
- # rum (3)
- # spacemacs (3)
- # specter (51)
- # test-check (2)
- # testing (5)
- # untangled (234)
The more I think about it, the more I think I don't understand how Om Next is supposed to work…
Am I correct in thinking that idents in the app state are meant to be an implementation detail of normalization?
Actually, the more I think about it, the more I realize there's less "supposed to" than i expected. 🙂
Is there a way to clear/reset om's history? When a user logs out of the app I want to make sure I reset the application state.
make a mutation that resets the app-state, perhaps on componentWillUnmount? or logout :onClick ?
hlolli updating the app state I can do. Looks like clearing the history in the reconciler should be pretty straightforward, too.
That is, it's not based on the rendered tree, it's based on the tree of who builds which components
So if you build a component and build a second component you pass into the first, you're the Om parent of each
wrapping my head around om.next. Is the parser a combination of redux’s selectors and reducers? Specifically mutate fn = reducer and read fn = selector? or are they fundamentally different?
i suppose the queries are much more flexible than selectors and are co-located in the component. but transact! seems similar to dispatch
however yes there is of course some conceptual overlap with Redux due to the functional approach
@peeja it is based on the render tree as that’s the way we propagate that information - it’s possible we could do it via the React context stuff, but I haven’t looked into that
So, if A builds B and C, passing C into B and returning B from its render
, and then B wraps C in a div, who's the parent of C?
From what you're saying and from the code I'm reading, my understanding is that A is the parent of C. Is that correct?
Okay: I have old Om components and Om Next components. I need them to render each other sometimes. I also have native React components occasionally, and a bunch of functions which pretend to be components but are just functions that return React elements. I need to make sure I'm not screwing this up.
if there’s a way to thread the relationship via some other means more realiable in React then I’m open to the idea
I'm specifically not asking you to think through all of that for me, I'm trying to respect your time by asking a very straightforward question to validate my own conclusions.
I'm not saying that what Om does is wrong, I'm just clarifying that it represents what React refers to as "ownership", while React's notion of "parenthood" is based on the DOM tree.
I'm not saying React's ownership changes, I'm saying that Om calls something "parent" which corresponds to React's notion of "owner" and not to React's notion of "parent".
Because I have to muck with Om internals to get the parent chain to work properly here, and I want to make sure I'm doing the right thing.
I have to capture the correct dynamic vars when building an om.core component, keep them in the shared map, and then rebind them when I start rendering om.next components again.
happy to see someone work on that - at first glance I don’t see how it could cause any real problems
So there should be a correct chain from me to the Person that doesn't care about the Card component at all
I mean, you could have a B with a query, but it would have to be independent of C's query anyway, right?
I see what you're saying. I'd love to see a use case someday to validate its utility, but I get what you mean.