REACT Best Practices Writing Clean code - AndelaOSP/Andela-Socials GitHub Wiki
Writing cleaner code using ES6 Features
Writing cleaner code will make it easier to understand and maintain the code. ES6 features will give us much cleaner way of writing code in React.
- Use Destructuring & spread attributes:
Avoid this.
Instead do this.
- Use Arrow functions
Avoid this: