This message was deleted.
# javascript
s
This message was deleted.
s
What if you ?.let instead of !! ?
refs are null on unmount
h
No luck 😞 I had it behind a null check too when I first noticed it
getClientRects also causes the same issue
Also just want to add that the functions return, just that the rendering seems to stop after calling it
And i am calling this inside
Copy code
useEffect(*emptyArray())
Also strangely if I run the function outside useeffect in a coroutine I don’t have the issue
Copy code
scope.launch {
    delay(2000)
    val b = parentDivRef.current!!.getClientRects()

}
Seems like it is related to this. Have a delay seems to fix it somehow. So not kotlinjs related. Very odd bug https://stackoverflow.com/a/26348974/7954697