Skip to content

Commit 2aecbcd

Browse files
locknonosophiebits
authored andcommitted
"functional component" -> "function component" (facebook#14123)
1 parent b4608dd commit 2aecbcd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/create-subscription/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import React from "react";
8181
import { createSubscription } from "create-subscription";
8282

8383
// Start with a simple component.
84-
// In this case, it's a functional component, but it could have been a class.
84+
// In this case, it's a function component, but it could have been a class.
8585
function FollowerComponent({ followersCount }) {
8686
return <div>You have {followersCount} followers!</div>;
8787
}
@@ -164,7 +164,7 @@ function LoadingComponent({ loadingStatus }) {
164164
}
165165
}
166166

167-
// Wrap the functional component with a subscriber HOC.
167+
// Wrap the function component with a subscriber HOC.
168168
// This HOC will manage subscriptions and pass values to the decorated component.
169169
// It will add and remove subscriptions in an async-safe way when props change.
170170
const PromiseSubscription = createSubscription({

packages/eslint-plugin-react-hooks/src/RulesOfHooks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ export default {
282282
// Gets the function name for our code path. If the function name is
283283
// `undefined` then we know either that we have an anonymous function
284284
// expression or our code path is not in a function. In both cases we
285-
// will want to error since neither are React functional components or
285+
// will want to error since neither are React function components or
286286
// hook functions.
287287
const codePathFunctionName = getFunctionName(codePathNode);
288288

289289
// This is a valid code path for React hooks if we are direcly in a React
290-
// functional component or we are in a hook function.
290+
// function component or we are in a hook function.
291291
const isSomewhereInsideComponentOrHook = isInsideComponentOrHook(
292292
codePathNode,
293293
);

packages/react-dom/src/__tests__/ReactDOMServerIntegrationSpecialTypes-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('ReactDOMServerIntegration', () => {
8383
expect(div.textContent).toBe('Test');
8484
});
8585

86-
describe('memoized functional components', () => {
86+
describe('memoized function components', () => {
8787
beforeEach(() => {
8888
resetModules();
8989
});

0 commit comments

Comments
 (0)