I have an issue with using Lodash + setInterval.

What I want to do:
Retrieve randomly one element of my object every 3 seconds

this is my object:

```
    const [table, setTable]= useState ([]);

```

so I start with that:

```
const result = _.sample(table);
   console.log(result);

```

console give => Object { label: "Figue", labelEn: "fig" }

But if a add :

```
const result = _.sample(table);
   console.log(result.label);

```

console give => TypeError: result is undefined

Beside that I tried to add setInterval and also try with useEffect but or code crash or console give me two numbers every 3 second => 2,6,2,6 ......