Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react'
- import {
- View,
- ActivityIndicator,
- Button,
- } from 'react-native'
- export class App extends Component {
- state = { loading: false }
- activate = () => this.setState({ loading: true })
- render() {
- const { loading } = this.state
- return (
- <View>
- <ActivityIndicator
- size='large'
- color='#ff0000'
- animating={loading}
- />
- <Button
- title='Click me'
- onPress={this.activate}
- />
- </View>
- )
- }
- }
- export default App
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement