a toy mixing Vue and React features
just for fun 🕹️
-
Vue
- reactivity
- composition api
- lifecycle hooks
- class and style normalize
- custom renderer
- provide, inject
- inherit attrs
- Fragment
- quick diff algorithem when children with keys
- v-show, v-model
- custom directives
- element ref
- KeepAlive
- Teleport (i.e., Portal in React)
- defineProps
-
React
- JSX
- stateful functional component
- props.children (i.e., slots in Vue)
- render props
-
other lib and tools
- JSX parser (extend the React JSX)
- assets bundler (no bundling, use native ES modules in the browser) 📦
- watch mode
- dev server
- hmr(i.e., hot module replacement)
- tree-shaking
- json loader
- assets loader
- html plugin
- inject renderFactory plugin
-
router
-
state managing
checkout the demo code