Questions tagged [om-next]

ClojureScript library to build rich applications that need complex data synchronized with the server (single page applications).

Om Next is a uniform yet extensible approach to building networked interactive applications. By providing a structured discipline over the management of application state, Om Next narrows the scope of incidental complexity often found in user interface development. The Om Next discipline is founded upon immutable data structures, declarative data specifications, and a simple convention for routing data access and mutations.

14 questions
6
votes
0 answers

Error: No queries exists for component path?

I'm trying out om.next, trying to extend the example given in Components, Identity & Normalization. The code in the example linked above contains of two lists that are backed by data in two different paths in the state. The example shows how the…
claj
  • 5,172
  • 2
  • 27
  • 30
4
votes
1 answer

An approach to deal with dependency resolution and optimistic updates in react applications

In an architecture where objects have many complex relationships, what are some maintainable approaches to dealing with Resolving Dependencies Optimistic Updates in react applications? For example, given this type of schema: ``` type Foo { …
Stepan Parunashvili
  • 2,627
  • 5
  • 30
  • 51
3
votes
0 answers

Updating Om-Next app state from remote response

I’m a bit confused about updating app state from remote. I’ve made a simulated a remote which responds after some delay on a modified code from https://github.com/omcljs/om/wiki/Components,-Identity-&-Normalization. I simply put random values for…
fifigyuri
  • 5,771
  • 8
  • 30
  • 50
3
votes
1 answer

Normalization and Idents in Om/Next

I’m trying to get my head around normalization and thought I was making progress, but I’ve stumbled again and am not sure if I’m just not thinking correctly about the problem. How do I normalize the current user’s messages? (def init-data …
Adam Groves
  • 1,295
  • 2
  • 8
  • 6
2
votes
1 answer

Understanding Om queries and UI composition

I've been trying to wrap my head around queries. Let's say I want a Root component with multiple table-views on it. The official tutorial suggests - one approach would be to have a table-view component with no query. And then you can pass whatever…
iLemming
  • 34,477
  • 60
  • 195
  • 309
1
vote
1 answer

How to toggle class on a dom element using clojurescript or om-next

I'm new to clojurescript and I got a task of creating a filter with toggling list items requirement on click of a plus icon. I have written css to hide when the class is inactive and show when it's active. I just want to know the correct syntax how…
1
vote
2 answers

Closing over local state in Om.Next lifecycle functions

I would like to do something similar to Reagent form-3 components, which enable me to define some shared (static) vars to use in lifecycle functions. Basically my question is how do I construct something equivalent to the let in the Reagent code…
Marc Claesen
  • 16,778
  • 6
  • 27
  • 62
1
vote
0 answers

Example application Om next

is there any small example application in On next with GraphQL backend (few pages, queries and mutations)? I'm doing presentation about Sangria (Scala GraphQL server library) and I want some frontend for it. And also I'm curious about Om for longer…
user1698641
  • 211
  • 1
  • 12
1
vote
1 answer

Resolving foreign keys in Om Next

I'm trying to understand the normalization, identity and querying concepts in Om Next. Every time I think I have it, I run into a new situation that seems to baffle me. I have a remote that returns the following data: {:users [ {:id 1, :email…
Linus
  • 1,113
  • 1
  • 8
  • 14
1
vote
1 answer

Reusing components

Can someone please help me to better understand components, queries, etc. I'm struggling with a seemingly trivial task, I need one component with parametrized query. Instances of that component need to be included in a parent component, for example…
iLemming
  • 34,477
  • 60
  • 195
  • 309
1
vote
2 answers

How do I query with a join getting all the data in Om Next?

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…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
0
votes
0 answers

Om Next Multiple Instances of the Same Component with Different Query Parameters

I'm developing a tree menu using Om Next by nesting multiple instances of the same component ((defui Tree...). I can recursively build the tree by passing different properties, so the initial rendering is fine. But, re-rendering items upon the state…
Tharaka
  • 2,883
  • 1
  • 21
  • 13
0
votes
1 answer

Global events and component's local state

So I have a component, and let's say when I click on it this should trigger a state change, e.g.: :on-click #(om/set-state! this {:activated? true}) now, what If I want to "deactivate" it when clicked anywhere on the document? I guess I could just…
iLemming
  • 34,477
  • 60
  • 195
  • 309
0
votes
1 answer

Reading Input With Om Next

I'm trying to understand how to read state from a text box in om.next. As I understand it, we are no longer bound/supposed to use core.async. As a small example, consider writing in a textbox and binding it to a paragraph element, so that the text…
clo_jur
  • 1,359
  • 1
  • 11
  • 27