Skip to content

Commit

Permalink
"functional component" -> "function component" (#14123)
Browse files Browse the repository at this point in the history
  • Loading branch information
locknono authored and sophiebits committed Nov 7, 2018
1 parent b4608dd commit 2aecbcd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/create-subscription/README.md
Expand Up @@ -81,7 +81,7 @@ import React from "react";
import { createSubscription } from "create-subscription";

// Start with a simple component.
// In this case, it's a functional component, but it could have been a class.
// In this case, it's a function component, but it could have been a class.
function FollowerComponent({ followersCount }) {
return <div>You have {followersCount} followers!</div>;
}
Expand Down Expand Up @@ -164,7 +164,7 @@ function LoadingComponent({ loadingStatus }) {
}
}

// Wrap the functional component with a subscriber HOC.
// Wrap the function component with a subscriber HOC.
// This HOC will manage subscriptions and pass values to the decorated component.
// It will add and remove subscriptions in an async-safe way when props change.
const PromiseSubscription = createSubscription({
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
Expand Up @@ -282,12 +282,12 @@ export default {
// Gets the function name for our code path. If the function name is
// `undefined` then we know either that we have an anonymous function
// expression or our code path is not in a function. In both cases we
// will want to error since neither are React functional components or
// will want to error since neither are React function components or
// hook functions.
const codePathFunctionName = getFunctionName(codePathNode);

// This is a valid code path for React hooks if we are direcly in a React
// functional component or we are in a hook function.
// function component or we are in a hook function.
const isSomewhereInsideComponentOrHook = isInsideComponentOrHook(
codePathNode,
);
Expand Down
Expand Up @@ -83,7 +83,7 @@ describe('ReactDOMServerIntegration', () => {
expect(div.textContent).toBe('Test');
});

describe('memoized functional components', () => {
describe('memoized function components', () => {
beforeEach(() => {
resetModules();
});
Expand Down

0 comments on commit 2aecbcd

Please sign in to comment.