Nate Wienert

Developer, Designer. Creator of 2u.fm, GameGum & obtvse.

Quotes from #ReactJS IRC (Flux)

Going to start clipping interesting stuff from the React IRC here for my own and any other peoples’ reference.

dve_cloud: petehunt: Im intrigued about Flux! can you spill any beans?

@petehunt: i pinged the person doing it yesterday, i would say we are a week or less away

dve_cloud: from what ive read, it sounds like it is an entirely different project, but one that fits well with react?

@petehunt: yes

@petehunt: it takes actions from the user and server and coalesces them into a consistent state

@petehunt: then presents the full view of the state to react

stevoland: petehunt: cool beans!

dve_cloud: calls to the server are partially automous then?

@petehunt: there is not very much code, it is more of an architecture

dve_cloud: autonomous*

@petehunt: you have a central event bus/emitter thing

@petehunt: and server responses or user events can put stuff into that bus

@petehunt: we have listeners called stores that listen to those events and can either dispatch server requests or call setState() on react components

@petehunt: stores are responsible for app domains (e.g. there is a photos store, messages store, etc)

dve_cloud: anything can listen events on the bus?

@petehunt: only stores

@petehunt: stores sit between the bus and the AJAX stuff, and between the bus and React

dve_cloud: so you tell the stores how to get data from the server?

@petehunt: so a react component will get a photo id and then can listen for changes to it globally and can issue mutations (i.e. “like this photo”) by dropping a message into the bus

dve_cloud: and how the stores talk to the server is upto the developer, or will be rest, or something else?

@petehunt: up to whoever is implementing the store

nickhs: petehunt: doh, for some reason I thought that was meant for inside the node, thanks!

dve_cloud: thanks petehunt

@petehunt: jingc is the expert and hangs out around here sometimes, so if you see her she’s the one to ask

dve_cloud: I was looking for her cascadiajs talk but it is nowhere to be found

dve_cloud: ill keep a look out