0

What is the correct way to avoid this linter message. 'Component definition is missing display name'

The file was created for breadcrumbs and simply export default (with props).

enter image description here

1 Answer 1

1

Option 1

Define the component as a variable and then export it

const MyComp = prop => (...)
export default MyComp

Option 2

Export the component as a named function

export default function MyComp() {}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.