You are on page 1of 1

A software company needs to implement a new component in ReactJS that consumes a

REST API and display the result on the screen. Loading the API data will be done by
a standard ReactJS method when the component is mounted

Name lifecycle methods and their purpuse

constructor
static getDerivedStateFromProps
render
componentDidMount

why do we use arrow func in react ?

how to prevent components from re-rendering ?

Explain error boundaries

best lifecycle method for making api calls ?


componentDidMount

React Patterns
context-api pattern
render props
presentation component pattern

why whould you use react in your project ?


base on the project itself
compere to other frameworks
funcional programing and its just javascript

what is css-in-js pattern ?

What are components in React ?


componentes are the building blocks of any React application , and a single
app usually consists of mutiple components
A component is essentially a piece of the user interface

What is the use of render() in React ?


it is a compulsory for each component to have a render function
render function returns the HTML which is to be displayed in a component

What is State in React ?


state of a component is an object that holds some data
What are props in React ?
props is shorts for properties, that allow us to pass arguments or data to
components

You might also like