3 ms·
> We also saw no real value in strictly splitting up actions, action creators and reducers among multiple files. We simply put actions, action creators and redu
by jbreckmckye 9y ago
> We also saw no real value in strictly splitting up actions, action creators and reducers among multiple files. We simply put actions, action creators and reducers that belong together in a single file.
I think that's a much more pragmatic approach for smaller applications.
- simon83 9y agoI knew this would trigger a remark ;) I'm absolutely aware of the importance of separation of concerns. And our SPA is not small. I just became less dogmatic about it. We all have been taught how important it is to separate HTML/CSS/JS, but then came React along and put HTML into JS, many people were outraged, including me. I thought I'd never use that crap that violates basic principles of software design, but here I am and I'm loving it. In the context of UI it makes sense to me. Same with Redux. Could you please give me an example in which cases you think it could become problematic to have actions, action creators and reducers in a single file? In an application that is not small?