I have component connected to redux store which gets data from props:
const mapStateToProps = state => ({rowData: dataSelector(state)})
The component has its own state:
this.state = {
rowsPerPage: 23,
pageCount: 0,
}
I need to calculate new state.pageCount
when props.rowData
changes. How can i do it?