We are discuss here React Core Concept. It will be helpful for you.
Data types is an important concept. There have some data type as string, number, boolean, undefined, null, operator, objects, array etc. Strings are written with quotes. Booleans can only have two values true or false. …
Node.js is perfect for event-driven applications.
Every action on a computer is an event. Like when a connection is made or a file is opened.
Objects in Node.js can fire events, like the readStream object fires events when opening and closing a file.
Node.js has a built-in module, called “Events”, where you can create-, fire-, and listen for- your own events.
To include the built-in Events module use the
require() method. In addition, all event properties and methods are an instance of an EventEmitter object. To be able to access these properties and methods, create an EventEmitter object:
You can assign event handlers to your own events with the EventEmitter object.
In the example below we have created a function that will be executed when a “scream” event is fired.
To fire an event, use the
Each component in React has a lifecycle which you can monitor and manipulate during its three main phases.
The three phases are: Mounting, Updating, and Unmounting.
Mounting means putting elements into the DOM.
React has four built-in methods that gets called, in this order, when mounting a component:
render() method is required and will always be called, the others are optional and will be called if you define them.
constructor() method is called before anything else, when the component is initiated, and it is the natural place to set up the initial
state and other initial values.
constructor() method is called with the
props, as arguments, and you should always start by calling the
super(props) before anything else, this will initiate the parent's constructor method and allows the component to inherit methods from its parent (
ECMAScript 6 is also known as ES6 and ECMAScript 2015.
This chapter will introduce some of the new features in ES6.
**) (EcmaScript 2016)