I am working on this program and have been going back and forth between different ways to conceptually structure the components.
Here is where I’ve landed – for now:
MapContainer holds an array of Squares
–Square holds either a Creature, Item, Potion, or Landscape
----Each of those keeps track of its stats, in addition to a SquareDisplay
------SquareDisplay renders based on passed props from its parent
Does that make sense? See, I learned C++ back in the day and my objects were permanent things that kept track of their own properties. It is very confusing for me to think of React as rendering things that are more transient, and then re-rendering new ones that are the “same ones”.
If that structure makes sense, do I pretty much have to take the leap into Flux for storing the info? Otherwise it seems like I’d be passing a TON of props down through the chain.