Relative Content

Tag Archive for cssreactjsclassnameternaryreact-props

React – Using ternary to apply CSS class in functional component

I’m relatively new to React and working on a John Conway – Game of Life app. I have built a Gameboard.js functional component for the board itself (which is a child of App.js) and a Square.js functional component which represents an individual square in the board (and is a child of Gameboard and a grandchild of App).