Questions tagged [om]

A ClojureScript interface to Facebook's React.

om allows their users to represent data as Extensible Data Notation (EDN).


Documentation

138 questions
42
votes
2 answers

Om but in javascript

I'm getting to be a fan of David Nolen's Om library. I want to build a not-too-big web app in our team, but I cannot really convince my teammates to switch to ClojureScript. Is there a way I can use the principles used in om but building the app in…
Cotten
  • 7,859
  • 17
  • 54
  • 90
36
votes
1 answer

What is the difference between application state and component local state in Clojurescript Om?

I have gone through David Nolen's basic Om tutorial but I am still a bit confused about the difference between application state and component local state. When cursors are referred to is it referring to one or both of these too?
yazz.com
  • 52,748
  • 62
  • 227
  • 363
20
votes
1 answer

ClojureScript, Om and Core.async: How to handle events properly

I have had a look at using Om for rich client website design. This also is my first time using core.async. Reading the tutorial https://github.com/swannodette/om/wiki/Basic-Tutorial I have seen the usage of a core.async channel to handle the delete…
wirrbel
  • 2,859
  • 2
  • 19
  • 43
11
votes
1 answer

use predefine react component from reagent?

I have some external UI with abstraction of react components and I want to reuse them from reagent, is there any way to directly render predefined react component just by passing data from clojurescript. I am a clojurescript beginner.
piyushmandovra
  • 3,673
  • 2
  • 17
  • 29
10
votes
2 answers

Creating animations with Clojurescript Om

I've been looking around for how to create animations in Om, I've tried creating a RaphaelJs component with moderate success. I get the animation I want, but for some reason Om renders multiple instances of the SVG element. Looking at the animation…
toofarsideways
  • 3,766
  • 2
  • 27
  • 48
9
votes
2 answers

Confused about React's Flux architecture - waitFor

I have my own opiniated way on how to use React and am building my own framework, inspired by Om. I am implementing something a bit similar to the Flux architecture, with stores that can update themselves on some events. What I am not sure to…
Sebastien Lorber
  • 79,294
  • 59
  • 260
  • 386
8
votes
1 answer

How to properly (unit) test Om/React components?

I have developed Om/React components, but I feel really uncomfortable not being able to drive my development with unit tests. I have tried to setup my clojurescript project to run unit tests on those components, and so far reached the point where I…
insitu
  • 3,814
  • 3
  • 19
  • 34
8
votes
2 answers

Using bootstrap dropdown with Om

This is what I have: (defn view [cursor owner] (reify om/IDidMount (did-mount [_] (-> (js/$ ".dropdown-toggle") (.dropdown))) om/IRender (render [_] (dom/div #js {:className "dropdown"} …
roboli
  • 1,220
  • 16
  • 24
8
votes
2 answers

OM Components vs plain functions

I am going through this OM tutorial but it's not clear to me when to use OM components vs plain functions (in particular the om/component macro). The tutorial writes: The first argument is a function that takes the application state data and the…
shaft
  • 1,958
  • 1
  • 20
  • 33
7
votes
1 answer

How to filter a list based on user input with ClojureScript and Om?

I just started to use Om (a reactjs based library for ClojureScript). I would like to filter a list based on user input. The following works but the solution seems to be to complicated. Is there a better one ? (ns om-tut.core (:require-macros…
rogergl
  • 2,993
  • 2
  • 22
  • 46
7
votes
3 answers

How to inspect om objects?

I've been following the om tutorial. Im using Light Table to setup an External Browser connection. Additionally, in my clojurescript code I'm calling (enable-console-print!) to send my println statements to the browser console. The problem is that…
sthomps
  • 3,458
  • 6
  • 29
  • 50
6
votes
3 answers

How to do modal dialogs with Om or Reagent (and Bootstrap)

I wonder how showing and hiding of a modal dialog should be implemented with Om or Reagent. Since my UI is a function on the state, the show/hide should be triggered by a property in this state. But frameworks like Bootstrap require to call some…
Witek
  • 5,670
  • 7
  • 39
  • 59
6
votes
2 answers

Om Next's query->ast and ast->query functions

According to Om Next's documentation: query->ast (om.next/query->ast '[(:foo {:bar 1})]) Given a query expression return the AST. ast->query (om.next/ast->query ast) Given a query expression AST, unparse it into a query expression. Question: Why…
George
  • 5,909
  • 2
  • 24
  • 53
6
votes
1 answer

Using inline style string with ClojureScript, Om, and React.js

I want to use this Om snippet in my ClojureScript application: (dom/img #js {:className "img-circle" :src "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" :style "width: 140px; height…
David J.
  • 28,507
  • 20
  • 108
  • 162
6
votes
1 answer

core.async pub/sub behaves odd in Om (clojurescript)

Why is the counter in the child component updating fine when I comment (om/update-state! owner :clicked not) and not when I uncomment it in the parent component in the code below? The counter is updated by clicking the button. What I'm trying to…
Michiel Borkent
  • 31,814
  • 15
  • 78
  • 134
1
2 3
9 10