Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, {Component} from 'react';
- import './App.css';
- const message = props => <div>{props.msg}</div>;
- class App extends Component {
- render() {
- return (
- <div>
- {React.createElement(message, {msg: 'A Generic Hello World Text'})}
- {React.createElement(message, {
- msg: 'Creating Reusable React Components',
- })}
- </div>
- );
- }
- }
- export default App;
Add Comment
Please, Sign In to add comment