Questions tagged [reagent]

Reagent provides a minimalistic interface between ClojureScript and React.

It allows you to define efficient React components using nothing but plain ClojureScript functions and data, that describe your UI using a Hiccup-like syntax.

342 questions
0
votes
1 answer

What does the % character mean in the re-frame todomvc app todo-item function?

The re-frame todomvc views namespace contains a function todo-item which contains the following snippet: (when @editing [todo-edit {:class "edit" :title title :on-save #(dispatch [:save id %]) …
nilo de roock
  • 4,077
  • 4
  • 34
  • 62
0
votes
1 answer

How to code a UI with a vast ( > 1000 ) number of similar components when using Reagent?

Suppose I want to make a grid type of UI consisting of editable cells. In an OO language I would create a class for the cell, instantiate all the cells and put them on the right place with their x,y properties. Later on I might drag and drop cells…
nilo de roock
  • 4,077
  • 4
  • 34
  • 62
0
votes
1 answer

How to push changes to a Reagent component with Re-frame subscriptions and handlers?

Consider the following hypothetical, simplified clojurescript snippets: (def cat (r/atom [{:id 0 :data {:text "ROOT" :test 17} :prev nil :par nil} {:id 1 :data {:text "Objects" :test 27} :prev nil :par 0} {:id 2…
nilo de roock
  • 4,077
  • 4
  • 34
  • 62
0
votes
0 answers

reagent forms multi-select not working for list

I was following the sample code from http://yogthos.github.io/reagent-forms-example.html and was attempting the use the multi-select option for a list. (defn select-item [item] (go (reset! current-selection item) (let [response (
0
votes
1 answer

How to detect when user presses Esc in input field using Reagent

I have an input field [:input {:type "text"}] and I need to detect when user presses an Esc key while editing that field. How do I do that?
pbkhrv
  • 647
  • 4
  • 11
0
votes
2 answers

reagent-forms bind-fields ignores ':field', missing dependencies or incorrect usage?

I am not able to get reagent-forms to bind to an atom. I have data binding working in reagent elsewhere in the same file. And I can set and display the atom in question as expected. I have form-doc that returns a [:div] vector with inputs I'd like…
Will
  • 1,206
  • 9
  • 22
0
votes
1 answer

How do I curl the .jar for cljsjs/react?

I'm following the Clojurescript Quick Start, and I'm continuing to build out a clojurescript project without relying on a build tool like lein or boot to make sure I understand what is really happening. I'm at a point where I'm trying to introduce a…
RubeOnRails
  • 1,153
  • 11
  • 22
0
votes
1 answer

How to pass focus from one element to another in Reagent(Clojurescript)?

I'm trying to write reusable tag control with reagent. What I need to do is to focus input field after user clicks ancestor div element. To be more clear, I would like to set focus on input with class tag-input after user clicks div with class…
0
votes
1 answer

Why doesn't figwheel pass the compiled app to the browser?

I'm using Leiningen 2.5.2 (Java 1.8.0_45-internal Open JDK 64-bit), and the reagent-template (i.e. lein new reagent foo). This runs okay with lein figwheel as expected. Next, the first thing I do is break out the "Views" functions into separate…
bright-star
  • 6,016
  • 6
  • 42
  • 81
0
votes
1 answer

touch left / touch right events in reagent

I'm using reagent to develop a site. It's unclear to me how to work with touch events in reagent, actually, in general. I read this post clojurescript: touch events and Domina, but do i need to use domina to handle on-touch-start events with…
jdkealy
  • 4,807
  • 6
  • 34
  • 56
0
votes
1 answer

regent in clojurescript: selected value could be save in PC browser, but can't be saved in mobile browser

I am using re-frame to dev a clojurescript app. It saves the option of select. @new-feedback is the atom which will change whenever I pick up a new option. And then after click the save button, it will save the data. :on-click #(re-frame/dispatch…
Daniel Wu
  • 5,853
  • 12
  • 42
  • 93
1 2 3
22
23