Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement