Hi, I just saw that the ref usage has changed with...
# react
p
Hi, I just saw that the ref usage has changed with 0a1fa23. I don't understand how I am supposed to use Callback Refs now. Does someone has a simple example please ?
t
Copy code
val onContainer = useRefCallback<HTMLDivElement> { container ->
  // do job
}

div {
    ref = onContainer
}
Copy code
// UNSAFE
div {
    ref = RefCallback<HTMLDivElement> {
        it // div? 
    }
}
p
Thanks a lot @turansky it's working great !
🤪 1