Skip to content

Commit 8607256

Browse files
authored
Update README.md
Update example to comply with the vue/no-deprecated-router-link-tag-prop ESLint rule
1 parent 382547e commit 8607256

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ If you are using Composition API, you can access the OktaAuth instance with `use
195195

196196
<template>
197197
<div id="app">
198-
<router-link to="/" tag="button" id='home-button'> Home </router-link>
198+
<router-link to="/" custom v-slot="{ navigate, isActive, isExactActive }" id="home-button">
199+
<button :class="{ 'router-link-active': isActive, 'router-link-exact-active': isExactActive }" @click="navigate">
200+
Home
201+
</button>
202+
</router-link>
199203
<button v-if='authState && authState.isAuthenticated' v-on:click='logout' id='logout-button'> Logout </button>
200204
<button v-else v-on:click='login' id='login-button'> Login </button>
201205
<router-view/>

0 commit comments

Comments
 (0)