Skip to content

Commit

Permalink
remove unncessary useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierdonnellon committed Aug 1, 2023
1 parent 6e47fb6 commit b32eb8a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/RangeSlider/RangeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,9 @@ export const RangeSlider = ({

const [ref, sliderBounds] = useMeasure({ polyfill: ResizeObserver });

const pixelPositions = useMemo(
() =>
processedValues.map(val => {
return (val.value / domain) * sliderBounds.width;
}),
[processedValues, sliderBounds, domain],
);
const pixelPositions = processedValues.map(val => {
return (val.value / domain) * sliderBounds.width;
});

// get the x offset and an animation setter function
const [{ dragHandleX }, springRef] = useSpring(() => ({
Expand Down

0 comments on commit b32eb8a

Please sign in to comment.