@samitouri / QOS-React / commits / 2aecbcd6f1

"functional component" -> "function component" (#14123)

locknono committed Nov 7, 2018 at 09:33 UTC 2aecbcd6f1a0ac975f01d41dad11722bc8c8da72
3 files changed +5 -5
packages/create-subscription/README.md
+2 -2
@@ -81,7 +81,7 @@ import React from "react";
81 import { createSubscription } from "create-subscription";
82
83 // 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.
85 function FollowerComponent({ followersCount }) {
86 return <div>You have {followersCount} followers!</div>;
87 }
@@ -164,7 +164,7 @@ function LoadingComponent({ loadingStatus }) {
164 }
165 }
166
167 -// Wrap the functional component with a subscriber HOC.
167 +// Wrap the function component with a subscriber HOC.
168 // This HOC will manage subscriptions and pass values to the decorated component.
169 // It will add and remove subscriptions in an async-safe way when props change.
170 const PromiseSubscription = createSubscription({
packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
+2 -2
@@ -282,12 +282,12 @@ export default {
282 // Gets the function name for our code path. If the function name is
283 // `undefined` then we know either that we have an anonymous function
284 // 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
286 // hook functions.
287 const codePathFunctionName = getFunctionName(codePathNode);
288
289 // 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.
291 const isSomewhereInsideComponentOrHook = isInsideComponentOrHook(
292 codePathNode,
293 );
packages/react-dom/src/__tests__/ReactDOMServerIntegrationSpecialTypes-test.js
+1 -1
@@ -83,7 +83,7 @@ describe('ReactDOMServerIntegration', () => {
83 expect(div.textContent).toBe('Test');
84 });
85
86 - describe('memoized functional components', () => {
86 + describe('memoized function components', () => {
87 beforeEach(() => {
88 resetModules();
89 });