mini-vue
mini-vue copied to clipboard
A mini version of Vue 3 with reactivity, runtime, and compiler modules
mini-vue
Reactivity
- [x] reactive
- [x] readonly
- [x] shallow readonly
- [x] ref
- [x] proxy ref
- [x] computed
- [x] reactive effect
- [x] custom scheduler
- [x] on stop
Runtime Core
- [x] virtual node and
hAPI - Component initalization
- [x] handle mount stateful component, element, and text node
- [x] handle mount children
- [x] handle mount fragment node
- [x] render named slots
- [x] get current instance API
- [x] provider & dependency injection
- [x] handle emit custom event
- [x] support custom renderer
- Component update
- [x] handle props update
- props is modified, added
- props is deleted
- props is set to undefined or null
- [x] handle children update
- Diff:
- [x] new elements appended to the end
- [x] new elements appended to the start
- [x] compare middle portion:
- add new elements
- remove old elements
- patch existing elements
- Diff:
- [x] handle component update
- [x] optimize component update using microtasks
- [x] next tick
- [x] handle props update
Compiler Module
- [ ] Todo