#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
React Fundamentals

History of React

React is a JavaScript library for building user interfaces from components. It began inside Facebook as a way to manage interfaces that changed constantly, such as news feeds, comment threads and chat, where keeping the screen in sync with the data by hand had become error-prone. Knowing how it evolved explains why React code looks the way it does today: function components, hooks, JSX and a declarative style.

The problem React set out to solve

Before React, many web apps updated the page by finding DOM elements and changing them directly, often with jQuery, or by two-way data binding in frameworks of that era. As apps grew, it became hard to know which piece of code had changed which part of the page. Bugs appeared when two updates conflicted or when the data and the screen drifted apart.

React's answer was a declarative model. You describe what the UI should look like for the current data, and React works out the DOM changes needed to get there. When data changes, you describe the new UI again rather than writing step-by-step DOM edits.

Early ideas that shaped it

  • Components: the UI is split into self-contained pieces that take props and manage their own state.
  • JSX: an HTML-like syntax inside JavaScript, so markup and the logic that drives it live together. It was controversial at first, because it broke the habit of keeping HTML and JavaScript in separate files.
  • The virtual DOM and reconciliation: React compares a lightweight description of the new UI with the previous one and applies only the differences to the real DOM.
  • One-way data flow: data moves from parent to child through props, which makes changes easier to trace.

React was created by Jordan Walke, a software engineer at Facebook, used internally first, and then released as open source. Instagram's web app was one of its early users.

How the library grew

After its open-source release, React's ideas spread to other platforms. React Native applied the same component model to native mobile apps. The core team later rewrote React's internals in a project known as Fiber, which made rendering work interruptible and laid the groundwork for later features.

The biggest shift for everyday developers came with hooks. Before hooks, components that needed state or lifecycle methods had to be classes. Hooks such as useState and useEffect let function components do the same, and made it easy to share stateful logic through custom hooks. That is why modern React code is written mostly with functions.

// Older style: class component
class Counter extends React.Component {
  state = { count: 0 };
  render() {
    return (
      <button onClick={() => this.setState({ count: this.state.count + 1 })}>
        {this.state.count}
      </button>
    );
  }
}

// Modern style: function component with a hook
function CounterHook() {
  const [count, setCount] = useState(0);
  return <button onClick={() => setCount(count + 1)}>{count}</button>;
}

More recent releases added concurrent rendering features, such as transitions that keep the interface responsive during heavy updates, and Server Components, which let some components run on the server and send ready-made output to the browser. React also moved its main documentation to react.dev, which teaches function components and hooks first.

A misunderstanding about React's history

People sometimes describe React as a full framework, or assume it was the first component-based tool. It was neither. React focuses on the view layer; routing, data fetching and build tooling come from other libraries or from frameworks built on React, such as Next.js. Many of its ideas existed elsewhere first, and its contribution was combining them in a simple, consistent model.

A second point of confusion is older tutorials. Because React changed, guides that use createClass, componentWillMount or ReactDOM.render reflect earlier APIs. Current code uses function components and createRoot.

What the history tells you

React grew from one idea, that the UI should be a function of state, and kept refining how that idea is expressed: classes became functions, lifecycles became hooks and rendering became interruptible. When learning, prefer resources built on function components and hooks.

Ready to master real-world web development?

Learn HTML, CSS3, Bootstrap and JavaScript hands-on with mentor-led sessions.

Explore Course