Skip to content

Allow Children in no-fn-reference-in-iterator #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

remcohaszing
Copy link
Contributor

This allows the use of Children.map(children, fn) in
no-fn-reference-in-iterator. This handles the following situation.

import { Children } from 'react';

export default ({ children ]) => (
  Children.map(children, (child) => child)
);

The casing for React.Children in the test has been changed to better reflect
reality.

Refs #121

Verified

This commit was signed with the committer’s verified signature.
mschout Michael Schout
This allows the use of `Children.map(children, fn)` in
`no-fn-reference-in-iterator`. This handles the following situation.

```js
import { Children } from 'react';

export default ({ children ]) => (
  Children.map(children, (child) => child)
);
```

The casing for `React.Children` in the test has been changed to better reflect
reality.
@sindresorhus sindresorhus changed the title Allow Children in no-fn-reference-in-iterator Allow Children in no-fn-reference-in-iterator Aug 16, 2020

Verified

This commit was signed with the committer’s verified signature.
mschout Michael Schout
Apply suggestion.

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@sindresorhus sindresorhus merged commit 036e440 into sindresorhus:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants