Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createSlider() {
var slider = (this.slider = noUiSlider.create(this.sliderContainer, { ...this.props }));
var uuid = this.props.uuid;
var socket = this.props.socket;
slider.on('update', function(data) {
socket.emit(uuid + '#update', msgpack.encode(data));
});
slider.on('change', function(data) {
socket.emit(uuid + '#change', msgpack.encode(data));
});
slider.on('slide', function(data) {
socket.emit(uuid + '#slide', msgpack.encode(data));
});
slider.on('set', function(data) {
socket.emit(uuid + '#set', msgpack.encode(data));
});