Tutorial by Examples

To change view in your application you can use setState - this will re-render your component and any of its child components. setState performs a shallow merge between the new and previous state, and triggers a re-render of the component. setState takes either a key-value object or a function that...
You should initialize state inside the constructor function of your component like this: export default class MyComponent extends Component { constructor(props) { super(props); this.state = { myInteger: 0 } } render() { return ( <View> ...

Page 1 of 1