Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

withState() callback

Compare
Choose a tag to compare
@acdlite acdlite released this 11 Oct 21:52
· 600 commits to master since this release

Adds a second parameter to withState()'s state updating function — a callback that will be executed once the update is completed and the component is re-rendered. This simply exposes the feature by React's setState(). https://facebook.github.io/react/docs/component-api.html#setstate

Also fixes an issue where defaultProps() did not override props with values of undefined.

Thanks @istarkov for the PRs #15 #14