You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you also want to reuse a piece of template, you can provide a special `$template` key on a scope object. The value can be the template string, or an ID selector to a `<template>` element:
The `<template>` approach is recommended over inline strings because it is more efficient to clone from a native template element.
202
+
166
203
### Global State Management
167
204
168
205
You can use the `reactive` method (re-exported from `@vue/reactivity`) to create global state singletons:
@@ -255,7 +292,9 @@ Check out the [examples directory](https://github.com/vuejs/petite-vue/tree/main
255
292
256
293
### Has Different Behavior
257
294
295
+
- Most expressions has access to its bound element as `$el` (except for structural directives like `v-if` and `v-for`)
258
296
-`createApp()` (accepts global state instead of root component)
297
+
- Components
259
298
- Custom directives
260
299
261
300
### Vue Compatible
@@ -279,7 +318,6 @@ Check out the [examples directory](https://github.com/vuejs/petite-vue/tree/main
279
318
Some features are dropped because they have a relatively low utility/size ratio in the context of progressive enhancement. If you need these features, you should probably just use standard Vue.
280
319
281
320
-`ref()`, `computed()` etc.
282
-
- Components (see "Reuse Logic" section above)
283
321
- Template refs (just use selectors)
284
322
- Render functions (`petite-vue` has no virtual DOM)
285
323
- Reactivity for Collection Types (Map, Set, etc., removed for smaller size)
0 commit comments