I am truing to use noUiSlider in my react application. I have done the initialization in my componentDidMount method but noUiSlider is not visibble. I am not getting any error in console. The element list also shows that nouislider is present on page, but I cannot see it.
import noUiSlider from 'nouislider'
class AppBarComponent extends Component {
componentDidMount(){
var noUi_slider = document.getElementById('noUiSlider');
$(function () {
noUiSlider.create(noUi_slider, {
start: [20, 80],
connect: true,
range: {
'min': 0,
'max': 100
}
});
}
componentWillUnmount(){}
render() {
return (
<div>
<div id="noUiSlider" className="bg-success"></div>
</div>
);
}
};