Using Om, I've set up a component that I want to reveal when a user presses a button. The effect should be that the div slides in from the right. What is the best way to structure this in am Om project?
I can't do something hacky like:
(let [the-div…
I'm new to om.next (and to clojurescript), and I have the following question. I can only get the root component to be invoked with the reconciler (i.e. have its query method invoked); every other component seems to need to be invoked with props and…
When using om, (prior to om-next), I am getting an error when attempting to make updates outside of the render phase:
cljs.user=> (require '[om.core :as om :include-macros true])
cljs.user=> (def state (atom {:foo {:bar…
Consider the following snippet of om code:
(fn [data owner]
(reify
om/IRender
(render [_]
(dom/p nil (:text data)))))
Question: Is the "Om component" this entire snippet, or is it merely the function's return value of the…
In the Om.next wiki, there is example code like this (code listing at the bottom of the linked page):
(apply dom/ul nil
(map person list))
Since dom/ul takes a variable number of arguments, what is the benefit of using apply vs this:
(dom/ul…
I'd like to write an application in Om - a GitHub issues viewer in particular. To retrieve issues from GitHub, I'll need to XHR request them, and there'll be the action of marking issues as 'viewed' by sending a request back to GitHub.
There's quite…
Using om.next and sablono, I am trying to style a button with mdl, as seen there.
Here is what I tried in my render method :
;; This works but misses the icon
[:input {:type "submit"
:className "mdl-button mdl-js-button mdl-button--fab…
In Om Next, when having data such as:
{:table {:name "Disk Performance Table"
:data [:statistics :performance]}
:chart {:name "Combined Graph"
:data [:statistics :performance]}
:statistics {:performance…
I'm getting started with om and ClojureScript with a very simple application.
My global app-state looks like this:
(def app-state (atom {:animals [ {:name "dog" :img "pic01.jpg"}
{:name "cat" :img "pic02.jpg"}
…
I want to put debugging messages into the Om Next source. So I am wanting to include it in my own project which uses the Om Next library.
Mine and Om Next are the two sources. I have put them together (i.e. copied the Om Next namespaces across) into…
We are starting to use Clojuescript/Reagent for our next development phase of our product. Basically we need a way, to do a single operation on the atom and we came up with a method like:
(def app-state (r/atom {}))
(defn select [index]
…
I'm just experimenting with Om, learning from the basic tutorial.
My program data is in a single atom : app-state.
If I put a sequence into that atom, eg.
(defonce app-state (atom {:things [1 2 3 4]}))
Then later on, in my rendering, I can get a…
I'm attempting to use macros to generate a series of similar Om components (e.g. a modal element which contains common boilerplate and a dynamic "body").
I've got the solution below mostly working. The one exception is accessing the appropriate…
The way to style and Om component is based on how React handles styling.
It would be a horrible mess to duplicate common CSS rules all over the application so is there a way to define the styles in a function or similar?
(defn my-css [] {:border…
I have a dataset saved in a global atom (as per the typical design pattern in ClojureScript SPA's), and I know that the data is safe (I manually typed it in - its just a list of quotes that I'm rendering randomly one per pageload).
However, the…