All Projects → ambit-tsai → vue2-helpers

ambit-tsai / vue2-helpers

Licence: Apache-2.0 license
🔧 A util package to use Vue 2 with Composition API easily

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue2-helpers

vesselize
⛵ A JavaScript IoC container that works seamlessly with Vue.js and React.
Stars: ✭ 22 (-65.62%)
Mutual labels:  composition, composition-api
v-bucket
📦 Fast, Simple, and Lightweight State Manager for Vue 3.0 built with composition API, inspired by Vuex.
Stars: ✭ 42 (-34.37%)
Mutual labels:  composition, composition-api
vue-snippets
Visual Studio Code Syntax Highlighting For Vue3 And Vue2
Stars: ✭ 25 (-60.94%)
Mutual labels:  composition, composition-api
Clean Code Javascript Tr
JavaScript için Uyarlanmış Temiz Kod Kavramları
Stars: ✭ 232 (+262.5%)
Mutual labels:  composition
Decoders
Elegant validation library for type-safe input data (for TypeScript and Flow)
Stars: ✭ 246 (+284.38%)
Mutual labels:  composition
go-traits
A concept package that helps implement mixin behavior using embedded structs and hook interfaces.
Stars: ✭ 21 (-67.19%)
Mutual labels:  composition
konad
Monads composition API that just works. For OOP developers
Stars: ✭ 62 (-3.12%)
Mutual labels:  composition
Nstack
Type-safe, composable microservices for data analytics
Stars: ✭ 219 (+242.19%)
Mutual labels:  composition
vuo
A realtime visual programming language for interactive media.
Stars: ✭ 103 (+60.94%)
Mutual labels:  composition
vuex-hooks
Typescript enabled vuex composition-api hooks
Stars: ✭ 12 (-81.25%)
Mutual labels:  composition-api
kudojs
A utility library to write code in functional programming style in Javascript
Stars: ✭ 22 (-65.62%)
Mutual labels:  composition
2019-ncov-vue3-version
新型冠状病毒实时疫情 Vue-Compostion-Api版本 (Vue3 + TypeScript)
Stars: ✭ 55 (-14.06%)
Mutual labels:  composition-api
WereSoCool
A language for composing microtonal music built in Rust. Make cool sounds. Impress your friends/pets/plants.
Stars: ✭ 41 (-35.94%)
Mutual labels:  composition
Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (+267.19%)
Mutual labels:  composition
UnderstandingLanguageExt
This is a tutorial that aims to demonstrate the practical fundamentals behind using LanguageExt in a fashion though step-by-step tutorials which introduce and then build up on concepts.
Stars: ✭ 73 (+14.06%)
Mutual labels:  composition
Sheet Router
fast, modular client-side router
Stars: ✭ 219 (+242.19%)
Mutual labels:  composition
vuse-rx
Vue 3 + rxjs = ❤
Stars: ✭ 52 (-18.75%)
Mutual labels:  composition-api
Solid
.NET apps done SOLID way
Stars: ✭ 18 (-71.87%)
Mutual labels:  composition
functional-structures-refactoring-kata
Starting code and proposed solution for Functional Structures Refactoring Kata
Stars: ✭ 31 (-51.56%)
Mutual labels:  composition
GpuZen2
Sample code for the article 'Real-Time Layered Materials Compositing Using Spatial Clustering Encoding'
Stars: ✭ 17 (-73.44%)
Mutual labels:  composition

Vue2 Helpers

A util package to use Vue 2 with Composition API easily.

NOTE:

  • vue2-helpers@1 is for vue2.5 and 2.6
  • vue2-helpers@2 is for vue2.7

⬇️ Install

npm i -S vue2-helpers

📃 Usage

import { createVuexHelpers } from 'vue2-helpers';
import { useRouter } from 'vue2-helpers/vue-router';

const { useState } = createVuexHelpers<
    RootState, RootGetters, RootMutations, RootActions
>();
// Get a reactive and mutable ref object "stateA"
const { stateA } = useState('module', ['stateA']);

const router = useRouter();
router.push('/login');

API

vue2-helpers

Features Description
createVuexHelpers<
    RootState, RootGetters, RootMutations, RootActions
>(): {
    useState, useGetters, useMutations, useActions
}
The helper methods in return value are
used to replace mapState, mapGetters,
mapMutations, mapActions

vue2-helpers/vuex

Features Description
createStore<S>(options: StoreOptions<S>): Store<S>
useStore<S = any>(): Store<S>

vue2-helpers/vue-router

Features Description
createRouter(options: RouterOptions): Router
onBeforeRouteLeave(leaveGuard: NavigationGuard): void
onBeforeRouteUpdate(updateGuard: NavigationGuard): void
useRoute(): RouteLocationNormalized
useRouter(): Router
router.isReady(): Promise<void>

☎️ Contact

  1. WeChat: cai_fanwei
  2. QQ Group: 663286147
  3. E-mail: [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].