How to connect state to props with mobx.js @observer when use ES6 class?

前端 未结 4 1671
逝去的感伤
逝去的感伤 2021-01-30 14:54

Let\'s take a class like this in an app with React and React Router.

@observer class Module1 extends React.Component {

  constructor (props) {
    super(props);         


        
4条回答
  •  醉话见心
    2021-01-30 15:12

    Take a look at react-tunnel. It gives you a Provider component and the inject decorator (works like connect in redux).

提交回复
热议问题