It means when I click a box its background color change to red. When click another box its background color also change to red but previous box must be reseted. In my app previous box not reset. I think because component recreated when click box and state is recreated so the previous state is lost. And when click out of boxes the previous selected must be unselected. This stuation also not working. My app here https://codesandbox.io/s/single-selected-fdg82?file=/src/Grid.js Any suggestion?
Where is your grid. Js file?
Grid.js folder is empty
Обсуждают сегодня