Skip to content

react/prop-types doesn't work with fragment syntax #1694

Closed
@bebraw

Description

Example:

import React from "react";

const ForAttendees = ({ page }) => (
  <>
    <section className="intro intro_attendees">{page}</section>
    <div className="grid--5col">barfoo</div>
  </>
);

export default ForAttendees;

react/prop-types does not capture this. If you replace the fragment syntax with divs, it detects the case.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions