What is React.js, and what are its key features?
Answer: React is an open-source JavaScript library for building user interfaces. Its key features...
For further actions, you may consider blocking this person and/or reporting abuse
I value the content you've shared, but I'm uncertain if companies would really ask these specific questions since they seem quite theoretical and might not reflect a candidate's practical React experience.
Moreover, there's an inconsistency in your post. When discussing "Explain the difference between functional components and class components in React," you noted that functional components are stateless. However, in your later section on "Explain React Hooks", you bring up
useState
. It's key to note thatuseState
provides state to a component, and it's only for functional components.In fact the only question that I can really imagine being asked here is the last one about prop drilling, that is a good question for someone applying for a junior role.
Thank you so much for sharing your opinions. I've just mentioned 10 questions that I've faced as a ** junior Frontend role** at the time of the first screening session in some of my recent interviews. After the first screening, I had to face some coding tasks where I needed to prove how much I knew about the react ecosystem.
And the second thing is You're absolutely correct, and I appreciate your keen observation. I apologize for any confusion. Functional components in React can indeed manage state using hooks like useState, which contradicts the earlier statement that functional components are stateless. React Hooks, such as useState, useEffect, and others, have allowed functional components to handle state and side effects, blurring the line between functional and class components.
To clarify:
Functional components can manage state using hooks like useState.
Class components can manage state using this.state.
React Hooks have made it possible for functional components to have local component state, which was traditionally a feature of class components. Thank you for pointing out the inconsistency, and I hope this clarification helps.
Can u post more questions? I'm preparing for an interview I seem to bit lost about where to or what to prepare for the interview. if u can share your experience it'll be helpful.
Thank you so much, Sakthi.
I'll upload a new post about React JS interview questions soon.
Also thinking about sharing a post where I'll talk about how I got my first job as a junior front-end developer
That'll be helpful
Really? They seem pretty basic questions to me.
I didnβt say they werenβt basic π Theyβre basic theoretical questions, nothing that actually says you have any experience writing code to solve problems.
I see. Sorry, I saw this first when I woke up.
To be honest, all this kind of school-like questions seem kinda stupid to me. Makes much more sense going through a portfolio project and explain the hows and whys. It show many things at once: the programming proficiency, the knowledge about the technologies used, the problem solving skills, and presentation skills too. Whatever, things rarely make sense in the labor market. π«
I 100% agree with this!
I see far too many people entering the developer market focusing on the wrong things and then they wonder why they can't set themselves apart when searching for a decent job in the market.
I think I was a bit too diplomatic in my original reply to this article. These school like questions are going to get people nowhere...
It's kinda ironic, as I am saying this while I have't landed my first interview yet, for an embarrassingly long time! Iπ
However many organizations nowadays ask some basic and theoretical questions on their first screening session. And I was also facing those theoretical questions that's why I wrote this article.
These questions might be basic theory but I think they would give the interviewer an insight into the basic understanding of the react eco system that the candidate has. You might not give such a textbook sounding reply but Responding to this in your own words possibly with examples demonstrating the nuances can help the interviewer know if you understand what youβre working with. Itβs like someone using a useEffect hook for data fetching because it was learnt in tutorials and now muscle memory. Explaining the concept of the effect would make them realise they had limited knowledge of it.
Yes I agree with that when you explain any of them you must know that how it works and also give an example will help the interviewer to understand that you know how to and where to use it.
Where and how do you use the virtual dom?