0.0.3 • Published 5 years ago

redux-form-isomorphic v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

redux-form-isomorphic

GitHub stars

handle early input to isomorphically rendered forms

Please ★ this repo if you found it useful ★ ★ ★

Features

  • hydrate form inputs collected before client payload loads
  • compatible with redux-form

Installation

npm install --save redux-form-isomorphic

Dependencies

Usage

Run the following code BEFORE the initial client render.

import ReduxFormIsomorphic from 'redux-form-isomorphic';

class App extends Component {
  componentWillMount() {
    const reduxFormIsomorphic = new ReduxFormIsomorphic(this.context.store, {
      login: ['username', 'password']
    });
    reduxFormIsomorphic.rehydrate();
  }
}

Please note that you must explicitly specify the fields you want rehydrated.

You also must name the form, so the rehydration process can find the values.

class LoginForm {
  render() {
    return (
      <form name="login">
        {this.renderFields()}
      </form>
    );
  }
}

Support

Submit an issue

Screenshots

Contribute a screenshot

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2018

Changelog

Review the changelog

Credits

Support on Liberapay

A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.

Add some fuel if you'd like to keep me going!

Liberapay receiving Liberapay patrons