loading...

re: Creating React components without this. #nothis VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Fat arrow functions make old complaints about "this" moot, especially in React. Instead of increment(ctx) { ctx.setState(state => ({ cou...
 

Unfortunately, this code is not idiomatic as you should pass a function to the setState in this case or else from several increments in a row most get ignored as the state is updated asynchronously and they will have a stale state... nothis FTW is what I take feom this comment in the end...

Code of Conduct Report abuse