Skip to content

Lazy loading pattern #135

@waliurjs

Description

@waliurjs

Hi!
This is related to #127 Lazy loading children when parent is opened.

Can you guys please provide a pattern/pseudo code or some advice on how to implement it?

What I can gather from the docs is that I think I need to have a controlled component like this. But I have more questions.

Some concerns that I need advice on:

  • The data prop can be a huge nested JSON. So, manipulating mutating it will require some optimisations. I don't know what would be a good way to go about this.
  • Can the data prop be a flat array of objects referencing their parent by a id: string without being nested like children: []?
  • I saw some built in tree manipulating functions inside the react-arborist's codebase. It would be great if those functions can be re-used in controlled component too.

Desperately need some advice or some pseudo codes.

Thank you!

(Found your HackerNews comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    demodocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions