import React, { Component } from 'react';
class App extends Component {
  render() {
    const greeting = 'Welcome to React';
    return (
        <Greeting greeting={greeting} />
const Greeting = props => <h1>{props.greeting}</h1>;
export default App;
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