What if I tell you could replace:
this.val.addListener(({ value }) => {
this.ref.current.setNativeProps({
style: {
width: value,
height: value
}
})
})
with
connect(this.ref.current, this.val, "width")
connect(this.ref.current, this.val, "height")
in order to omit JS trip