score:2

Accepted answer
 const [active, setActive] = React.useState<ButtonGroupState>({ ... })

score:2

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js"></script>
<div id="react"></div>

score:3

const [active, setActive] = React.useState<AO>({ /* ... */ });

Related Query

More Query from same tag