Skip to content

feature request: provide current element depth to visitor function #35

@alidcast

Description

@alidcast

Hey @ctrlplusb, thanks for extracting this utility out for other libraries!

would you be inclined to pass the current element depth/index in the tree as the last argument to the visitor function? It's useful if you want to limit how far down you want to walk the component tree, e.g. if implementing a custom getInitialProps

Thanks

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