Skip to content

Question: Why does whole tree re-renders on node modify? #373

Open
@dienluong

Description

@dienluong

Hi,

First of all, thanks for the awesome component. I've looked at various React trees and this one is the best for my needs.

My tree nodes have modifiable title very similar to the one in the storybook. Using React Dev Tools, I see that the whole tree seems to be re-rendered on each keystroke editing the title (i.e. each onChange of the text Input element). Is expected behavior? What is the reason for this? Due to this, I feel compelled to use an uncontrolled form input and update the tree only on onSubmit and onBlur events. Would making nodes PureComponent prevent the re-render? If so, would this mean using nodeContentRenderer to override NodeRendererDefault?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions