Skip to content

json.stringify() lazily #21

@jeremy-deutsch

Description

@jeremy-deutsch

The creation of copyText in buildRow (by JSON.stringify-ing the Redux state) is pretty slow, and can lead to some minor performance issues when it's done over and over for every dispatched action. I was originally going to suggest that copying the state should be moved to a button in the sidebar or something so it could the JSON.stringify could be done lazily, but Flipper 0.46.0 was just released, and it now allows users of SearchableTable to pass in a function for copyText instead of a string (also so that the actual copy-able text is created lazily).

I can put up a PR for whatever changes need to be made here, but I wanted to ask first: would it be better to turn copyText into a function so that copying rows works the same, or would it be better to move adding the state to the clipboard into a new button, so the plugin is compatible with previous versions of Flipper?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions