PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

React · Theory

React Version

← All stacks

Theory

3/94

React Version

React versions matter because APIs changed. Class components were the default for years. Hooks arrived in 16.8. React 18 added createRoot and concurrent rendering. In a viva, say the era you write: function components + hooks, React 18+ createRoot — not ReactDOM.render.

Don’t mug a patch like 18.2.0 as if it were history. Check package.json on a real project. react and react-dom should share the same major. Mixing 17 and 18 is a support headache.

React Version — output — three era lines. Interview wants 18+ createRoot, not a random patch.

Exam tip

Hooks era + createRoot. Check package.json.

Example

// Versions
console.log("React 16: class + early hooks");
console.log("React 18: concurrent + createRoot");
console.log("Check package.json → react version");

React Version — output: three era lines. Interview wants 18+ createRoot, not a random patch.

Short notes

  • Def16.8 hooks. 18 createRoot.
  • RuleMatch react and react-dom majors.
  • TrapReciting ReactDOM.render as current.

Questions

1

When did hooks arrive?

2

What replaced ReactDOM.render?

Previous← Introduction to ReactNextInstall React →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.