Open d-ivashchuk opened 5 years ago
Notice with what frequency you use this pattern: this.state.smth, this.props.smth in your components? It could be overwhelming, as we generally understand from where this variable comes from. That's where destructuring comes to the rescue. You could have smth like :
const {smth1,smth2,smth3} = this.state
const {prop1,prop2,prop2} = this.props
and then instead of having it this way:
this.props.prop1
, this.state.smth2
you would be able to use them like smth1, prop2, smth3 etc.
https://github.com/d-ivashchuk/memory-helper/blob/0ea43d5c6eb9e4175ceabf94ad60727c184a231f/src/Entry/entry.jsx#L44