Skip to content

Instantly share code, notes, and snippets.

@goodpic
Created April 10, 2019 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goodpic/f9638dcd4f5db927397992819bdab00a to your computer and use it in GitHub Desktop.
Save goodpic/f9638dcd4f5db927397992819bdab00a to your computer and use it in GitHub Desktop.
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