Week 13 - Session 2 - React (Class, Stateful Components, Event Handlers)

blog image source
Following on from the previous session Intro to React.

ES6 Class Syntax: Class in terms of Object-oriented Programming is a blueprint for creating objects. A class encapsulates data and functionality for the object.

Stateful React Components: When something is “stateful”, it is a central point that stores information in memory, about the app/component’s state. It also has the ability to change it. It is essentially a “living” thing that has knowledge of past, current and potential future state changes.

Event Handlers: Event handling the only goal is intercepting various events (clicks, touches…) and triggering the associated callbacks that you, the programmer, coded. It’s the implementation that makes React’s event handling system stand out. JSX elements can have event listeners, just like HTML elements can. You create an event listener by giving a JSX element a special attribute.

An introduction to ES6 classes - https://javascriptplayground.com/introduction-to-es6-classes-tutorial/
Stateful and Stateless Components in React - https://medium.com/@imletaconnoux/stateful-and-stateless-components-in-react-5da5cedb808f
Handling Events - https://reactjs.org/docs/handling-events.html
Learn ReactJS - https://www.codecademy.com/learn/react-101

Popular posts from this blog

Week 9 to 12 - Learning with MCR Codes

Week 8 - Session 1 - JavaScript in the Browser

Week 9 - Session 1 - The Internet, the Web, HTTP