From 7cfca465820f52ad9c8611ada7448413f6aa6e89 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 26 Sep 2017 12:06:28 -0500 Subject: [PATCH 1/2] Doc change for prevContext removal in CDU Ref: https://github.com/facebook/react/issues/8631 --- docs/docs/context.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/context.md b/docs/docs/context.md index ed75177ad3d0..c8673415d2a7 100644 --- a/docs/docs/context.md +++ b/docs/docs/context.md @@ -153,7 +153,8 @@ If `contextTypes` is defined within a component, the following [lifecycle method - [`componentWillReceiveProps(nextProps, nextContext)`](/react/docs/react-component.html#componentwillreceiveprops) - [`shouldComponentUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#shouldcomponentupdate) - [`componentWillUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#componentwillupdate) -- [`componentDidUpdate(prevProps, prevState, prevContext)`](/react/docs/react-component.html#componentdidupdate) + +> Note: In React 16, `componentDidUpdate` no longer is passed `prevContext`. ## Referencing Context in Stateless Functional Components From 06b0423e3d1bedf7c6aee868b8059c27e1ffebc7 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 26 Sep 2017 18:29:27 +0100 Subject: [PATCH 2/2] Minor rewording --- docs/docs/context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/context.md b/docs/docs/context.md index c8673415d2a7..ce180d1f35ea 100644 --- a/docs/docs/context.md +++ b/docs/docs/context.md @@ -154,7 +154,7 @@ If `contextTypes` is defined within a component, the following [lifecycle method - [`shouldComponentUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#shouldcomponentupdate) - [`componentWillUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#componentwillupdate) -> Note: In React 16, `componentDidUpdate` no longer is passed `prevContext`. +> Note: As of React 16, `componentDidUpdate` no longer receives `prevContext`. ## Referencing Context in Stateless Functional Components