I had a giggle on this line when you said $30/hr was under valuing you. Its just that, in a third world country like India, where I reside, people(including me) have worked for way less than that($5/hr). But I can understand, where you live, $30 is probably not enough. Thanks, this made me laugh and got my interest to read the rest of the article.
This is an amazing response, I thought this won’t be true, but when I tried it on the browser, it does log “hi” before showing the error.
But I think, if you run a js script file having those things, it will surely throw an error before compiling it.
But the way the browser’s are doing things in the console is a topic to look into.
You “might or might not” need this in the method. If you are just playing with the event object, then no, you don’t need “this”, so you will be good to go if you don’t bind “this” for this method.
But let’s say, you want to update state based on that click event, you will need “this” then it will be necessary to bind it with “this”.
Hey man, it was a pleasure reading your article and it was like, we are sitting and you are directly talking to me. The article is like a conversation that is happening between the author and the reader. Great writing.
This doesn’t clear the thing that both the functions passed to setState have different prevState. Since they are async calls, the methods are called one after the other, and both of them should have the same prevState. I am not able to understand that how passing a function instead of object, makes any difference.