Fork me on GitHub

@mss you don’t need read-local. That is a hook for ppl that want to do advanced parsing.


Please refer to the youtube videos, dev guide, and getting started guide. Don’t assume anything about Om Next….follow the guides and you’ll see it is much much simpler than you’re making it 🙂


In fact, Fulcro 2.0 will be dropping Om Next as a dependency.


still 1.0 compatible, but with simplified internals that also support some things Om Next can’t currently do


this may be a dumb question, but the fulcro lein template project puts all components into CLJC files. If I don't use SSR, do I need them to be CLJC?


@roklenarcic cljs should work perfectly, no point if you dont have ssr and are not planning to add it later :)


@tony.kay In fulcro v2 will having a component (defui) just for querying on the server still be a valid pattern (think there is also something like this in one of the videos) ?


(defui ^:once ArticleSearchQuery
  static om/IQuery
  (query [this] [:has-more?
                       {:article (om/get-query ArticleListingEl)}]))


thanks claudiu, I was tired of wrapping client specific things in conditional readers


is that an affirmation or a question?


@roklenarcic ahh yep I have ssr for my projects, can get a bit annoying but really like the end result, the user experience is a lot nicer. 🙂 Think it's a big plus for fulcro since in re-frame for example can't really do it (a few articles about re-frame and nashorn but looked really painful get even simple stuff working )


@claudiu none of the patterns change…just new stuff, and a few renames of namespaces to adopt the necessary Om stuff into Fulcro.


@roklenarcic That is correct, just use cljs…For that matter, Nashorn-based SSR will do a better job if you use external js libs…clj/cljs-based SSR is just simpler and faster


ahh ok, remembering something about components that don't have ident 🙂 that's why I asked.


if you want it to normalize, you need idents


so, your example would need ArticleListingEl to have an ident


if you want it normalized


ahh ok got it now 🙂


auto-normalization is all about the idents 🙂


Feels a bit strange to have a defui just for generating query. If it's a valid common pattern, could this be turned into a macro in fulcro 2.0 ?


Also in fulcro 2.0 could the defui be with the :once metadata ? 🙂 think somebody said that they do that importing there defui insted of the om-next one 🙂


I need to read up on SSR, I don't even know how it works conceptually for SPAs


Well basically you only see it in action when you first enter the website and when you refresh. 🙂


If I want to add modal closing to the end of a successful forms/commit-to-entity!, how would I do it?


do I just another transact call to the button handler?


Hm, objects returned by factories return false for om/component????


think so since factory creates a react class or something like that 🙂


what is component then, other than this in some functions?


I'm trying to commit something that is not this.


not exactly sure about the internals. What do you mean by commit something that is not this ?


I have a Save button. Form is defined by a subcomponent. I am pretty sure I need to commit with that subcomponent in the call


and this isn't the only case. I would like to know in general, what is a component conceptually, except this in various protocol functions


Think tony can answer that one. As far as I know, transact needs a this for: get-app-db & to know what component to re-render. I usually send actions from the parent (with it's this). If it's from the child and the parent needs to be refreshed, think fallow on reads is the way to get it working.


@roklenarcic @tony.kay Might be wrong. Also curious about this one 🙂 As far as I know, component is fulcro/om-next stuff with ident, query etc.. the factory generated one is just a plain react class used for rendering that does not know about fulcro/om-next and that I can basically just drop it with props standalone wherever you need it in.


@claudiu Yes on the ^:once….no need to not have that. We could make an alias for it, but defui is sufficient, so it would just be one more thing to think about.


defui generates a React class. The factory generates a React Element. See the react docs


some operations won’t work until the thing has been mounted on the DOM


The reconciler is technically what is needed, and it is “added in” as the tree renders via a dynamic binding. So, you cannot just call the factory.


when you transact you can use a component (mounted) or the reconciler. Which you use changes what gets refreshed in the UI


reconciler -> root, this -> the component sub-tree


ahh cool 🙂 got it, thank you (a bit confused since jsx did that, thought it was something special)


yep. defui is sufficient, was thinking about the aliasing since I usually feel like I'm bending the rules. Might be because I associate defui with something being rendered 🙂


i'm following along with the videos and fulcro template. When i start the figwheel with -Ddev i don't get a clojurescript repl. I had to remove it from the dev test cards runtime config


@tony.kay one thing that I miss in currently is a formal/shared spec for the query syntax, to use when spec query things, do you think fulcro 2.0 could be a good place to have that?


I'm asking because I was thinking on writing that in Pathom, but I feel like it should be more downstream