import React, { Component } from 'react'; class App extends Component { render() { const greeting = 'Welcome to React'; return ( <div> <Greeting greeting={greeting} /> </div> ); } } const Greeting = props => <h1>{props.greeting}</h1>; export default App;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter