Render a List from an Object in React
(Source/Credits: https://dev.to/afewminutesofcode/render-a-list-from-an-object-in-react-2ica)
image from undraw.co Sometimes the data we want to render in a list will be in an object rather than...
Sometimes the data we want to render in a list will be in an object rather than an array, to render it as a list we can take advantage of Object.keys so that we can map over the item like we would on a standard array.⠀
Note you could also look at using es6 Object.values or Object.entries here as well.
Check out the video below.
{% instagram B1YzzRSF-JE %}
Head over to the reactjs.org docs for some more great examples.
Comments section