How to use react-redux-form - 10 common examples

To help you get started, we’ve selected a few react-redux-form examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rastapasta / foodsharing / src / sagas / session.tsx View on Github external
// Report why we failed
      console.log('reauthentication failed', error)

      // Try to pull previously stored credentials from secure store
      const result = yield Keychain.getGenericPassword()

      // If we don't find what we need, directly proceed to login
      if (!result || !result.username || !result.password)
        return Actions.reset('login')

      // Blast them through the pipe to get 'em into the store
      const { username: email, password } = result
      yield put({type: KEYCHAIN, payload: {email, password}})

      // Populate our login state/form
      yield put(formActions.change('login.email', email))
      yield put(formActions.change('login.password', password))

      // ... to finally trigger the login procedure
      yield put({type: LOGIN_REQUEST})
    }
  }

  // Wait for our reauthentication either fail or succeed
  // TODO: Handle NO_INTERNET reason
  const { type } = yield take([LOGIN_SUCCESS, LOGIN_ERROR])
  if (type === LOGIN_ERROR) {
    yield SplashScreen.hide()
    yield Actions.reset('login')
  }
}
github rastapasta / foodsharing / src / sagas / session.tsx View on Github external
function* logoutFlow() {
  // Reset all forms
  yield put(formActions.reset('drafts'))
  yield put(formActions.change('login.password', ''))

  // Throw the user back to the login screen
  Actions.reset('login')

  // Delete the previously stored password from the secure location
  yield Keychain.resetGenericPassword()

  // Try to logout the user out from foodsharing.network
  try {
    yield call(logout)
  } catch(e) {
    console.log('online logout failed', e)
  }

  // Hard reset all system cookies
  yield CookieManager.clearAll()
github FelixHenninger / lab.js / packages / builder / src / components / ComponentOptions / components / Behavior / components / Timeline / widget.js View on Github external
handleChange(model, value) {
    // TODO: This has a hackish feel to it
    this.props.formDispatch(
      actions.change(
        `local.timeline[${ this.state.activeItem }].${ model }`,
        value
      )
    )
  }
github appirio-tech / connect-app / src / projects / create / components / old / ProjectTypeSelector / ProjectType.jsx View on Github external
return (dispatch) => {
      // get val from index
      dispatch(modelActions.change(modelName, projectTypes[val].val))
    }
  }
github fireflylearning / pattern-library / blocks / core / ff_module / ff_module-task-responses / _ff_module-task-responses-renderer.js View on Github external
stopEditingEvent: function() {
            console.log('stopEditingEvent');
            dispatch(actions.change('event', null));
        },
        addEvent: function() {
github fireflylearning / pattern-library / blocks / core / ff_module / ff_module-task-responses / _ff_module-task-responses-renderer.js View on Github external
editEvent: function(event) {
            console.log('editEvent');
            console.log(event);
            dispatch(actions.change('event', event));
        },
        stopEditingEvent: function() {
github davidkpiano / react-redux-form / examples / builder / FormBuilder.js View on Github external
handleAddField() {
    const { dispatch } = this.props;

    const newField = createField();

    dispatch(actions.push('fields', newField));
    dispatch(actions.change('currentField', newField.id));
  }
  render() {
github huridocs / uwazi / app / react / Thesauris / actions / thesauriActions.js View on Github external
return (dispatch, getState) => {
    let values = getState().thesauri.data.values.slice(0);
    values = advancedSort(values, { property: 'label' });
    values = values.map((_value) => {
      const value = Object.assign({}, _value);
      if (value.values) {
        value.values = value.values.slice(0);
        value.values = advancedSort(value.values, { property: 'label' });
      }
      return value;
    });
    dispatch(formActions.change('thesauri.data.values', values));
  };
}

react-redux-form

Create Forms Easily with React and Redux

MIT
Latest version published 5 years ago

Package Health Score

56 / 100
Full package analysis

Popular react-redux-form functions