Skip to content

Commit

Permalink
[Docs] jsx-no-constructed-context-values: fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: cuithon <dscs@outlook.com>
  • Loading branch information
cuithon authored and ljharb committed Mar 12, 2024
1 parent c3275a4 commit da1013c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/rules/jsx-no-constructed-context-values.md
Expand Up @@ -8,7 +8,7 @@ This rule prevents non-stable values (i.e. object identities) from being used as

One way to resolve this issue may be to wrap the value in a `useMemo()`. If it's a function then `useCallback()` can be used as well.

If you _expect_ the context to be rerun on each render, then consider adding a comment/lint supression explaining why.
If you _expect_ the context to be rerun on each render, then consider adding a comment/lint suppression explaining why.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/display-name.js
Expand Up @@ -246,7 +246,7 @@ module.exports = {
}

if (node.arguments.length > 0 && astUtil.isFunctionLikeExpression(node.arguments[0])) {
// Skip over React.forwardRef declarations that are embeded within
// Skip over React.forwardRef declarations that are embedded within
// a React.memo i.e. React.memo(React.forwardRef(/* ... */))
// This means that we raise a single error for the call to React.memo
// instead of one for React.memo and one for React.forwardRef
Expand Down

0 comments on commit da1013c

Please sign in to comment.