Open clhenrick opened 8 years ago
I thought about integrating Thunk (via react-redux
), but stopped short in favor of keeping the template minimal. If this seems like something we'll almost always want in Stamen projects, we should add it.
(I'd be interested in hearing/seeing more about how Redux middleware is used in general, and how Stamen projects in particular would use it. Don't know much yet.)
I haven't spent enough time with Thunk (or Redux middleware in general) to have an opinion yet.
I'm slowly coming to terms with Promises, particularly as they're the foundation for async
syntax, though I still dislike the .then(...)
syntax and flow.
We used Promises very heavily in Flickr's rewritten FE stack. I'm very comfortable with them and, with the exception of the difficulty of canceling them (which I rarely-to-never actually had to do), happy with them. My 2¢.
For AJAX I believe @mojodna and @sconnelley both prefer Thunk. I've also used redux-promise.
I found logging state to be helpful when developing, also part of middleware. For example: https://github.com/stamen/bestschoolday/blob/master/app/src/state/store.js#L10-L13