@vue-composable/router

@vue-composable/router

Usage no npm install needed!

<script type="module">
  import vueComposableRouter from 'https://cdn.skypack.dev/@vue-composable/router';
</script>

README

@vue-composable/router

vue-composable logo

npm version bundle size

Introduction

Use router library with the composition-api

Installing

# install with yarn
yarn add @vue/composition-api @vue-composable/router

# install with npm
npm install @vue/composition-api @vue-composable/router

Documentation

// main.js
import VueComposableRouter from "@vue-composable/router";

// this is required
Vue.use(vueComposableRouter);

// component.vue

import { getVueRouter } from "@vue-composable/router";

export default {
  setup() {
    getVueRouter().push("/");
  }
};

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b feat/new-composable
  3. Commit your changes: git commit -am 'feat(composable): add a new composable'
  4. Push to the branch: git push origin feat/new-composable
  5. Submit a pull request

License

MIT