https://github.com/waynecz/tiny-react-with-hooks
⚛︎ Fundamental Implementation of React with Hooks & VDOM
https://github.com/waynecz/tiny-react-with-hooks
hooks react
Last synced: about 1 year ago
JSON representation
⚛︎ Fundamental Implementation of React with Hooks & VDOM
- Host: GitHub
- URL: https://github.com/waynecz/tiny-react-with-hooks
- Owner: waynecz
- Created: 2018-12-18T11:52:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-11T04:21:33.000Z (over 7 years ago)
- Last Synced: 2025-03-01T23:27:07.553Z (over 1 year ago)
- Topics: hooks, react
- Language: TypeScript
- Homepage:
- Size: 1010 KB
- Stars: 20
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

A concise version of React just good enough for building uncomplicated UI
deadly suitable for SDK which cares about the size
Features
- Basic JSX and Renderer with VirtualDOM(diff & patch)
- Functional Component
- Hooks like `useState` / `useEffect`
Todo
- [ ] `useCallback` / `useMemo` ...
Demos
- [Simple usage](https://codesandbox.io/s/2pkyw29ymp)
- [Advanced: A Feedback UI](https://codesandbox.io/s/n7yvzjrkoj)

References
- [《Gooact: React in 160 lines of JavaScript》](https://medium.com/@sweetpalma/gooact-react-in-160-lines-of-javascript-44e0742ad60f) by [Paul Marlow](https://github.com/sweetpalma)
- [《React as a UI Runtime》](https://overreacted.io/react-as-a-ui-runtime/) by [Dan Abramov](https://overreacted.io)
- [《从零开始实现一个 React》](https://github.com/hujiulong/blog/issues/4) by [Jiuling Hu](https://github.com/hujiulong)
- [《React hooks: not magic, just arrays》](https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e) by [Rudi Yardley](https://github.com/ryardley)