Skip to content

Does not work with conditional rendering #43

@prjanja

Description

@prjanja

Does not work correctly when using conditional rendering

When data is loaded asynchronously ref is not updated, which leads to empty size values

Example: https://codesandbox.io/s/hidden-sky-4g4rr

Maybe we should use a callback hook as described in the documentation: https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node ?

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