mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Always include destructuring transform (#3788)
* Always include destructuring transform * Fix lint
This commit is contained in:
@@ -40,7 +40,9 @@ export default class extends Component {
|
||||
return (
|
||||
<div id="feature-object-destructuring">
|
||||
{this.state.users.map(user => {
|
||||
const { id, name } = user;
|
||||
const { id, ...rest } = user;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [{ name, ...innerRest }] = [{ ...rest }];
|
||||
return <div key={id}>{name}</div>;
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user