Skip to content
On this page

@screaming/use

Introduction

@screaming/use is a collection of bespoke Vue 3 composables.

View source code.

WARNING

@screaming/use's composables must be used inside a component's setup function, or inside components defined using <script setup>.

Installation

TIP

@screaming/use comes pre-installed in all @screaming/froggo projects.

Install with your favourite package manager:

sh
# yarn
yarn add @screaming/use

# pnpm
pnpm add @screaming/use

# npm
npm install @screaming/use
1
2
3
4
5
6
7
8

Import as required:

vue
<!-- script setup (recommended) -->
<script setup lang="ts">
import { ... } from '@screaming/use'

// ...
</script>
1
2
3
4
5
6
vue
<!-- setup function -->
<script lang="ts">
import { defineComponent } from 'vue'
import { ... } from '@screaming/use'

export default defineComponent({
  setup() {
    // ...
  }
})
</script>
1
2
3
4
5
6
7
8
9
10
11