Fork me on GitHub
#reagent
<
2016-05-07
>
bojan.matic08:05:54

reading reagent docs and looking at the example components - this looks angular-y to me, e.g. 2-way data-binding with magic re-renders

bojan.matic08:05:11

isn’t this a rabbit hole that can easily lead to complicated to reason about code?

bojan.matic08:05:35

am I simply wrong here in my observation?

sjol08:05:54

@bojan.matic: Can you provide a specific example?

bojan.matic08:05:06

this does not look like a unidirectional data flow, it looks like a 2-way data bind

sjol08:05:22

well it's only two way upon user interaction

bojan.matic08:05:57

what seems to be emerging as a better ui architecture is to have strictly one-way flow with events being dispatched (redux in reactjs, elm architecture, cycle.js (though this one is a bit different))

sjol08:05:13

if you look at the re-frame docs https://github.com/Day8/re-frame/wiki/Using-Handler-Middleware they propose something you may prefer

sjol08:05:53

but most of the examples are intended to be concise and digestible, so the :on-change should be as proposed in the re-frame doc but you can get away with just a simple rest! or swap!, it's doing reset! or swap! in your atom-input or shared-state that will make you loose all benefits

sjol08:05:20

as they may be called multiple times by the render functions

sjol08:05:19

does that help?

bojan.matic08:05:10

I’m looking into re-frame

mihaelkonjevic10:05:07

@bojan.matic: Keechma is another alternative - with no global state http://keechma.com/

mihaelkonjevic10:05:32

it also uses reagent for the rendering layer

bojan.matic10:05:49

i saw keechma too, thanks

bojan.matic10:05:56

i’ll look into it in more detail

bojan.matic10:05:59

are you the author?

bojan.matic10:05:34

does keechma do unidirectional data?

bojan.matic10:05:21

i’m looking for a fractal architecture, as described here: http://staltz.com/unidirectional-user-interface-architectures.html

mihaelkonjevic10:05:24

yes, data down, commands up, here are some diagrams http://keechma.com/01-introduction.html

mihaelkonjevic10:05:47

I’m also working on the forms lib (https://github.com/keechma/forms - should be released next week) which solves the data collection in forms before it gets committed upstream (to controllers)

bhauman13:05:27

Just did a Devcards release [devcards "0.2.1-7"] with fixes for Reagent

bhauman13:05:56

its been a long time coming, sorry for the delay

roberto21:05:54

I just completed the migration of an app from re-frame to keechma. I'm very happy with the outcome.

roberto21:05:38

having an EDB is pretty nice.

gadfly36121:05:14

Sounds like a blogpost ;)

roberto21:05:26

and a central description of the application, similar to component, is also very helpful.

roberto21:05:57

everytime I started working on the project, the first file I’d open is the one that describes the dependencies.

roberto21:05:18

with re-frame, it got a bit difficult to figure out where things were going after a while.

roberto21:05:27

yeah, I might right a series of blog posts, but first I have to put this in production. simple_smile

adamkowalski22:05:15

Are there any resources for learning about how to incorporate npm react components with reagent?

adamkowalski22:05:26

do you use browserify + npm?