TokamakUI / Tokamak

SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms
Apache License 2.0
2.62k stars 111 forks source link

`_domRef` Not working with Fibre #552

Open shial4 opened 1 year ago

shial4 commented 1 year ago

Describe the bug Fatal error: Unexpectedly found nil while unwrapping an Optional value ._domRef($state.observedNodeRef) doesn't work when using fibre.

To Reproduce

private let ResizeObserver = JSObject.global.ResizeObserver.function!

let observerRef = ResizeObserver.new(closure)
_ = observerRef.observe!(state.observedNodeRef!)

Expected behavior Rect has the size of the content.