Skip to content

Use functional components where possible #154

Description

@tbtommyb

If you have React components that only call render you can express this more succinctly (and React runs them faster) as a functional component:

const BackButton = ({ link }) => (
  <Link to={link}>
    ...
  </Link>
);

Destructing the props argument is a super-common React pattern that can clean up your code quite a lot.

Metadata

Metadata

Assignees

Type

No type

Fields

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