The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Native: State and Touch Events

React Native: State and Touch Events

7:07
In React, components manage their own state. In this lesson, we'll walk through building a component which manages it's own state as well as using TextInput and TouchableHighlight to handle touch events.
Watch this lesson now
Avatar
egghead.io

In React, components manage their own state. In this lesson, we'll walk through building a component which manages it's own state as well as using TextInput and TouchableHighlight to handle touch events.

Avatar
MyGov

Hint: It would be easier if in the constructor you would initialize the "username" param with your github username instead of blank. Otherwise, throughout this lesson, you will have to retype it over and over again.

Avatar
Tyler

Though that would have saved some typing, it might have confused some people starting out with that initial state. A better solution I should have done in the video is to change the user I used rather than using myself every time.

In reply to MyGov
Avatar
Tiago

Isn't is possible to use => to replace the bind function in ES6 ?

Avatar
Tyler

Yup. I always use =>, not sure why I didn't in the video.

In reply to Tiago
Avatar
srhise

What syntax highlighting plugin are you using?? I love that red.

Avatar
Michael Lumbroso

Quick question : I thought React provided autobinding => why not {this.handleChange} instead of {this.handleChange.bind(this)} ?

Thanks for the answer

Avatar
jm90m

With the current version of React Native, I was not able to get my app to display. I had to remove "justifyContent: 'center', alignItems: 'center'," from container styles in 'index.ios.js'

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?