Skip to content

Passing Functions to Components FAQ: document a pattern for class components #673

Description

@danburzo

The Passing Functions to Components FAQ page discusses some strategies for passing parameters to the callbacks, out of which using data attributes on DOM elements for better performance is an addition to the ones described on the Handling Events docs.

I wrote about a similar pattern for class components, and was wondering if it would be a good addition to the FAQ page. (Of course, I'd love to know whether the things I say there are accurate, misinterpret the performance implications in any way, or generally sound like bad ideas.)

Tangentially, it may be a good idea to link to the FAQ from the Handling Events page? I was initially not aware there's extra information on the subject.

I must add that the React website is one of the best documentations I've ever read through, and in particular the FAQ section seems to include actual frequent questions :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions