Closed Anonym-tsk closed 2 years ago
thanks I will review and test soon
let's try to come up with a more generic and efficient solution and apply it to all the code, not just the main file. Your current causes a lot of ops during each render, where we can save the "loaded" state once it occurs and then only look at it.
Please read this article and look at this gist.
ScopedRegistryHost
whenDefined
checkWhat you did is not a solution and it only works now by chance since those entities which we currently use are already loaded and this can change in the future ... What i did already took under account the links you mentioned as you can see i add them to the registry in an async matter. Your first commit was in yhe right direction please revisit it and the comment i left for it. You can introduce an enhancement where you check if a given element is already defined in a sync matter and use it instead if the whenDefined matter.
So, you know the problem and you understand the bug with asynchronous loading resources for now. Please do your best and fix it.
I think that ScopedRegistryHost is not needed here, but you can do something else.
Fixes #89