Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderMark component value infinite rerendering #204

Open
OlehMurenkyi opened this issue Jan 13, 2025 · 0 comments
Open

renderMark component value infinite rerendering #204

OlehMurenkyi opened this issue Jan 13, 2025 · 0 comments

Comments

@OlehMurenkyi
Copy link

I'm using "react-range" version "1.10.0"
When I use renderMark prop to draw custom marks on my range, I got infinite rerendering of value component.
Example:

<Range
        values={values}
        step={step}
        min={min}
        max={max}
        disabled={disabled}
        onChange={onChange}
        renderMark={({ props, index }) => {
          console.log({ props });
          return null;
        }}
        renderTrack={renderTrack}
        renderThumb={renderThumb}
      />

I've tried add console log to parent component. It is not rerendering. Only component inside renderMark.
I also tried wrapped rendered component to useCallback function, or to other component with using memo - does not help.
Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant