Skip to content

Commit

Permalink
Add @todo comment
Browse files Browse the repository at this point in the history
  • Loading branch information
strdr4605 authored Jan 27, 2020
1 parent 04e2173 commit 5ef3e2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export const App = () => {
const [sliderValues, setSliderValues] = useState(defaultSliderValues);

function onChange(values) {
/**
* @todo Fix the problem with updating when an array is used as value
* @desc There is a problem when dragging the slider.
* The onChange function is triggered the values come as [value1, value2]
* but when updating the state, React doesn't rerender MapContainer
* because in the state there is same array. To solve this issue,
* array is saved as string and in MapContainer we split the string to get value.
*/
setSliderValues(values.toString());
}

Expand Down

0 comments on commit 5ef3e2b

Please sign in to comment.