Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

error TypeError /chip-search.js: Duplicate declaration “React”

  • I am new to react .
  • I just included a new file to existing sandbox named chip-search.js Its immediately throwing this error TypeError /chip-search.js: Duplicate declaration "React"
  • Can you tell me how to fix it.
  • I tried debugging but not sure why this happening.
  • providing my code snippet and sandbox below https://codesandbox.io/s/r5q34mm5jq
return (
<div>
<Chip
style={{ fontSize: 14, backgroundColor: '#b2dfdb', color: '#263238', display: this.state.display ? "" : "none" }}
label={this.state.chipName}
onDelete={this.handleDelete}
color="primary"
deleteIcon={<DoneIcon />}

/>
<Chip
style={{ display: 'block', backgroundColor: '#26a69a', color: 'white', display: this.state.display ? "none" : "" }}
// aria-owns={anchorEl ? 'simple-menu' : undefined}
aria-haspopup="true"
onClick={this.handleClickOpen}
color="primary"
label={"test"}

deleteIcon={<DoneIcon style={{ borderRadius: '50%', backgroundColor: 'red' }} />}
/>

<Menu
id="simple-menu"
// anchorEl={anchorEl}
open={open}
onClose={this.handleClose}
>
<div>
<div>{this.props.textFeild1}</div>
<TextField
key={this.props.textFeild1}
onChange={this.onChangeValue1}
onKeyDown={this.handleKeyPress}
/>
</div>
<div>{this.props.textFeild2}</div>
<TextField
key={this.props.textFeild2}
onChange={this.onChangeValue2}
onKeyDown={this.handleKeyPress}
/>
</Menu>
</div>
);

Comments