react-component / react-component/slider

Example with a custom handle - warning in the console

Open
#712 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

Hi, thank you for your awesome slider!

I want to implement a custom handler. As a base I've taken the following example:
https://github.com/react-component/slider/blob/master/examples/handle.jsx

When I try to run this simple example:

import Slider from "rc-slider";

...

const handle = (props) => <Slider.Handle {...props} />;

const App = () => (<Slider handle={handle} />);

Then I get the following warning in the console:
image

Let's try yourself here:
https://codesandbox.io/s/rc-slider-custom-handle-warning-col3f

The handle is causing the warning. And the fixedHandle does not.

Can you somehow fix this? Thank you very much.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/handle.jsx and reproduce the warning using the linked CodeSandbox. Compare the custom handle with fixedHandle and trace the warning from the custom-handle entry point. Done means the custom handle example runs without the reported console warning while retaining its behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.