/GeFengS.jpeg

David Feng

React Component Event Handlers

Note: I published this article on codeburst/Medium on 2017/07/30. It has received 18.3k views and 235 claps as of 2019/01/05. What should be put in the onClick={…}? A simple example: Toggle button This example is from React Docs, see it on codepen here. In the Toggle class, a handleClick method is defined as an instance method, which changes the local state. In the render method, this.handleClick is passed to the button as an event handler.

Hello World!

Happy New Year! My current personal portfolio site hasn’t seen major changes since its inception about 1.5 years ago. I’ve been working as a software developer for a year and I think the site deserves a major upgrade. I learned about static site generator a couple of days ago, and it seems like exactly what I need. Since I am learning golang, I decided to give Hugo a try. After going through Mike Dane’s Hugo tutorial (highly recommended.