I have a dead simple ClojureScript/Om application. It seems a little broken.
This is the core file:
(ns demo.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [goog.events :as events]
[cljs.core.async :as async…
I have a "Hello, World!" app in ClojureScript using Om (generated from the "Chestnut" lein template).
The goal is to have it set up such that:
The document.location.hash value reflects changes to the (:route app-state) vector.
The (:route…
I'm having trouble manipulating state in an Om app. Specifically, I can't figure out how to remove items from a list.
Here's a demonstration of my folly. It's a simplified app that's broken. https://gist.github.com/rerb/29d10959e71ba1e31e8e
Two…
I've a Reagent that works on all pages while clicking back & forward buttons. However, it throws an exception when a page is REFRESHED.
My app fetches data from Firebase and sets an atom. Then as the UI is rendered. The view grabs data from the atom…
In a ClojureScript/Om app, I have a DOM and a string of HTML.
How can I translate that string of HTML into elements I can insert into the DOM?
I've started down the path of parsing the HTML with hickory, planning to then process the hickory data to…
I am seeing the following error when trying to update a cursor:
Uncaught Error: No protocol method ITransact.-transact! defined for type function: function comments(){return om.core.ref_cursor.call(null,new…
I am currently experimenting with om and try to load external data for displaying it in a component.
My detail component:
(defn detail-component [app owner opts]
(reify
om/IInitState
(init-state [_]
(om/transact! app…
I would like to display the html output of the following object:
(defn search-input [_ owner]
(reify
om/IInitState
(init-state [_]
{:text nil})
om/IRenderState
(render-state [this state]
(dom/input
#js {:type…
I have a question concerning variables and passing them to class methods. I have a script OM with the class OM in it.
class OM:
def __init__( Self , Debug_Mode = False ):
print( "Initialized" )
Self.Debug_Mode = Debug_Mode
…
In Clojure (not ClojureScript), how can I check that a given component implements a protocol?
(defui MyComp
static my-protocol
(aaa [this] []))
(satisfies? my-protocol MyComp) ;; false
(satisfies? om.next.protocols/IReactChildren MyComp) ;;…
I will preface this question by saying I am still very much a novice when it comes to Clojure/Script, so besides the very pointed question I will pose any general feedback about style, usage would be greatly appreciated.
I have been building a very…
Questions
My webpage only has the output: {:user {}} with the following code.
(ns omn1.core
(:require
[om.next :as om :refer-macros [defui]]
[om.dom :as dom :refer [div]]
[goog.dom :as gdom]))
(defui MyComponent
static om/IQuery
…
I am having problems with updating state with data from input fields in Om.next.
Reading state in Om.next is solved by queries and queries enable components to implement fetching state independent of context, which is great, as that means the…
(I'm a little new to OM and React, so apologies if this is documented somewhere that I haven't seen yet.)
I'm trying to make a textbox that validates and formats its input during editing similar to the autoNumeric JS library.
My application is for…
Im sure I have read somwhere how it is possible to use the reconciler to test query expressions in Om Next directly but im not able to find the source again or figure out if this is possible based on the Om documentation. Is this possible to do so…