feat: allow reactify callbacks to access props (#200)

This commit is contained in:
Erik Ritter 2019-08-05 08:52:58 -07:00 committed by Yongjie Zhao
parent 37e08a7a9d
commit f0204ea9bd

View File

@ -53,7 +53,7 @@ export default function reactify<Props extends object>(
componentWillUnmount() {
this.container = undefined;
if (callbacks && callbacks.componentWillUnmount) {
callbacks.componentWillUnmount();
callbacks.componentWillUnmount.bind(this)();
}
}