slorber / scalable-frontend-with-elm-or-redux

An attempt to make Redux and Elm applications scale
http://sebastienlorber.com/
MIT License
361 stars 29 forks source link

Store actions, reducers inside the component #27

Open sibelius opened 8 years ago

sibelius commented 8 years ago

@ericvicenti presented Native Navigation for Every Platform at ReactEurope 2016 (https://www.youtube.com/watch?v=dOSwHABLvdM)

He proposes a structure that makes possible to move a component (ChatApp in his example) to another application without changes of code (neither navigation code nor reducers/actions)

The code is here: https://github.com/ericvicenti/rn-sample

He stores the reduce and actions inside the component (https://github.com/ericvicenti/rn-sample/blob/master/ChatApp.js) so it makes it possible to move it to another place without conflicts with other actions

slorber commented 8 years ago

thanks didn't know, will take a look at that.

Colocating component / reducer / actions seems quite similar to the Elm architecture and many proposals in this repository btw

sibelius commented 7 years ago

these two packages can really help

https://github.com/threepointone/redux-react-local https://github.com/threepointone/react-redux-saga

@threepointone is doing a great job