Skip to content

Make the update engine listen to resize based on registrations #13

@leoasis

Description

@leoasis

We could avoid explicitly listening to window's resize event and just automatically start listening/stop listening depending on the amount of registered components with the engine.

The idea would be that when there is at least 1 component, we listen to the resize event, and when we have no components (because they deregistered), we stop listening.

We can even check if we're in a DOM to support server side rendering, and all that can be handled transparently inside the engine module, without explicitly calling it, or having a side effect when requiring it.

What do you think? Any drawbacks you see?

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