React
- JSX - it is a syntax extension to JavaScript, JSX may remind you of a template language, but it comes with the full power of JavaScript.
- React elements are
immutable
.
- An element is like a single frame in a movie
- It calls ReactDOM.render() every second from a setInterval() callback.
Components
are like JavaScript functions. They accept arbitrary inputs (called “props”) and return React elements describing what should appear on the screen.
- When React sees an element representing a user-defined component, it passes JSX attributes and children to this component as a single object. We call this object
props
.
- In applications with many components, it’s very important to free up resources taken by the components when they are destroyed.
- Handling events with React elements is very similar to handling events on DOM elements
Main Page