score:4

Accepted answer
let provideComponent = function(selector, store, componentCallback) {
  ReactDOM.render(
    <Provider store={store}>
      {componentCallback()}
    </Provider>,    
    $(selector)[0]
  )
}

// Return the actual element, instead of just the type
provideComponent('.my-component', reduxStore, function() {
  return <MyComponent prop1="value" prop2="value" />;
}

Related Query

More Query from same tag