Recently, I had an interview for a React Developer role. Sharing the questions here in case it helps someone preparing for similar roles. Some of the questions they asked: 1. What is Authentication vs Authorization? 2 What is a Virtual DOM? How is a Virtual DOM created? 3. What is Palindrome? A string that reads the same forward and backward Example: madam, level 4. How JWT is used in real projects? 5 What is HOC (Higher Order Component) in React? Overall, the round was focused on practical understanding of React, JavaScript rather than just theory. #React #JavaScript #Redux #Frontend #InterviewExperience
React Interview Questions: Authentication, Virtual DOM, JWT, HOC
More Relevant Posts
-
Sometimes, a component is the wrong tool for the job. If you need to perform low-level DOM manipulation — like automatically focusing an input or adding a tooltip. Instead of cluttering your component logic with refs and onMounted hooks, you can encapsulate that behavior in a directive like v-focus or v-tooltip. It keeps your template clean: <input v-focus /> And the logic is reusable across your entire app without the overhead of a full component instance. ☺️🤖 #vuejs #frontend #javascript #webdev #codingtips
To view or add a comment, sign in
-
Senior React devs don’t memorize every hook. They understand when components re-render. Most real-world bugs I’ve seen come from: • unnecessary re-renders • overusing useEffect • memoizing without measuring Once you deeply understand: props changes state updates referential equality React becomes predictable and much easier to optimize. Don’t fight renders. Understand them. #react #frontend #javascript #webperformance #nextjs
To view or add a comment, sign in
-
🔥 Hidden React Fact #3 React re-renders more than you think… and it’s NOT always bad 👀 Most devs panic when they hear “extra re-renders”. But here’s the truth 👇 👉 Re-render ≠ DOM update What actually happens: React re-runs your component function Creates a new Virtual DOM Uses the diffing algorithm Updates the real DOM only if needed 💡 Key insight React prefers cheap re-renders over complex manual optimizations. The real performance killers ❌ • Heavy calculations inside render • Unnecessary object/array recreation • Incorrect useEffect dependencies The smart approach ✅ Optimize what happens during render, not the render itself. Stop fighting re-renders. Start understanding them. This mindset shift alone can level up your React skills #HiddenReactFacts #ReactJS #FrontendDevelopment #JavaScript #ReactPerformance #WebDevelopment #NextJS #TypeScript #FrontendEngineering #DevCommunity
To view or add a comment, sign in
-
-
🔄 Understanding React’s useState: the core of reactive programming useState is the Hook that allows components to automatically react to state changes. Instead of manually updating the DOM, you simply change the state — and React handles the UI updates. Key takeaways: useState returns the current state value and a setter function State should never be mutated directly When state changes, all dependent components re-render automatically If the new state depends on the previous one, always use the functional update pattern For expensive initial values, use lazy initialization This is what makes React so powerful: 👉 you focus on what changes, not how to update the UI. That’s reactive programming in action 🚀 #React #ReactJS #Frontend #FrontendDevelopment #JavaScript #WebDevelopment #Hooks #useState #ReactiveProgramming #SoftwareEngineering
To view or add a comment, sign in
-
💡 𝗧𝗶𝗽 𝗼𝗳 𝘁𝗵𝗲 𝗗𝗮𝘆 — 𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 𝗗𝗶𝗱 𝘆𝗼𝘂 𝗸𝗻𝗼𝘄? In React, 𝘂𝗽𝗱𝗮𝘁𝗶𝗻𝗴 𝘀𝘁𝗮𝘁𝗲 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲 𝘀𝗮𝗺𝗲 𝘃𝗮𝗹𝘂𝗲 𝗱𝗼𝗲𝘀 𝗻𝗼𝘁 𝘁𝗿𝗶𝗴𝗴𝗲𝗿 𝗮 𝗿𝗲-𝗿𝗲𝗻𝗱𝗲𝗿. React uses "Object.is" to compare the previous and next state. If they’re the same, React skips the re-render entirely. Why this matters: - Prevents unnecessary renders - Helps you reason about performance - Explains why some "setState" calls appear to “do nothing” Understanding this makes state behavior feel far less magical. #React #ReactJS #FrontendDevelopment #JavaScript #WebDevelopment #SoftwareEngineering #CodingTips #PerformanceOptimization #FullstackDeveloper
To view or add a comment, sign in
-
-
Something new I learned about React today… I thought setState() updates immediately. But React batches state updates. Example: 👉 setCount(count + 1); 👉 setCount(count + 1); You might expect +2… But it becomes +1. Why? React queues updates and processes them together in the next render cycle. Both calls use the same previous count value. Why does React do this? Because DOM updates are expensive. Batching helps: ✅ Reduce unnecessary re-renders ✅ Improve performance ✅ Keep UI updates efficient Correct way when depending on previous state: 👉 setCount(prev => prev + 1); 👉 setCount(prev => prev + 1); 💡 Realization: State updates are scheduled, not instant. #ReactJS #JavaScript #FrontendDevelopment #WebDevelopment #SoftwareEngineering #CodingJourney #LearningInPublic #DeveloperLife #ReactInternals #FrontendEngineer #TechInterview #StateManagement
To view or add a comment, sign in
-
🚀 Vue.js at Mainloop We use Vue.js, a progressive JavaScript framework, to create fast and reactive web applications. Perfect for projects where code scalability and maintainability are essential. #Mainloop #VueJS #FrontendDevelopment #JavaScript #WebDevelopment
To view or add a comment, sign in
-
-
🚀 𝐑𝐞𝐚𝐜𝐭 𝐍𝐞𝐰 𝐇𝐨𝐨𝐤: 𝐮𝐬𝐞𝐄𝐟𝐟𝐞𝐜𝐭𝐄𝐯𝐞𝐧𝐭 ✅ React devs know the pain 😅 useEffect + dependencies often leads to: ⚠️ stale closures ⚠️ re-runs you didn’t want ⚠️ lint warnings / dependency confusion 💡 𝐄𝐧𝐭𝐞𝐫: 𝐮𝐬𝐞𝐄𝐟𝐟𝐞𝐜𝐭𝐄𝐯𝐞𝐧𝐭 ✅ lets you create stable event handlers ✅ always reads the latest props/state ✅ avoids unnecessary useEffect dependency issues ✅ perfect for callbacks like: 👉 onScroll, onClick, setInterval, subscriptions 📌 𝐈𝐝𝐞𝐚: ➡️ keep your effect reactive ➡️ keep your event logic stable This makes React code: cleaner + predictable + less buggy 💯 💬 Have you tried useEffectEvent yet? #React #ReactJS #Frontend #WebDevelopment #JavaScript #Hooks #useEffect #SoftwareEngineering
To view or add a comment, sign in
-
Re-renders aren’t the problem. Unnecessary re-renders are. This was one of the biggest React lessons I learned while working on real projects. Performance issues rarely come from “React being slow” — they come from how we structure components and state. Small frontend decisions scale fast. Understanding how React thinks matters more than memorizing hooks ⚛️ #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #MERNStack #SoftwareEngineering #PerformanceOptimization #CleanCode
To view or add a comment, sign in
-
-
React and Vue solve many of the same problems, but they encourage different ways of thinking. React leans into explicit state flow and composition, which scales well as applications and teams grow. Vue focuses on approachability and clear separation between template, logic, and state, making complex UIs easier to reason about early on. Understanding both isn’t about choosing sides — it’s about choosing the right trade-offs for the system you’re building. #ReactJS #VueJS #FrontendEngineering #JavaScript #WebArchitecture #SoftwareEngineering
To view or add a comment, sign in
More from this author
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Please comment and share so that others can benefit as well.