DEV Community

Discussion on: My 5 cents about React Hooks

Collapse
 
sphrases profile image
sphrases • Edited

Hi, I am interested about you guys oppinion on declaring props with function components:

const funComp = (props) => {
  //bla bla
  return <div>{props.someProp}</div>
}

const funComp = ({someProp}) => {
  //bla bla
  return <div>{someProp}</div>
}

I mainly use the first approach, but the second one is definitely "smarter". What do you think?