Structuring your application story with sagas and selectors Rebecca Hill Software Engineer @ Usabilla @rebekaka
What is business logic? Code that applies real-world business rules.
What kinds of business logic are in the front-end? data manipulation conditionals async flow
What’s the problem with it? It’s difficult to know where to put it.
What apps are we talking about? React… and Redux
What do I need to know?
data manipulation
components
reducers
action creators / npm install redux-thunk
selectors
npm install reselect
conditionals
components
action creators / npm install redux-thunk
reducers
async flow
npm install redux-thunk
npm install redux-observable
npm install redux-saga
examples
Thanks! References/More Info http://redux.js.org/docs/faq/CodeStructure.html https://github.com/reactjs/redux/issues/1171#issuecomment-167578578 https://stackoverflow.com/questions/35667249/accessing-redux-state-in-an-action-creator http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-2/ https://github.com/reactjs/redux/issues/1400#issuecomment-184406378 https://medium.com/react-native-training/redux-4-ways-95a130da0cdc https://medium.com/@jeffbski/where-do-i-put-my-business-logic-in-a-react-redux-application-9253ef91ce1 https://github.com/joshwcomeau/key-and-pad Rebecca Hill Software Engineer at Usabilla Not-so-secretly helping JavaScript take over the world @rebekaka
Recommend
More recommend