Browse Source

Updated master -> main references (#3769)

main
Brian Vaughn 4 years ago
committed by GitHub
parent
commit
620d360621
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/higher-order-components.md
  2. 2
      src/components/MarkdownPage/MarkdownPage.js

2
content/docs/higher-order-components.md

@ -297,7 +297,7 @@ The `compose` utility function is provided by many third-party libraries includi
## Convention: Wrap the Display Name for Easy Debugging {#convention-wrap-the-display-name-for-easy-debugging}
The container components created by HOCs show up in the [React Developer Tools](https://github.com/facebook/react/tree/master/packages/react-devtools) like any other component. To ease debugging, choose a display name that communicates that it's the result of a HOC.
The container components created by HOCs show up in the [React Developer Tools](https://github.com/facebook/react/tree/main/packages/react-devtools) like any other component. To ease debugging, choose a display name that communicates that it's the result of a HOC.
The most common technique is to wrap the display name of the wrapped component. So if your higher-order component is named `withSubscription`, and the wrapped component's display name is `CommentList`, use the display name `WithSubscription(CommentList)`:

2
src/components/MarkdownPage/MarkdownPage.js

@ -132,7 +132,7 @@ const MarkdownPage = ({
</span>
<a
css={sharedStyles.articleLayout.editLink}
href={`https://github.com/reactjs/reactjs.org/tree/master/${markdownRemark.fields.path}`}>
href={`https://github.com/reactjs/reactjs.org/tree/main/${markdownRemark.fields.path}`}>
Edit this page
</a>
</div>

Loading…
Cancel
Save