3 ms·
I'm not sure what your complaint is about computed properties. You should either store the computed data in the reducer, compute it on the fly in render, or use
by ng12 10y ago
I'm not sure what your complaint is about computed properties. You should either store the computed data in the reducer, compute it on the fly in render, or use componentWillReceiveProps and/or setState. Your problem isn't needing to make React behave like Vue, you need to let React behave like React.
The second point I was trying to make is you don't have to do it that way in React. React is a perfectly functional framework without Redux or the "container" model. That style became popular because you're enforcing that the majority of your components are dumb [1] which is a pretty useful thing for a large project. But again, these aren't problems with React and if it's giving you this much heartburn it's worth bringing up with your team because it sounds like something's going wrong.
1. https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0 https://medium.com/@dan_abramov/smart-and-dumb-components-7c...
- scriptkiddy 10y agoThank you for the link, but I've already read that article. I realize that the way my team is doing things is not the only way. It's difficult to change the minds of people who are already set in their ways even when you're in charge. My team believes that the method which I described above is the "best practice" way of composing with react. I disagree, but I need to work with what my team is comfortable with.