dzek69 / react-autobind-hmr

Wrapper for react-autobind that adds support for projects with React-Hot-Loader (ie: Next.js).

Repository from Github https://github.comdzek69/react-autobind-hmrRepository from Github https://github.comdzek69/react-autobind-hmr

react-autobind-hmr

Wrapper for react-autobind that adds support for projects with React-Hot-Loader (ie: Next.js).

When to use

If your code is crashing with Cannot read property of undefined or similar because you've used react-autobind but it works with this.method = this.method.bind(this) - this library is for you.

Usage

Replace your

import autobind from "react-autobind";

with

import autobind from "react-autobind-hmr";

Done.

Usage (ES5)

If you're using ES5 just require react-autobind-hmr/dist instead.

Documentation

There is nothing else than this in documentation. Documentation is here however in case of update.

License

MIT

About

Wrapper for react-autobind that adds support for projects with React-Hot-Loader (ie: Next.js).

License:MIT License


Languages

Language:JavaScript 100.0%