Class Components
React Lifecycle
Custom Hooks and storage
Testing
100

What is the name of the base component that all components in react extend?

React.Component

100

what hook is used in function components to replace life cycle methods?

useEffect

100

name 3 examples of hooks

useEffect, useState, useForm, useMemo, etc.

100

What is the importance of automated testing?

to minimize the risk of bugs and broken code being sent to production 
200

What method is used in class components to render data to the DOM?

render()

200

which class-based lifecycle method should axios calls mainly be used inside?

componentDidMount

200

What is stateful logic?

logic built into a component that deals with state

200

name three common types of testing

integration, end to end, unit

300

What method must we call in react components in order to have access to special properties in the 'this' keyword?

super()

300

What are the three react lifecycle phases?

Mounting, Updating, Unmounting

300

What are custom hooks and why are they important?

custom hooks are blocks of stateful logic that are built by the developer. they are used to keep code reusable and dry

300

What is the library you used for testing today

jest/react testing library

400

True or False: state is persistent as long as the component is on the screen 

true

400

True or False: the render() method is called only during the Mounting phase

False. it is also called during the updating phase

400

every item in localStorage must be what type of data?

string

400

Explain the 'Arrange, Act, and Assert' framework

First, we “arrange” our test by setting up our code such that it can be tested. Then, we “act” - calling a method or function that returns a result of interest to our test. Finally, with that return we “assert” if our expected return matched the actual return.

500

In React, data is linked in a 'Uni-Directional' fashion. What does this mean?

Data is linked from top to bottom, Meaning that whatever is set on the state of one Component can be shared amongst all components by passing it down as props. 

500

what is the name of the method called in the unmounting phase?

componentWillUnmount

500

What is the difference between local Storage and session Storage?

local storage persists until the data is manually cleared while session storage persists until the window or tab is closed

500

besides RTL/jest, name 3 other testing libraries/ frameworks

Mocha, Cypress, Jasmine, Karma, Puppeteer

M
e
n
u