• Stars
    star
    465
  • Rank 91,265 (Top 2 %)
  • Language
    JavaScript
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ™ A minimal implementation of react-dom using react-reconciler

react-tiny-dom

react-tiny-dom is a minimal implementation of react-dom as custom renderer using React 16 official Renderer API.

The purpose of this project is to show the meaning of each method of the ReconcilerConfig passed to react-reconciler, by using a practical yet familiar environment: the browser DOM.

react-tiny-dom

What's supported

  • Nested React components
  • setState updates
  • Text nodes
  • HTML Attributes
  • Event listeners
  • className prop
  • style prop

What's not supported yet, but I plan to

The following features of react-dom are not supported yet but I'll probably add them:

  • Web Components

Any other feature which doesn't help explaining the Renderer API, like dangerouslySetInnerHTML, won't be supported on purpose, to keep the source code minimal and focused on simplicity.

Installation

npm install
npm start # Runs the example using react-tiny-dom

FAQ

How can I customize the methods logs in the console?

By default the demo logs most method calls of the Renderer, but you can pass a list of method names to exclude in the second parameter of debugMethods, when passing the ReconcilerConfig to Reconciler.

const TinyDOMRenderer = Reconciler(
  debugMethods(hostConfig, ['now', 'getChildHostContext', 'shouldSetTextContent'])
);

Obviously passing hostConfig directly to Reconciler will completely disable any method log.

More Repositories

1

pretty-algorithms

๐ŸŒŠ Pretty, common and useful algorithms with modern JS and beautiful tests
TypeScript
2,186
star
2

ng-animate

๐ŸŒ™ A collection of cool, reusable and flexible animations for Angular 14+
TypeScript
722
star
3

sinergia

โš’๏ธ Cooperative expensive tasks at 60fps via ES6 generators
JavaScript
162
star
4

react-kanban

๐Ÿ—“ Kanban board built with React.js and Redux
JavaScript
116
star
5

rx-polling

๐Ÿ“ฌ RxJS-based polling library with exponential backoff
TypeScript
66
star
6

gmail-smart-compose

A study implementation of Gmail Smart Compose trained with Keras and used in browser with Tensorflow.js
Jupyter Notebook
27
star
7

talks

Collection of my public talks
JavaScript
11
star
8

billy

๐Ÿ“  Angular 2+, RxJS and Redux Invoice Application
TypeScript
9
star
9

wealth

Personal financial management app in pure Javascript
JavaScript
8
star
10

fedra-thesis

Next-generation system for Computing Continuum via WebAssembly (WASM)
WebAssembly
7
star
11

ygo

๐Ÿƒ YuGiOh! PWA built with Web Components and hyperHTML
CSS
6
star
12

lab

Personal experiments with technologies
TeX
4
star
13

blog

Chronicles of a young developer's journey
MDX
3
star
14

gulp-react-browserify

๐Ÿ’ฅ Boilerplate for React.js development with Gulp and Browserify
JavaScript
3
star
15

gh-issues-for-comments

๐Ÿˆ Automatically create Github issues to use as blog comments
JavaScript
3
star
16

inkmark

Progetto P2
C++
2
star
17

libromastro

A webapp to keep track of your stock operations
TypeScript
2
star
18

fsm-editor

Finite State Machine editor
TypeScript
2
star
19

metalsmith-gh-comments

Metalsmith plugin for Github issues as blog comments
JavaScript
2
star
20

daisyhub

The favourite hub for Animal Crossing turnip exchange
TypeScript
2
star
21

telegram-nope-bot

A Telegram bot which alerts about NOPE value on tickers
TypeScript
2
star
22

webpack-react-boilerplate

Essential Webpack Boilerplate for React.js development with readable and minimal configuration
JavaScript
1
star
23

continuum

TeX
1
star
24

network-color

An educational game for anyone interested in Computer Science
TypeScript
1
star
25

brokerapi-rs

V2.16 Open Service Broker API compliant brokers in Rust
Rust
1
star
26

chattina

An MVC Chat, built in pure Javascript.
JavaScript
1
star
27

pwa

CSS
1
star
28

currency

๐Ÿ’ฐCurrency Exchange in React, Redux & Redux-Saga
JavaScript
1
star
29

jiayihu.github.io

Personal Website
JavaScript
1
star