From 4b8c8bfa7e760dfd29a48ca1c9e074b4817a51b2 Mon Sep 17 00:00:00 2001 From: facts-tracker Date: Tue, 26 Sep 2017 14:02:13 -0700 Subject: [PATCH] Rebuild website --- docs/handling-events.html | 6 +++--- docs/portals.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/handling-events.html b/docs/handling-events.html index d7525d20ee..e32e08b40f 100644 --- a/docs/handling-events.html +++ b/docs/handling-events.html @@ -156,7 +156,7 @@

This is not React-specific behavior; it is a part of how functions work in JavaScript. Generally, if you refer to a method without () after it, such as onClick={this.handleClick}, you should bind that method.

-

If calling bind annoys you, there are two ways you can get around this. If you are using the experimental property initializer syntax, you can use property initializers to correctly bind callbacks:

+

If calling bind annoys you, there are two ways you can get around this. If you are using the experimental public class fields syntax, you can use class fields to correctly bind callbacks:

class LoggingButton extends React.Component {
   // This syntax ensures `this` is bound within handleClick.
   // Warning: this is *experimental* syntax.
@@ -175,7 +175,7 @@
 

This syntax is enabled by default in Create React App.

-

If you aren't using property initializer syntax, you can use an arrow function in the callback:

+

If you aren't using class fields syntax, you can use an arrow function in the callback:

class LoggingButton extends React.Component {
   handleClick() {
     console.log('this is:', this);
@@ -191,7 +191,7 @@
   }
 }
 
-

The problem with this syntax is that a different callback is created each time the LoggingButton renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor or using the property initializer syntax, to avoid this sort of performance problem.

+

The problem with this syntax is that a different callback is created each time the LoggingButton renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor or using the class fields syntax, to avoid this sort of performance problem.

diff --git a/docs/portals.html b/docs/portals.html index a533edf429..aa0511f924 100644 --- a/docs/portals.html +++ b/docs/portals.html @@ -83,7 +83,7 @@

Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.

ReactDOM.createPortal(child, container)
 
-

The first argument (child) is any renderable React child, such as an element, string, or fragment. The second argument (container) is a DOM element.

+

The first argument (child) is any renderable React child, such as an element, string, or fragment. The second argument (container) is a DOM element.

Usage