Answers for "spreading object as props"

0

spreading object as props

// These two are equivalentfunction App1() {  return <Greeting firstName="Ben" lastName="Hector" />;}function App2() {  const props = {firstName: 'Ben', lastName: 'Hector'};  return <Greeting {...props} />;}
Posted by: Guest on January-03-2021

Code answers related to "spreading object as props"

Code answers related to "Javascript"

Browse Popular Code Answers by Language