Big Chungus
05/09/2022, 11:48 AMDOMSideEffect or bring DOMScope to regular SideEffect? My use-case involves wrapping external JS component library in #kmdc project and I need an effect which runs on every composition and provides access to native DOM element to sync-up the compose state with the external JS component.
• DisposableEffect almost works as it has scopeElement, but it skips the initial composition
• SideEffect runs on all compositions, but doesn't provide access to scopeElement
• DOMSideEffect covers everything I need, but is deprecated
EDIT: looks like initial composition is "skipped" on my DisposableEffect handler due to missing js objects that I initialise in attrs::ref lambda. Shouldn't attrs::ref be invoked before DisposableEffect?Oleksandr Karpovich [JB]
05/09/2022, 12:24 PMBig Chungus
05/09/2022, 12:48 PMref order is that attrs are part of HTML Element's "metadata" and as such should be resolved before the content (i.e. inner DisposableEffect)Big Chungus
05/09/2022, 12:50 PMBig Chungus
05/09/2022, 1:16 PM