I have this class containing a string and the variable:
class Number extends Component{
var num = 8
render(){
return{
<Text>The number is: </Text> + num
}
}
}
However, I'm getting this error
Unexpected token (31:6)
var num = 8
^
Is there any way I can get the class to return both the text and the variable when used?
<Number/>