App.js
import React, { Component } from 'react';
import './App.css';
import Person from './Person/Person';

class App extends Component {
  render() {
    return (
      <div className="App">
       <h1>Welcome to RB Web Solutions</h1>
       <p>Programming Training</p>
       <Person name="Rajat Bose" age="42" />
       <Person name="Raju Das" age="21" >Web Developer</Person>
       <Person name="Suraj" age="23" />
      </div>
    );
    // return React.createElement('div', {className: 'App'}, React.createElement('h1', null, 'Does this work now?'));
  }
}

export default App;

-----------------------------------------------------------------------
./Person/Person.js
import React from 'react';

const person = ( props ) => {
    return (
        <div>
            <p>I'm {props.name} and I am {props.age} years old!</p>
            <p>{props.children}</p>
        </div>
    )
};

export default person;
Please follow and like us:

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

RSS
Follow by Email