Created
April 10, 2019 16:09
-
-
Save goodpic/715850236cab026711e4e879c2904cb9 to your computer and use it in GitHub Desktop.
react-native-example-for-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { Component } from 'react'; | |
import { Text } from 'react-native'; | |
interface IProps { | |
count?: number; | |
} | |
interface IState { | |
count: number; | |
} | |
class TestClass extends Component<IProps, IState> { | |
state: IState = { | |
count: this.props.count || 0, | |
}; | |
render() { | |
return(<Text testID='counter'>{this.state.count}</Text>); | |
} | |
} | |
export default TestClass; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment