React - Game of Life - Update state of specific elements in 2D array depending on which elements are clicked by user
问题 I'm still learning React and working on coding John Conway's Game of Life. I have created a game board for the game using a 2D array in state. I have this 2D array stored in state in my App.js . I also have two functional components, Gameboard.js and Square.js receiving props and creating the game board. Gameboard.js creates a table and passed props to Square.js letting it know which squares should be highlighted and which shouldn't. In other words it let's each individual square know if the