React architecture for a huge business application

前端 未结 8 1753
礼貌的吻别
礼貌的吻别 2021-01-30 04:03

So we\'ve recently picked up React in our company as the front-end technology to build our huge business web application. By saying recently, I mean we don\'t have any previous

8条回答
  •  心在旅途
    2021-01-30 04:43

    Getting started writing more complex apps in React can really be a struggle, I know exactly how it feels!

    As you say, React is a UI lib and not an event framework. That's why you typically need a library to handle events, for example Redux. You clearly state that you decided not to use Redux (you even used capital letters for not :) ). I would take a step back if I were you and reconsider that decision. You say the reason for not using Redux is that your cannot keep your components easily pluggable and reusable when using Redux. I would argue that is not true. Redux is totally decoupled from your React components. Redux only handles receiving events, and managing state. From the React components point of view, it just receives data in props and sends events by calling regular functions. It's possible to still unit-tests, reuse, etc.

    I would suggest you take another look at Redux with this in consideration. Happy to help if you have more questions!

提交回复
热议问题