🦄
Everyting is JavaScript
Pinned Loading
-
React useState from scratch
React useState from scratch 1import React from 'react';
2import ReactDOM from 'react-dom';
34let callCount = -1
5let states = []
-
-
Vue.js-like Virtual DOM
Vue.js-like Virtual DOM 1<div id="app"></div>
2<script>
3// Create virtual node
4function h(tag, props, children) {
5// Return the virtual node
-
Vue.js-like reactive state
Vue.js-like reactive state 1<script>
2let activeEffect
34class Dep {
5subscribers = new Set()
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.