From c6b6dc2d564190a79fd6bf17af0bb2914749112b Mon Sep 17 00:00:00 2001 From: Adam Markon Date: Thu, 28 Feb 2019 09:31:52 -0500 Subject: [PATCH] Stop calling function components stateless (#1760) These docs still refer to function components as "stateless function components" despite the fact that function components aren't necessarily stateless (anymore). The docs shouldn't use this outdated terminology anymore. I left the "stateless" in the link to avoid breaking existing links to these docs but can remove if keeping links valid isn't a priority. --- content/docs/legacy-context.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/legacy-context.md b/content/docs/legacy-context.md index 1c62e665..a17137fd 100644 --- a/content/docs/legacy-context.md +++ b/content/docs/legacy-context.md @@ -152,11 +152,11 @@ If `contextTypes` is defined within a component, the following [lifecycle method > > As of React 16, `componentDidUpdate` no longer receives `prevContext`. -### Referencing Context in Stateless Function Components {#referencing-context-in-stateless-function-components} +### Referencing Context in Function Components {#referencing-context-in-stateless-function-components} > This section documents a legacy API. See the [new API](/docs/context.html). -Stateless function 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 function component. +Function 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 function component. ```javascript import PropTypes from 'prop-types';