React Native pure component



    Khalid Khan

    React Native companion for Typescript

    This code creates a new interface and class. The AppProps interface defines the properties that an App component may have. The App class extends React.PureComponent and takes in an AppProps object as a constructor parameter. The App class then renders a simple View component with a Text component inside it.

    Library: react-native

    Shortcut: reactnative.component.pure

    import * as React from 'react';
    import { View, StyleSheet, Text } from 'react-native';
    export interface AppProps {
    export default class App extends React.PureComponent<AppProps, any> {
      constructor(props: AppProps) {
      public render() {
        return (
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.