React Js Best Practices

Reusability — HOC
Small & Function-specific Components
Component Name After the Function
Component Names must be in Capitals
Lazy Loading
Use JSX ShortHand
Use Ternary Operators
Use Fragments
 Don’t Define a Function Inside Render
Use Memo
Put CSS in JavaScript
Use Object Destructuring
Use Template Literals

//Ternary Operators
const { role } = user;
return role === ADMIN ? <AdminUser /> : <NormalUser />