Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Redux is a predictable state container for
that behave consistently, run in different
environments (client, server, and native), and are
easy to test. On top of that, it provides a great
developer experience, such as live code editing
combined with a time traveling debugger.
Predictable state container? Yes
Run in different environments (client, server, and
native)? Yes, on client and server. Not yet as you
might expect on mobile and native
Great developer experience? Yes, if you can
become familiar with ES6, WebPack, Babel, npm
Live code editing is great, if you configure
WebPack with CSS Modules
Time traveling debugger … hmm … not really
What’s important? Your SPA app keeps its state
while you do component modifications.
Welcome to Functional Programming approach!
Cancelling Promises, server-side (isomorphic) rendering with async calls
#1 Async programming
Research why libraries like superagent-bluebird-promise exists
Redux on the Server
Be aware of dom mutations from libraries like D3 or jQuery
#2 Dom mutations
Wrap and isolate side effects.
Review D3 chart css and js code
two-way binding problem
#3 Working with url bar
If possible, avoid using react routing, rackt history, etc
Do you really need to put all app functionality in one SPA?
Can you separate user account management from main app?
componentDidMount might causing ad-hoc effects
as it dispatch actions in order to get the app to start
#4 Piggybacking componentDidMount
Generate data on server-side, not in reducer after firing from
React/Redux community claims to be functional ...
OOP, classes, callbacks, etc are commonplace ...
#5 Imperative side-effects
Study Functional Programming in ES6
Google more about JS data structures, Immutable.js …
Be aware it’s hard to get rid of old habits.
Ramda.js source code and test are great for learning. Lodash has it all!