Skip to content

Commit 1393a25

Browse files
committed
onChange example
1 parent e46da01 commit 1393a25

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
* open up new terminal and run `npm run lint` do this often so you can make sure your app is up to date with linting errors.
2727

2828
#### Tips and Tricks
29+
* *onChange Example:*
30+
```
31+
handleChange(event) {
32+
this.setState({todo: event.target.value});
33+
}
34+
```
2935
* Think of your application as an Application Tree. App is the parent, which controlls properties/data needed for the child components. This is how modern applications are built. They're modular, separate pieces of code called components that you 'compose' together to make your app. It's awesome!
3036
* Be sure to keep your todos in an array on state. Arrays are so awesome to work with.
3137
* When you need to iterate over a list and return React components out as elements, you'll need to include a "key" property on the element itself. `<ElementBeingRendered key={someValue} />`. Note: this is what react is doing under the hood, it needs to know how to access each element and they need to be unique so the React engine can do its thing.

0 commit comments

Comments
 (0)