Skip to content

Passing container on instantiation makes things more complex than they could be in reactive #199

@JayPanoz

Description

@JayPanoz

It is fair to say requiring the container on Navigator’s instantiation makes the lifecycle tricky for reactive apps, as you need to mount your “Reader” component before instantiating the Navigator, you cannot effectively prepare it in advance or reuse it in another container. Ideally you’d prefer to pass it on load().

The issue is that your “Reader” relies, in turn, on the Navigator and have to wait for it. Which can be a landmine if you do not protect against the navigator, its properties and methods, etc. being undefined or null.

The Navigator can for example fail if you load it without its container being mounted, because it still tries to load anyway – and iframes being un-appendable, their window.location is null and we cannot replace it in FrameManager.

I did not check how feasible this is yet, so I’ll have to take a closer look before tackling this change.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions