What is the use of arrow function in ReactJS?

devquora
devquora

Posted On: Feb 22, 2018

 

Arrow functions are extremely important for React operations. It prevents this bugs. Arrow functions make it easier to predict the behavior of this bugs when passed as callbacks. They don’t redefine the value of this within their function body. Hence, prevents bugs caused by the use of this within callbacks.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    React Js Interview Questions

    What is ReactJS ?

    React js is javascript based UI Library developed at Facebook, to create an interactive, stateful & reusable UI com..

    React Js Interview Questions

    List some advantages of ReactJS ?

    Advantages of React JsReact.js is extremely efficient: React.js creates its own virtual DOM where your components act..

    React Js Interview Questions

    What are Components in ReactJS ?

    React Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.Concep..