This is no where near complete, and I have purposefully disconnected the app from the backend, because I do not have rate-limiting on the backend. So, the data is missing some things.
I assumed giving each Tile a unique key would have sufficed to not cause this issue. currently, the key is the index of each element, just because the test data does not have any other unique element. I did test with an actual unique identifier in the production code, but no change
Glad it helped, I can’t say that I did much except looking at the live version in FireFox dev tools, which has this nice feature of showing an event tag if an event listener is attached to an element, and noticed that it was missing.
Let me pick your brain a little if you don’t mind, I see a lot of vanilla DOM manipulation methods in your code like querySelector('thing').addEventListener('blah', handleBlah), is that normal in React code? Because I always think that instead of doing that, I should rather attach an onBlah event to the element when rendering, to make sure I do it the “React” way.
Not in the slightest… I have just been refactoring this, but originally had it as vanilla JS so everything is quite messy, and mismatched.
Up til’ you mentioned that, it had actually slipped my mind that React has events other than onClick… Perhaps that will resolve the issue in a more reliable way.