Simple Contact App: ES6, Prop Validate, Data flow and Component Communication
When creating components, remember that they can be composed into bigger components and reused (in the same project, in other projects, by other developers). Therefore, it is a good practice to make explicit in your components which props can be used, which ones are required, and which types of values they accept.
For this reason, form components such as <input>, <textarea>, and <option> differ from their HTML counterparts because they can be mutated via user interactions.
Lately I’ve been using ReactJS a lot to build rich user experiences on the web, and it’s been absolutely great. A huge improvement over AngularJS in my humble opinion.
The only ugly spot with ReactJS is JSX. I can see the appeal of using declarative HTML in templates for readability, but having switched to HAML (and Slim and Jade) long ago, writing HTML feels like a step backwards.
Ở bài viết này mình sẽ giới thiệu các bạn những callback function được gọi trong xuyên suốt chu trình khởi tạo cho đến hủy 1 component. Mình sử dụng phiên bản mới nhất ở thời điểm viết bài này là 0.13.3