Some time we want to use ref on react-redux connected components . Before react-redux 6 this is how we use it .

ref={ref => this.chartsComponent = ref.getWrappedInstance()}

we had to use {withRef: true } in connected component

connect(null, null, null, { withRef: true })(ChartsComponent);

{withRef: true} is removed in react redux 6 and {forwardRef : true} is added

this is how we accomplish in…

Mehran Khan

Senior Mobile Application Developer at Cubix Inc with more than 6 years of experience in React Native/Android/iOS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store