I am using gulp to build my JSX.
As of now I have react code that uses some jQuery:
this.setState({exceptionsEdit: manual_exceptions}, function(){
this.state.exceptionsEdit.forEach(function (exp, index){
$('#exception-list-edit').nth-child(index).find('.ui-slider').slider("values", 0, Date.parse(this.state.exceptionsEdit[index].start)/1000)
$('#exception-list-edit').nth-child(index).find('.ui-slider').slider("values", 1 , Date.parse(this.state.exceptionsEdit[index].end)/1000)
})
})
I am setting the state of exceptionsEdit
and then running some jQuery. But when I load my page i receive the following error:
Uncaught ReferenceError: child is not defined
$('#exception-list-edit').nth - child(index).find('.ui-slider').slider("values", 0, Date.parse(this.state.exceptionsEdit[index].start) / 1000);
What can I do about this? Should I not use nth-child? Alternatives that are jsx/react friendly?