0
votes

I am getting the error described in the title in the "Line 29:21", does anyone know what is causing this error?

Code

1
return that component from the map - ChandraKumar
Please post text, not images of text. - Dave Newton

1 Answers

1
votes

You need to return the <div> from your map() call. Since the div you create in the map isn't returned by the map or assigned to anything, it effectively disappears after the map is finished. The warning you are seeing is the result of this eslint rule:

https://eslint.org/docs/2.0.0/rules/no-unused-expressions#rule-details

Remember that while arrow functions do have implicit returns, this only applies when the arrow function has a single expression as the function body.