Skip to content

Files

Latest commit

b89ea3d · Oct 3, 2023

History

History
16 lines (14 loc) · 701 Bytes

ReactJSInterviewQ.md

File metadata and controls

16 lines (14 loc) · 701 Bytes
  1. React Virtual DOM
  2. React Profiler
  3. Error boundery
    • static getDerivedStateFromError - update the state with error, so that component will render fallback component.
    • componentDidCatch - can log error message.
  4. React Lifecycle
  5. React Context --> Communication channel, doesn't bother about data organization.
  6. controlled (component is controlled by parent component props) vs uncontrolled Component
  7. lazy loading --> React.lazy() and React.Suspense fallback={
    Loading...
    }
  8. Performance Optimization
    • use shouldComponentUpdate.
    • Not mutate state or props, use spread operator and provide new object everytime.
    • avoid accesing dom directly.