Skip to content

move() destroys component from DOM #5

@ugokoli

Description

@ugokoli

This is a very important use case for a declarative framework like React.
We want to prevent multiple rerenders as much as possible and manage states easily.

Calling the useMovePane() hook to either remove or add a pane is okay, but how about hiding a pane without removing it from the DOM?
move(name, isShowing ? null : [0.99, 0.5])

A pane that is removed and added in a toggle manner gets rerendered all the time and the previous state is lost. Ref to previous elements are also missing and it creates a buggy experience.

Is there a way currently to achieve hiding a pane in addition to adding and removing?
Or is it something we can add in the next update?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions