Skip to content

question: why the parse function returns also an id? #66

@marcosvega91

Description

@marcosvega91

I'm looking at the code, in particular to the parse function.

let id = 0;

function parse({ htmlRoot, js }) {
  let result = {
    // increment the id every time we call parse, so we can use
    // it for react keys, when iterating over targets
    id: ++id,
  };

Is the id important to the parse function? I looked at the code but I didn't found the place where it is used.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions