4 ms·
Actually my major complaint of React is the state of state. There seems to be no common knowledge about how to do this right. I just joined a team that has two
by coding123 9y ago
Actually my major complaint of React is the state of state. There seems to be no common knowledge about how to do this right. I just joined a team that has two React projects that development started about two months ago (I just joined like a week ago). There is a a large component that I am working on that is completely bound to Redux. There are major state update issues and the team had opted to assign IDs and data to the DOM elements and use those to look up state in the redux store before modifying it. On top of all that, the application is completely unable to handle 2 instances of any component they wrote. I am trying to re-write some of it to encapsulate the state in at the component level. It's pretty awful compared to the Angular (not AngularJS) app I recently rolled off of.
Edit : Also wanted to add, while I think a lot of people really don't like JSX, I actually do like it but I think someone could take that aspect and come up with a better state management system outside of redux and friends. I think something along the lines of Angular (not AngularJS) with JSX would be great.
- mmcnl 9y ago> There are major state update issues and the team had opted to assign IDs and data to the DOM elements and use those to look up state in the redux store before modifying it. This sounds awful and seems like an anti-pattern. I don't think this anything to do with React (other than perhapps that React gives you the freedom to do things wrong). Your devs don't have a proper understanding how React (or Vue) works. Define state model, define view, modify/interact with state, let React modify view. That way you'll never need dirty hacks like fetching state from Redux by using the DOM ID.