1.1.4 • Published 2 years ago

sample-composables v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Quick Setup

  1. Create a new Vue 3 project.

  2. In your Vue 3 project install this package using:

    npm install sample-composables

    or

    yarn add sample-composables
  3. This repo contains a composable called sampleComposable which can be used in App.vue as follows:

        <template>
            <img alt="Vue logo" src="./assets/logo.png" />
            <button @click="increment()">{{ count }}</button>
        </template>
    
        <script lang="ts" setup>
            import { useSampleComposable } from "sample-composables";
            const { count, increment } = useSampleComposable();
        </script>
        <script lang="ts">
            export default {
                name: "App",
            };
        </script>
    
        <style>
        #app {
            font-family: Avenir, Helvetica, Arial, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-align: center;
            color: #2c3e50;
            margin-top: 60px;
        }
        </style>
  4. Run yarn serve and click on the button rendered to see the count increment.

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago