You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"device" - object i am getting from the props or from selector const device = useSelector(getDeviceInfo(id), _.isEqual)
The problem is: when i call onSlidingComplete - function, the device.state has an old state, even, i a checked by console.log(device.state) in the compopent and device.state in the function on onSlidingComplete - there are different values.
The problem is, that i change state of temperature in CircleSlider, trying to update main state
{ state: { ...device.state!, temp_sp: newValue}
but if change in another component, for example device.state.fan_speed - device.state inside of onSlidingComplete didnt know about that..
If i use some standard sliders from react-native - all work fine.
The text was updated successfully, but these errors were encountered:
It seems there is a problem inside of component with "stale closure". I`am use the function to provide to onComplete:
"device" - object i am getting from the props or from selector
const device = useSelector(getDeviceInfo(id), _.isEqual)
The problem is: when i call onSlidingComplete - function, the device.state has an old state, even, i a checked by console.log(device.state) in the compopent and device.state in the function on onSlidingComplete - there are different values.
The problem is, that i change state of temperature in CircleSlider, trying to update main state
but if change in another component, for example device.state.fan_speed - device.state inside of onSlidingComplete didnt know about that..
If i use some standard sliders from react-native - all work fine.
The text was updated successfully, but these errors were encountered: