DEV Community

Cover image for React Interview(Part-1)
Atul Bhatt
Atul Bhatt

Posted on • Updated on

React Interview(Part-1)

Below you'll find the interview questions that I was asked and also I use to ask in the React interviews.

With almost working 1 year as a React Developer in a startup I have played plethora of roles as its core-member and learned a lot there. And one of the roles I had to perform was of a technical interviewer.

We were mostly focusing on hiring interns who would learn with us in their 2 months of internship and if they do well we would offer them a full time job.

Amidst all this I also had to go through the interview processes for client in which I used to flunk until a point came when I was acing them.

So I'm writing this article to highlight few of these questions in a single place. You're welcome to answer these questions in the comments.

Now where were we? So yes, selecting right candidates for internship process was very crucial as we were a very small team of 5 people in which only four were React DEVs.
So in this article I'm going to share few of the basic beginner level questions which goes from the beginner to the intermediate level that I frequently ask in the interviews I take.

I'm not sure if this is a post or a startup story but all I hope from this post is that it reaches to someone whom it may be helpful.

So let's start.😏

Like any other normal interview my first statement starts with salutations and greeting followed by "Please Introduce Yourself?🤓"

This question is important for setting up the tone of the interview. With this question I'm giving the candidates the chance to express themselves and give the interview any direction they want.

"What are the projects you have done?"
Then comes the very first and the most basic react question -What is React?
And when the candidate answers this question all I look are the keywords to frame my next question around this answer.
So the most common keywords are "JS library" and sometimes the candidates also answer "JS Framework", "Component", "Virtual Dom", and few more which varies.

Now the next question can be any of the below👇

Is React library or framework?
What is the difference between library and a framework?
What is Virtual Dom?
How Virtual Dom works?
Life cycle methods of React?
Difference between state and props?
What are the different types of libraries you have used in your project?
What are hooks? Can you name some hooks other than useState and useEffect?

Some questions goes beyond beginner level if the candidate keeps on answering the previous questions👌. I don't mind checking the depth of concepts the candidate is clear about.

I also keep mixing👨‍🍳 JS questions in between such as:

What is the difference between == and ===?
What is the difference between let, const, and var?
By any chance do you know the difference between deep copy and shallow copy?
How do we pass props in Functional Component?
What is JSX?
If JSX is JS + XML, which part of JSX is related to XML?
Why we have to use camelCase to write CSS properties in JSX, such as:
const myStyle = {backgroundColor:"red"}
Why can't we use it as we do it in our native css.

In how many ways we can use useEffect hook?
What is the difference between import Random from ".../random" and import {Random} from "../random?

Have your heard about axios?
What about interceptors in axios?

What you prefer async-await or promises? Why?

Are you familiar with context or Redux? If yes, then why do we need them or when do we need them?

Few UI questions:

Explain Margin and Padding?
What is CSS box?
How many types of position are there?
How and when to use position absolute?
What is the default position?
Do you know what is box-sizing?

I'll be wrapping up this first part of the article here. I'll be glad to read you answers to these question in the comment section.

And don't forget to mention your approach towards taking interviews. How you approach it? And I know there might be some flaws🥺 in asking these questions so you are free to point them out.

Thanks for reading out. See you back in my next post.😀

Top comments (2)

saikrishnabanda5 profile image


atulbhattsystem32 profile image
Atul Bhatt

Thanks :)