why does the second example throw an error? edit...
# javascript
d
why does the second example throw an error? edit: ref is just a reference to the object on which setState is called. val ref = this