React Basics + HR Questions

1. What is React and why is it used?
Answer:
React is a JavaScript library for building user interfaces. It is used because it makes UI development faster, easier, and more efficient with:
Component-based architecture
Virtual DOM for faster rendering
Unidirectional data flow
2. What is JSX?
Answer:
JSX (JavaScript XML) is a syntax extension that lets you write HTML-like code inside JavaScript. Example:
const element = <h1>Hello, React!</h1>;
JSX is compiled to React.createElement
under the hood.
3. What are components in React?
Answer:
Components are reusable building blocks of UI. They can be:
Functional Components: plain JS functions returning JSX.
Class Components: ES6 classes with lifecycle methods (less common now).
4. What are props in React?
Answer:
Props (properties) are read-only inputs passed to components. They make components dynamic and reusable.
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
5. What is state in React?
Answer:
State is a mutable data object that determines how a component renders and behaves. Unlike props, it can change over time.
const [count, setCount] = useState(0);
6. Difference between props and state?
Answer:
Props: passed from parent → child, immutable.
State: managed within the component, mutable using
setState
oruseState
.
7. What is the Virtual DOM?
Answer:
The Virtual DOM is a lightweight copy of the real DOM that React uses to detect changes and update only the affected elements, improving performance.
8. What are React hooks? Name some commonly used ones.
Answer:
Hooks allow functional components to use state and lifecycle features. Common hooks:
useState
→ state managementuseEffect
→ side effects (API calls, timers)useContext
→ context APIuseRef
→ access DOM elements / persist valuesuseReducer
→ complex state logic
9. HR Q: What is your greatest strength as a fresher software developer?
Answer (Sample for someone from commerce):
My greatest strength is adaptability. Coming from commerce, I had to learn everything from scratch, and I did it by building projects and practicing consistently. This shows I can quickly pick up new technologies and apply them effectively.
10. HR Q: What challenges have you faced while switching from commerce to software, and how did you overcome them?
Answer:
The biggest challenge was the technical gap. I didn’t have a CS degree, so I had to rely on self-study, documentation, and practice. I solved it by creating projects step by step and breaking complex concepts into smaller ones. This persistence built my confidence and problem-solving ability.
Subscribe to my newsletter
Read articles from Deven Rikame directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Deven Rikame
Deven Rikame
Full-Stack Developer specializing in MERN, Next.js, and TypeScript with a strong focus on building scalable, responsive, and user-friendly applications. Experienced in integrating custom APIs, deploying production-ready solutions, and writing clean, maintainable code. Passionate about problem-solving, open source, and continuous learning.