Sensible checkbox groups manipulation for DOM.
npm install react-checkbox-group

This is your average checkbox group:
``html`
Repetitive, hard to manipulate and easily desynchronized.
Lift up name and onChange, and give the group an initial checked values array.
See below for a complete example
`sh`
npm install react-checkbox-group
or
`sh`
yarn add react-checkbox-group
Simply require/import it to use it:
`tsx`
import CheckboxGroup from 'react-checkbox-group'
`tsx
import React, { useState, useEffect } from 'react'
import CheckboxGroup from 'react-checkbox-group'
const Demo = () => {
// Initialize the checked values
const [fruits, setFruits] = useState
useEffect(() => {
const timer = setTimeout(() => {
setFruits(['apple', 'orange'])
}, 5000)
return () => clearTimeout(timer)
}, [])
return (
{(Checkbox) => (
<>
>
)}
)
}
ReactDOM.render(
``
MIT.