Fork me on GitHub

@kendall.buchanan: I dont think so . Om clojurescript wrapper does have some special variables and lifecycle that only exist in om, it wouldn't work fine with reactjs.


@cky: welcome 😄


@isak: it depends on the exact scenario, but it'll mostly work. e.g. the [(redirect-to-dashboard!)] has some logic: is an authenticated user in the state (w/ response merged in) ? if so, redirect... else set an error-marker in the state that will render the corresponding forms dirty. The error-part is handled with another mutation...


The nice thing about Om.Next is you have full control over everything.


i need to reset a form after a user hits submit. i thought this would work: (om/set-state! c (.initLocalState c)) but it doesn't clear the form, and causes an error on subsequent form edits: No protocol method IAssociative.-assoc defined for type object: [object Object] is there a better way?


@iwankaramazow: interesting, ty for the details


apparently the response of a remote mutations is merged into app state under mutation-key / :result. do i need to write a custom merge in order to merge it into some other known coordinates in the state tree?


@nxqd: Thanks for the response. If I wanted to mix two projects, might it be best for me to simply mount Om in a DOM element somewhere, and manage it separately?


I’m still getting my head around how this all works; when I call! from the render function of the component on which I’m setting the query, I get the following error: Uncaught #error {:message "No queries exist for component path ( rootns.ui/App-Header rootns.ui/Login-Component)", :data {:type}}


I’m invoking it as: (om/set-query! this {:params {:user-id userid}})


Is there something wrong with my query or how I’m trying to set the params?


Ok - sorry; looks like this is nothing to do with set-query, it’s happening even after I took set-query out.


@mattyulrich: are you messing with results from om/get-query anywhere? you may be losing the meta information that is needed by om


or do you have one component that is just taking the query from another component?