From 185f2b071b763f954e8d02fe2398b99b7671d3bf Mon Sep 17 00:00:00 2001 From: Matthew Reishus Date: Mon, 6 Mar 2017 11:03:17 -0600 Subject: [PATCH] Remove .bind(this) from removePortal call This fixes this warning from react in the console without breaking functionality: Warning: bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See Modal --- lib/components/Modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/Modal.js b/lib/components/Modal.js index 59426dda..4efeee1b 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -94,7 +94,7 @@ var Modal = React.createClass({ this.portal.closeWithTimeout(); } - setTimeout(this.removePortal.bind(this), closesAt - now); + setTimeout(function() { this.removePortal(); }, closesAt - now); } else { this.removePortal(); }