That way, you can map over it without the need to make it into an array. Or, if you have no control of the shape, preprocess the object, as you have done, into an array, before using it in your component.
I was just showing the way my data is structured in my database, it’s not hardcoded, I get it from my Context who pulls it from my database.
Also, sadly I can’t make games_list into an array. That’s what I did first but I’m using Cloud Firestore for my database and if I want to modify something, like for example hoursPlayed for game1, I have to rewrite all of game1 everytime. games_list being an Object makes everything simpler.
Just to be more precise : the data is good and I can access it. For example, if I do :
it works, I get what I’m looking for. If I only have one game to render in my page, it also works perfectly. But if I have two or more games, it seems to be rerendering and looping forever, as you can see in the gif in the OP.
I think we need to see more of the code to help. Not sure why it would re-render if the data isn’t changing. Can you try giving the div a unique key instead of using the index.