function mapStateToProps(state) { const kernelValue = selector(state, 'kernel'); const costValue = selector(state, 'cost'); const nuValue = selector(state, 'nu'); const gammaValue = selector(state, 'gamma'); const typeValue = selector(state, 'type'); return { kernelValue, costValue, gammaValue, typeValue, nuValue, getValue: function (name) { return selector(state, name); } }; }
const mapStateToProps = (state) => { const {firstName, lastName, email, mobile} = selector(state, 'firstName', 'lastName', 'email', 'mobile') return { users: state, initialValues: omit(state.users[23], ['id']), firstName, lastName, email, mobile } }
const mapStateToProps = (state, props) => { const selector = formValueSelector(props.formInstanceId); const referralField = formUtil.obsFieldName('referral', CONCEPTS.SOURCE_OF_REFERRAL.uuid); const linkageToCareField = formUtil.obsFieldName('linkage-to-care-id', CONCEPTS.SOURCE_OF_REFERRAL.Linkage_to_care_ID.uuid); return { patient: selectors.getSelectedPatientFromStore(state), referral: { fieldName: referralField, value: selector(state, referralField) }, linkageToCare: { fieldName: linkageToCareField, value: selector(state, linkageToCareField) } }; }
connect( state => { // https://redux-form.com/8.1.0/docs/api/formvalueselector.md/ const selector = formValueSelector(constants.REDUX_FORM_NAME); return { idToSearch: selector(state, 'idToSearch'), }; } )(reduxForm({ // a unique name for the form form: constants.REDUX_FORM_NAME, })(withStyles(styles)(Root)))
const mapStateToProps = store => ({ signInData: selector(store, 'username', 'password'), isLoading: store.AUTH.signIn.isLoading, })
const mapStateToProps = state => { console.log("mapStateToProps.state: " + JSON.stringify(state)); const field1 = selector(state, "field1"); const customField2 = selector(state, "customField2"); const customRadioField3 = selector(state, "customRadioField3"); return { field1, customField2, customRadioField3 }; }
const mapStateToProps = state => { const values = selector(state, "data") return { formValues: values, user: state.user, initialValues: initialValues } }
function mapStateToProps(state) { const { info, categories, tags, pages, auth: { user } } = state; const title = selector(state, 'title'); return { info, user, categories, tags, pages, title }; }
function mapStateToProps(state) { const epsilonValue = selector(state, 'epsilon'); const kernelValue = selector(state, 'kernel'); const gammaValue = selector(state, 'gamma'); const costValue = selector(state, 'cost'); const nuValue = selector(state, 'nu'); const typeValue = selector(state, 'type'); return { epsilonValue, kernelValue, gammaValue, costValue, nuValue, typeValue, getValue(name) { return selector(state, name); } }; }
const mapStateToProps = state => { const values = selector(state, "data") return { formValues: values, } }
const mapStateToProps = store => ({ signInData: selector(store, 'username', 'password'), isLoading: store.AUTH.signIn.isLoading, })