From 7149218fa4ae96f2a4071b4c8226563c97bca198 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sun, 23 Oct 2016 13:40:12 +0000 Subject: [PATCH] Rebuild website --- docs/context.html | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/docs/context.html b/docs/context.html index 7a78998a1b..e7d0aef06d 100644 --- a/docs/context.html +++ b/docs/context.html @@ -193,23 +193,16 @@ You can do this directly in React with the powerful "context" API.

Before you build components with an API similar to this, consider if there are cleaner alternatives. For example, you can pass entire React component as props if you'd like to.

Referencing Context in Lifecycle Methods #

-

If contextTypes is defined within a component, the following lifecycle methods will receive an additional parameter, the context object:

-
void componentWillReceiveProps(
-  object nextProps, object nextContext
-)
+

If contextTypes is defined within a component, the following lifecycle methods will receive an additional parameter, the context object:

-boolean shouldComponentUpdate( - object nextProps, object nextState, object nextContext -) - -void componentWillUpdate( - object nextProps, object nextState, object nextContext -) - -void componentDidUpdate( - object prevProps, object prevState, object prevContext -) -

Referencing Context in Stateless Functional Components #

+ +

Referencing Context in Stateless Functional Components #

Stateless functional components are also able to reference context if contextTypes is defined as a property of the function. The following code shows a Button component written as a stateless functional component.

const Button = ({children}, context) =>
   <button style={{background: context.color}}>