Introduction to React.js | Arrow functions

Debugging using Javascript Arrow functions:

Arrow functions are similar yo lambda expressions which define an implication of a varuiaINLE(IE,METHOD IN THIS case)toa block a code Arrow functions are very useful because they store information of the object which called the mehod using the "this' operator.



For example:


myFunction = (param1,param2) => {
//Block of code
//this is visible here
};



If you use normal methods, to execute the function, we have to bind the function, in the constructor function. This is the function which is called when the object is created.

Comments

Popular posts from this blog

FTP, cURL and Linux Intro

Introduction to React.js | Props and Functional Components Advanced

Regular Expressions in JavaScript