Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:privatenumber/vue-frag
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Dec 17, 2021
2 parents 3d9ae56 + d5dd042 commit 5cb51d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vue-frag <a href="https://npm.im/vue-frag"><img src="https://badgen.net/npm/v/vue-frag"></a> <a href="https://npm.im/vue-frag"><img src="https://badgen.net/npm/dm/vue-frag"></a> <a href="https://bundlephobia.com/result?p=vue-frag"><img src="https://badgen.net/bundlephobia/minzip/vue-frag"></a>

Use [Vue 3's Fragment feature](https://v3.vuejs.org/guide/migration/fragments.html) in Vue 2 to return multiple root elements
Use [Vue 3's Fragment feature](https://v3.vuejs.org/guide/migration/fragments.html) in Vue 2 to return multiple root elements.

```vue
<template>
Expand All @@ -25,6 +25,15 @@ export default {

👉 [Try it out on CodePen](https://codepen.io/hirokiosame/pen/PoNVZbV)!

<table>
<td>
<strong>🔥 Pro-tip</strong>
<br><br>
Want to be able to just have multiple root-nodes in your SFC without a wrapper?
Use <a href="https://github.com/privatenumber/vue-frag-plugin">vue-frag-plugin</a> to automatically inject vue-frag so that you can return multiple root nodes without a fragment component!
</td>
</table>

<sub>Support this project by ⭐️ starring and sharing it. [Follow me](https://github.com/privatenumber) to see what other cool projects I'm working on! ❤️</sub>

## 🌟 Features
Expand Down Expand Up @@ -215,6 +224,7 @@ Here are all the DOM APIs Vue.js uses that are patched:


## 👨‍👩‍👧 Related
- [vue-frag-plugin](https://github.com/privatenumber/vue-frag-plugin) - Build-time plugin to seamlessly use multiple root nodes
- [vue-subslot](https://github.com/privatenumber/vue-subslot) - 💍 pick out specific elements from component `<slot>`s
- [vue-vnode-syringe](https://github.com/privatenumber/vue-vnode-syringe) - 🧬 Add attributes and event-listeners to `<slot>` content 💉
- [vue-proxi](https://github.com/privatenumber/vue-proxi) - 💠 Tiny proxy component
Expand Down
1 change: 1 addition & 0 deletions src/fragment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import frag from './frag.js';

export default {
name: 'Fragment',
directives: {
frag,
},
Expand Down

0 comments on commit 5cb51d4

Please sign in to comment.