Open mahdix opened 4 weeks ago
I'm using latest version (2.0.7). Looks like if I change a non-trivial state inside onInput handler, it causes infinite calls to the handler:
I simply modified the original codesandbox: url
Basically, my change is like:
onInput={(e) => { setV({ ...v, min: e.minValue, max: e.maxValue }); console.log("onInput called"); }}
and it causes the loop;
If I use two separate state variables, everything works fine.
setMin(e.minValue); setMax(e.maxValue);
I created a separate component and using that i have two slider component it is now re-rendering creating infinite loop
I'm using latest version (2.0.7). Looks like if I change a non-trivial state inside onInput handler, it causes infinite calls to the handler:
I simply modified the original codesandbox: url
Basically, my change is like:
and it causes the loop;
If I use two separate state variables, everything works fine.