Fork me on GitHub
#re-frame
<
2018-02-18
>
Vincent Cantin00:02:51

@mattsfrey: You may try my approach : instantiate 3 different templates and compose from the best (or most up-to-date) part of them: - lein new figwheel myFigwheel - lein new re-frame myReframe - use chestnut I don't know about Luminus.

mikethompson00:02:42

Luminus is a very strong option, and it supports re-frame

Henry18:02:19

Alohaa, another question for Reframe. How do I access a value in the state just once, without subscribing to it? Is this possible or is it totally the wrong approach? For example I have a list of Users in the State which I want to go through in the frontend, to see if it contains a certain value. I just want to do that once when I press a button for example, without rerendering everything. similar way in React would be “MapStateToProps” and the i can access them easily

Henry19:02:25

… Or how can I do an if-statement in reg-event-db so I can update the state if value is not contained in vector?

gklijs20:02:38

You have lots of options. You could have something like an add-value event, and just return the current db if it's already present?

Henry20:02:07

@gklijs just figured the mistake i made was because the if statement was always false and i didn’t return db ^^

Henry20:02:26

New to clojure .. it’s twisting my mind 😄

gklijs20:02:59

It's re-frame specific, most times it's fine to return an implicit nil, but not with event handlers in re-frame.