Skip to content

Instantly share code, notes, and snippets.

@KimTrijnh
Created January 21, 2019 07:03
Show Gist options
  • Save KimTrijnh/fda47470b81b216526811cf44475a12d to your computer and use it in GitHub Desktop.
Save KimTrijnh/fda47470b81b216526811cf44475a12d to your computer and use it in GitHub Desktop.
React & Redux
@KimTrijnh
Copy link
Author

KimTrijnh commented Jan 23, 2019

SCRIMBA

class syntax to create a component

import React from "react"

// function App(props) {
//     return (
//         <div>
//             <h1>{props.whatever}</h1>
//         </div>
//     )
// }

class App extends React.Component {
    
    yourMethodHere() {
        
    }
    
    render() {
        return (
            <div>
                <h1>{this.props.whatever}</h1>
            </div>
        )
    }
}

export default App
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment