DEV Community

Discussion on: Is there a way I can use class abstraction to interact with React components?

Collapse
 
dance2die profile image
Sung M. Kim

There are two built-in hooks, useState and useReducer.

A Grid-based state using either useState or useReducer (useState internally uses useReducer). .

If you have other states such as loading, score, win/loss to be updated at the same time as the grid-based state changes, you might want to use useReducer, as it lets you update multiple states at once.