repetere/jsonx

Integrating with Redux

craigcoles opened this issue · 0 comments

I am looking to connect my created RJX component to Redux. Is it even possible to do so using the following example?

import * as RJX from "rjx/dist/rjx.esm";

const data = {
  getInitialState:{},
  componentDidMount:{}
  ...
}

const Test = RJX._rjxComponents.getReactComponent(data);

Is it a case of connecting the component returned via RJX._rjxComponents.getReactComponent? I did give that a try, and did not get any joy from that.

import * as RJX from "rjx/dist/rjx.esm";

const data = {
  getInitialState:{},
  componentDidMount:{}
  ...
}

const Test = RJX._rjxComponents.getReactComponent(data);

const mapStateToProps = state => ({});
const mapDispatchToProps = dispatch => ({});

export default connect(mapStateToProps, mapDispatchToProps)(Test);