From the doc :
This is a simple ES6 arrow function, but I can't find the benefits of wraping the ( onClick, completed, text ) params with brackets ( aka : ({ onClick, completed, text }) ) - no doc mention - no examples
const Todo = ({ onClick, completed, text }) => ( <---- here
<li
onClick={onClick}
style={{
textDecoration: completed ? 'line-through' : 'none'
}}
>
{text}
</li>
)
export default Todo
I guess this looks like when we do import :
import { PropTypes, Component } from 'react'
Cheers