Skip to content

Commit c6b6dc2

Browse files
aemgaearon
authored andcommitted
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.
1 parent c0b32b7 commit c6b6dc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/legacy-context.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ If `contextTypes` is defined within a component, the following [lifecycle method
152152
>
153153
> As of React 16, `componentDidUpdate` no longer receives `prevContext`.
154154
155-
### Referencing Context in Stateless Function Components {#referencing-context-in-stateless-function-components}
155+
### Referencing Context in Function Components {#referencing-context-in-stateless-function-components}
156156

157157
> This section documents a legacy API. See the [new API](/docs/context.html).
158158
159-
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.
159+
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.
160160

161161
```javascript
162162
import PropTypes from 'prop-types';

0 commit comments

Comments
 (0)