Skip to content

adding fields to the underlying component function #637

@joprice

Description

@joprice

I'm trying to use the library https://github.com/welldone-software/why-did-you-render to log the reason for a component re-rendered. In order to get a functional component to be eligible for rendering, a boolean needs to be set on the function. When trying to do this from fsharp:

Components.SomeComponent?whyDidYouRender <- true

The function gets wrapped in the compiler plugin jsx transformation:

(() => createElement(Components_SomeComponent, null)).whyDidYouRender = true;

Is there any way to skip the transformation for cases like this, or do I need to use a modified version of the compiler plugin?

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