Trying to make a piece of code better looking.
I have the following in Clojurescript:
(swap! app-state assoc-in [:lastresults] [])
(swap! app-state assoc-in [:error] false)
(swap! app-state assoc-in [:computing] true)
Sometimes more. Any idea on…
I have the following code and I think I am doing something fundamentally wrong.
(defn world-view [data owner opts]
(reify
om/IInitState
(init-state [_]
(om/update! data #(assoc % :world vec)))
om/IWillMount
(will-mount…
I would like to make an Om session from Clojurescript which can reply the whole GUI on another machine. How can I pass the atom from client to server so that only the changes are sent, so that the history of changes can be replayed somewhere…
I've been playing around and thinking about using React through its various abstractions in ClojureScript, Reagent, Rum, Re-frame and Om. But there's one thing that I'm not sure that either adresses, perhaps because its a separate concern depending…
I am attempting om's basic tutorial, and run into an error even before changing any code.
I followed the instructions, running lein new figwheel om-tut -- --om, cd om-tut, and lein figwheel.
http://localhost:3449/ then displays the html text, not…
I am trying to build server-side rendering for om.next (1.0.0-alpha47). At some point I have to create a reconciler from Clojure:
(om/reconciler {})
(om/reconciler
{:state (atom {})
:normalize true
:parser (om/parser {})})
However…
The Components, Identity & Normalization Om Next tutorial says to evaluate some om.next/db->tree calls at the REPL to understand normalization.
The tutorial has two components, Person and RootView. Person implements om/Ident. Calling (om/tree->db…
I'm using om as a clojurescript react interface.
One question, which I guess relates to both om and react:
Inside my html body I have a div of the id "app", which is used for om/react as a render target.
What would be a prefered way to change…
I'm coming from a javascript/react/react-router/webpack background to a clojurescript/om environment.
With webpack & react-router it was possible to split my code and only load the javascript needed. E.g. on /login I would only load the js necessary…
I'm trying to include a button group in the navbar of a ClojureScript application in which I'm using om-bootstrap, but the layout isn't coming out right --- it's like the button group is interrupting the navbar's layout flow. What I'm getting looks…
I am trying to make a tabbed windowing system within a webpage using om-bootstrap's "pills" navigation by adding tabs when links get clicked and removing tabs when an X button on the tabs is clicked.
I need to know how to add and remove data from…
When calling om/build, one can send an fn option, which according to the documentation:
`fn - a function to apply to x before invoking f.`
My question is, when applying om/transact! or om/update! to the cursor (x) that was manipulated by the fn,…
In the local-state example in the om-cookbook, I'm able to update the counter using update-state! and set-state!, but not with transact!
I initialized project using chestnut template.
(def app-state (atom {:button-presses 0}))
These work
(defn…
I am using Clojurescript Om and I need to access the underlying DOM element (so that I can set offsetTop to 0) on one of the DIVs contained in a component. How can I get access to this element?