Skip to content

Prevent print-only components from rendering when we aren't in the 'print mode'. #39

@alex-gokkun

Description

@alex-gokkun

Correct me if I'm wrong but I haven't found an official way for a print-only component not being rendered.
Let's say that I have a component that depends on a plethora of props. Each prop change would trigger a re-render. It's a waste of effort if I'm not actually printing anything at the moment.
By subscribing to beforeprint and afterprint events I got a workaround but I cannot say I'm satisfied with it. It seems to violate separation of conerns.
Are there any plans on supporting this in the library?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions