Skip to content Skip to sidebar Skip to footer

Convert String To Integer In Reactjs

if(this.state.chartCategory == 'D3Chart'){ console.log('chartdata for d3 charts', this.state.d3line.chartData); switch(this.state.chartType){ case 'area':

Solution 1:

I'm not really sure if this really is different using ReactJs, but did you try to parseInt() the strings?

I'm not really understanding what you are trying to do, but the most simple way for type-conversion would be the native functions of Javascript!?

https://www.w3schools.com/jsref/jsref_parseint.asp

Post a Comment for "Convert String To Integer In Reactjs"