Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perhaps fill that ellipsis in the README with a couple of methods. #21

Closed
catamphetamine opened this issue Apr 14, 2018 · 1 comment
Closed

Comments

@catamphetamine
Copy link

catamphetamine commented Apr 14, 2018

People are having difficulties with understanding how the polyfill actually works (what does it actually do).
gpbl/react-day-picker#685

Perhaps the README could be more descriptive about that, something like:

import React from 'react';
import {polyfill} from 'react-lifecycles-compat';

class ExampleComponent extends React.Component {
  getSnapshotBeforeUpdate(prevProps, prevState) { ... }
  static getDerivedStateFromProps(props, state) { ... }
  ...
}

// Polyfill your component so the new lifecycles will work with older versions of React:
polyfill(ExampleComponent);

export default ExampleComponent;
@bvaughn
Copy link
Contributor

bvaughn commented Apr 14, 2018

Done! e4e21a6

Thanks for pointing this out.

@bvaughn bvaughn closed this as completed Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants