0

I'm a bit new to react. I can use them with my past experiences. For example, I need sth to describe, I found a similar declaration and use the same shape. But I would like to learn the fundamentals. I mean when should I use below operators;

  • const sth : ...
  • () => ...
  • const sth = ...

If you list the basis of these usages, I would add on them with docs.

1 Answers1

2

Those are fundamentals of Javascript and Typescript (or any type definition with js) and not React, please refer to A re-introduction to JavaScript (JS tutorial) in MDN docs.

(param1, param2, …, paramN) => { statements } // const sth = () => ...
const sth = ...
let isDone: boolean = false;
Dennis Vash
  • 31,365
  • 5
  • 46
  • 76