Skip to content

has.check must compile to custom check in props declaration #2

@gaperton

Description

@gaperton

So, it should use this form of the prop check:

function(props, propName, componentName) {
    if (!/matchme/.test(props[propName])) {
      return new Error(
        'Invalid prop `' + propName + '` supplied to' +
        ' `' + componentName + '`. Validation failed.'
      );
    }
  },

Which gives us an opportunity to drop prop-types dependency completely, always emitting our custom checks. Which is gooooood.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions