I am getting ESlint error for the following line this.state.items.map(item => (
The error is Must use destructuring state assignment
That's called:
Enforce consistent usage of destructuring assignment of props, state, and context (react/destructuring-assignment)
More details are available here: destructuring-assignment
In order to make that warning/error disappear, you could do like this:
...
const { items }= this.state;
...
{
items.map(item => (
<div key={item}>
{
item.links.map(thing => (
<NavLink
key={thing.link.id}
exact
to={thing.link.url}
>
{thing.link.text}
</NavLink>
))
}
</div>
))
}