Skip to content

Instantly share code, notes, and snippets.

Steps to complete to turn Todo app into React

After following the instructions here, you should have the following:

  • Working react app
  • Ability to deploy react app to Github Pages
  • App component that does initial setup and composes your other components
  • NewTodo component containing the form for a new Todo
  • Todo component containing HTML for a single Todo
  • CSS files for each component
@kraigh
kraigh / todoReactSnippets.md
Last active April 18, 2019 14:03
Todo React Snippets

Description

In this file you will find some code snippets and examples of how to do certain things in React.

Component Constructor Method

In the constructor for your component, you perform several important actions.

  • Calling super() or super(props) will call the parent class's constructor and is important for React.
    • Call super(props) if your component has props, and should also be inside constructor(props) in this case.
class App extends Component {
  constructor() {