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.
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.
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.
Isn't is possible to use => to replace the bind function in ES6 ?
Yup. I always use =>, not sure why I didn't in the video.
What syntax highlighting plugin are you using?? I love that red.
Info in this tweet. https://twitter.com/tylermcginnis33/status/610920794189889536
Quick question : I thought React provided autobinding => why not {this.handleChange} instead of {this.handleChange.bind(this)} ?
Thanks for the answer
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'
That wasn't React providing autobinding—it's because arrow functions are auto-bound to the lexical scope. Whereas is normal functions that isn't the case.