i want this box(View) in style width and height +1
i not write style={{width:{{this.state.w}},height{{this.state.h}},backgroundColor:'blue'}}
export default class App extends Component {
constructor(props){
super(props);
this.state = {
w: 50,
h: 50,
}
}
_addBox(){
this.setState ({
w:this.state.w + 1,
h:this.state.h + 1
});
}
render() {
return (
<view>
<view style="{{{styles.box}}}">
<view style{{width:xxxx,height:xxxx,backgroundcolor:'blue'}}>
<text style="{styles.box}">
{this.state.w}
</text>
</view>
<buttontitle="add box"="" onpress="{this._addBox.bind(this)}" />
</view>
</view>
);
}
}
help me :(