Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import * as React from 'react';
  2. import { Component } from 'react';
  3. import { Text } from 'react-native';
  4.  
  5. interface IProps {
  6. count?: number;
  7. }
  8. interface IState {
  9. count: number;
  10. }
  11.  
  12. class TestClass extends Component<IProps, IState> {
  13.  
  14. state: IState = {
  15. count: this.props.count || 0,
  16. };
  17.  
  18. render() {
  19. return(<Text testID='counter'>{this.state.count}</Text>);
  20. }
  21. }
  22.  
  23. export default TestClass;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement