Fork me on GitHub
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.


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


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


… 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?


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?


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


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


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