Skip to content

Instantly share code, notes, and snippets.

@zivanovicb
Created February 3, 2020 11:03
Show Gist options
  • Save zivanovicb/416b5f4b39dae575fa40b9016ff0ef2b to your computer and use it in GitHub Desktop.
Save zivanovicb/416b5f4b39dae575fa40b9016ff0ef2b to your computer and use it in GitHub Desktop.
ConnectedComponent
const mapStateToProps = (state, { data }) => {
return {
data: IpqsSelectors.selectLastEntry(state),
isRequestingOne: !!RequestSelectors.selectInProgress(state, [IpqsAction.GET_ONE.REQUEST])
}
}
const mapDispatchToProps = (dispatch) => ({
requestOne: async (email) => dispatch(IpqsAction.requestOne(email))
})
const IpqsEmailValidationConnected = connect(mapStateToProps, mapDispatchToProps)(IpqsEmailValidation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment