redux-form-isomorphic

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i redux-form-isomorphic

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

6.72 kB

Total Files

7

Last publish

Collaborators

  • codejamninja