Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

React js props

function App() {
  return (
    <div className="App">
      <NewComponent name="Ariful Islam Adil" profession="Web-Developer"></NewComponent>
    </div>
  );
}

function NewComponent(props) {
  return (
    <div className="test-class">
      <h1>Name: {props.name}</h1>
      <h3>Profession: {props.profession}</h3>
    </div>
  )
}
export default App;
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #React #js #props
ADD COMMENT
Topic
Name
1+9 =