Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Hangs with React 16.6.0 #3

@sheepsteak

Description

@sheepsteak

I've found that using the latest React version that was released a few days ago (16.6.0) breaks this module. It seems to get stuck on the while loop (https://github.com/planttheidea/react-rendered-size/blob/master/src/element.js#L79) waiting for the render callback to fire.

I think what is happening is that the latest version of react-dom is more async and uses something like requestIdleCallback to schedule the render. However, this module is hammering the main thread with a while loop so the component never gets rendered and the callback never fires.

Only way I can see to fix this is to accept that this can no longer be a synchronous render and use a callback/Promise to wait for the render to finish.

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