Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react props

function App() {
  return <User name="John Doe" />
}

function User(props) {
  return <h1>Hello, {props.name}</h1>; // Hello, John Doe!
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #react #props
ADD COMMENT
Topic
Name
3+4 =