Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Array.prototype.map() expects a return value from arrow function array-callback-return

Using React or JSX? don't use map as-
props.users.map((user) => {
  <li>{user.name}</li>
});

Use '()' instead of '{}'

props.users.map((user) => (
  <li>{user.name}</li>
));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #expects #return #arrow #function
ADD COMMENT
Topic
Name
4+3 =