S
S
semki0962020-02-17 17:31:53
JavaScript
semki096, 2020-02-17 17:31:53

What kind of beast is .speed?

Faced with such a piece

...
class UpdatingComponentHOC extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        length: LENGTH,
        data: this.props.data.slice(0, LENGTH),
      };
      this.speed = 1000;
....

What is .speed? How it works? In general, this piece of code updates the data, on a click event it adds some of its own data to the existing data that is somehow generated, I want to understand the process.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-17
@semki096

setInterval(this.func, this.speed)
Judging by your code, speedthe interfal between executionfunc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question