This project is a minimal and simplified version of React built from scratch, created for learning and experimentation purposes.
It supports:
createElementto create elementsuseStatehook to manage state- Rendering components and text nodes
- Basic event handling (e.g., button clicks)
createElement(type, props, ...children)builds a virtual DOM object.render(element, container)renders the virtual DOM into the actual DOM.useState(initialValue)provides a simple way to add state and update the UI.
-
Clone this repository.
-
Open
index.htmlin your browser. -
See the MiniReact app running — you can interact with buttons that update state using
useState.
index.html— main HTML file, includes script and stylesminiReact.js— core MiniReact implementation (createElement, render, useState)styles.css— styles inspired by React official docs