So you want to render a list and pass extra data to your function with React.
Well, React does not handle this for you like Angular or Vue with so...
For further actions, you may consider blocking this person and/or reporting abuse
Is this a good case for some event delegation? Perhaps assigning a click handler to the parent which should be able to give you all the children if you click on one, and then writing appropriate guard clauses to only do things with the info of the DOM node you care about.
You mean somenthing like this?yeah a could add it in the article. thanks
I dont always use Map.
Just like:
getHandler(id) {
if (!this.getHandler[id]){this.getHandler[id] = () => ...}
return this.getHandler[id];
}
You can reduce 1 line of code.
Yeah you can use a simple object. Maybe an Object.create(null) object is even better