Lodash help needed

My refactoring continues: https://codesandbox.io/s/l9kq6j6nll?fontsize=14

Problem: I am trying to move body of table out so it’s reusable. Trying to use lodash to build each cell of table. For some reason, it’s not seeing my data and is therefore going to “default” value.

Please help - thanks!

What’s the name of the file?

File is: src >> components >> common >> tableBody.jsx


I replaced

<td>{_.get(each, “column.path”, “default”)}</td>

with <td>{each[column.path]}</td>

because I am not familiar with Lodash. Is this what you were looking for? You just had to access correct properties.

1 Like