Skip to content

ReactComponent: memo #308

@alfonsogarciacaro

Description

@alfonsogarciacaro

We should have an option to memoize functions using ReactComponent attribute. The trick is we cannot make references to functions from the attributes so we cannot specify a custom equality function for props, so we can:

  • Rely on React's default: swallow structural equality I believe.
  • Provide our own default: we usually had swallow structural equality but functions to ignore the dispatch function passed in Elmish components as prop. This would also bring another challenge because I didn't think of a good way to pack code in the plugins 😅
  • Use a way to identify the equality function in the component declaration somehow.

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