JSFiddle - React, Tailwind, and code Playground

by darkylmnx

HTML

<script src="https://unpkg.com/[email protected]/dist/vue-router.js"></script>
<div id="app">
  <button @click="$router.push('/?login=1')">regular push</button>
  <button @click="$router.push({ redirect: '/?login=1' })">push redirect</button>
  {{ $route.query }}
  <div v-show="$route.query.login == '1'">
    you can login
  </div>
  <router-view></router-view>
</div>

Vue

const router = new VueRouter({
	routes: [
  	{
    	path: '/',
      component: {
      	template: `<div>Hello i'm the home</div>`
      }
    }
  ]
})


new Vue({
	el: '#app',
  router,
})