How could I do something like this:
const [gameSpecs, setGameSpecs] = useState({
cols: 10,
rows: 10,
numOfCells: cols * rows,
});
I have read similar questions/answers for objects in vanilla JavaScript but they don't work with React.