react-rangeslider: No longer working with React 15.3.2
This library used to work well in my application with React 15.1.0, but since I upgraded it no longer works. The page now crashes and here is the warning and error I get:
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of ...
.
invariant.js:38 Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of ...
.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 1
- Comments: 16 (3 by maintainers)
@edgehero Can you explain your solution? Here is what I have, which is not working:
= behind handleChange is not not expected
handleChange = (value) => { this.setState({ value: value })
how to solve this error
With react-15.4.2 I get:
Seems like the
onChange
is invoked in a very early stage before component is mounted.When developing with create-react-app (React 15.3.2, React Scripts 0.6.1), I have no issues, but when I build the project i’m running into the issue where after the mount the slider is stuck at 0 value and will not move. After I resize the window, i’m able to change the position of the slider.