setInterval function without arrow function

后端 未结 7 833
盖世英雄少女心
盖世英雄少女心 2021-01-02 07:20

I am learning about react components following the documentation https://facebook.github.io/react/docs/state-and-lifecycle.html

Why do we need to use arrow function

7条回答
  •  臣服心动
    2021-01-02 08:13

    Technically, you should be able to use the second code snippet if this.tick() returns a function.

提交回复
热议问题