hey guys I have a global variable which can hold my count of items.and I have have a class which can contain a textbox and showing my count on header. when I update my global variable .. like global.variable = 5 and then I'm updating it like.. ++global.variable. it update its value but it can't serenader that textbox at that time and that textbox is used in many classes. here's my count class
class count extends Component {
constructor(props){
super(props);
state = {
xyz:0
}
}
render() {
return (
<Text style={{color:'white',fontSize:10}}>{global.count}</Text>
)}
}
export default count;
and this way that I'm using this class
<count />
I want that whenever I do global.count++ it can increase its value and update that value on textbox and that text is used in many..and that item is in header thanks...