UIProviders/Widgets have too much power #1385
Replies: 1 comment 1 reply
|
Good callout about the docs, I'll update the documentation of different To solve the described problem you are probably looking for the This is different from |
|
Good callout about the docs, I'll update the documentation of different To solve the described problem you are probably looking for the This is different from |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Recently we encountered a situation where a widget was making fairly expensive calls to a backend and slowing down viewer initialization. While there were other issues with startup making the app slow, it got me thinking - why are widgets granted the power to bring apps to a crawl if they aren't even visible? Why is it left up to the widget creator to handle the conditions of initialization (by checking the widget state and listening to widget state change events)?
Couldn't we provide UiProviders initialization and events through props? There could be an eager init callback for any loading the widget might have to do before it is activated. This would make it much more clear how UIProviders are supposed to be initialized and ensure they don't slow down viewer startup.
Either way, I think UI docs should mention something about this.
All reactions