I have created multiple checkboxes and the values of checkboxes are storing in a form of array but i dont want to store it in the form of array elements. i wanted to display in normal way without array.
Here is the code:
<Form>
<Checkbox
as="h4"
label="Carrom"
onChange={() => this.props.handleCheck("Carrom")}
checked={this.props.game.includes("Carrom")}
/>
<br />
<Checkbox
as="h4"
label="Ludo"
onChange={() => this.props.handleCheck("Ludo")}
checked={this.props.game.includes("Ludo")}
/>
<br />
<Checkbox
as="h4"
label="Play-Station"
onChange={() => this.props.handleCheck("Play-Station")}
checked={this.props.game.includes("Play-Station")}
/>
</Form>;
Here is the working code: "https://codesandbox.io/s/tender-moon-frub1"
Can anyone help me in this?