Skip to content

lematosdev/didact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Didact

A simplified React-like library built for learning and experimentation with the core concepts of React — including JSX parsing, virtual DOM, hooks, and reconciliation.


🚀 Goals

Didact aims to replicate essential behaviors of React in a minimal and understandable way. The project is designed as an educational tool to understand how React works under the hood.


✅ Features (Implemented)

  • JSX support (via Babel or pragma)
  • Virtual DOM creation
  • Basic DOM rendering

🛠️ To Do

  • Use an object for the style prop
    Parse the style attribute from JSX as an object and apply it correctly to the DOM.

  • Flatten children arrays
    Ensure that nested arrays in JSX children (e.g., fragments or map) are flattened before rendering.

  • Implement useEffect hook
    Mimic the behavior of React’s useEffect to manage side effects after render.

  • Reconciliation by key
    Track and compare elements using the key prop to improve performance and avoid unnecessary DOM updates during diffing.


💡 Getting Started

Install dependencies and start the dev server:

pnpm install
pnpm run dev

🧠 Learning Resources

- [Build your own React](https://pomb.us/build-your-own-react) by Paul Henschel

- React source code: github.com/facebook/react

🧑‍💻 Author

Carlos Matos

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published