Please sign in to comment.
Stop passing around tile component
The logic around flipping tiles and marking them as correct was previously contained in methods that the Board called on the Tile component. While somewhat neat, this is not idiomatic react. Instead, the Tile class should get most of what it needs to render in its props, and all the logic should be contained in the Board class. In general, passing components around, calling methods on them, and accessing another component’s props are all anti-patterns.
- Loading branch information
Showing with 72 additions and 54 deletions.