your recipe card header background

    reactClassPureComponentWithPropTypes

    0

    1

    lucycodes42

    JavaScript snippets for React

    When you use PropTypes in your code, the compiler will ensure that your code is valid and type-safe. In this example, the PropTypes module defines a list of property types that this generic class can expect. This means that React can validate that the class property defined in render() matches the expected types.

    Library: react

    Shortcut: rpcp

    import PropTypes from 'prop-types';
    import React, { PureComponent } from 'react';
    
    export default class ${1:filename} extends PureComponent {
      static propTypes = {}
    
      render() {
        return (
          <div>first</div>
        )
      }
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.