L
L
lexstile2018-11-30 11:42:25
JavaScript
lexstile, 2018-11-30 11:42:25

arrow-body-style eslint error?

I don’t quite understand what’s wrong , I tried different options, it doesn’t help, the last one:

{data.clients.map((value, index) => { // 68 line
    return (
      <Table.Cell key={index}>{value}</Table.Cell>
    );
  })}

Error: ./src/lien-page-future-owners.jsx
Line 68: Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>` arrow-body-style

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-11-30
@lexstile

{data.clients.map((value, index) => <Table.Cell key={index}>{value}</Table.Cell>)}

or:
{data.clients.map((value, index) => (
  <Table.Cell key={index}>{value}</Table.Cell>
))}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question