๐:0
selectionRange
is a state, thus it needs to be included in dependency array:
useEffect(() => {
setChartData({
labels: dataDate(selectionRange),
// ...
})
}, [selectionRange]);
๐:0
selectionRange
is a state, thus it needs to be included in dependency array:
useEffect(() => {
setChartData({
labels: dataDate(selectionRange),
// ...
})
}, [selectionRange]);