Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.04 KB

ANSWERS.md

File metadata and controls

31 lines (19 loc) · 1.04 KB

Answers.MD - Jashele Tillman

  • Why would you use class component over function components (removing hooks from the question)?

    • Class components gives you different benefits over functional components such as State and Lifecycle Hooks


  • Name three lifecycle methods and their purposes.

    • componentWillMount : Your component is going to appear on the screen very shortly.
    • shouldComponentUpdate : Can be used to to stop a component from calling render if necessary.
    • componentWillUnmount : Can be used for any clean up you may need to do.


  • What is the purpose of a custom hook?

    • Custom hooks are good for when you want to re-use the same logical & non-visual behavior for multiple inputs, events, etc.


  • Why is it important to test our apps?

    • It's less expensive to fix things later on if we test our code from the very beginning.
    • It encouragess us to write better code.
    • It helps us consider edge cases.