Skip to content

Commit

Permalink
Update App.vue to use composition api
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyFeliz committed May 10, 2021
1 parent 9d3f30e commit 4efc5f8
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,25 @@
</TweetEmbed>
</template>

<script lang="ts" setup>
<script lang="ts">
import { defineComponent } from "vue";
import TweetEmbed from "./components/vue-tweet.vue"
function onTweetLoadSuccess(embedNode: HTMLElement) {
console.log(embedNode);
}
export default defineComponent({
components: {
TweetEmbed
},
setup() {
function onTweetLoadSuccess(embedNode: HTMLElement) {
console.log(embedNode);
}
function onTweetLoadError() {
console.log("Ops... an error has occurred");
}
return { onTweetLoadSuccess, onTweetLoadError }
}
})
function onTweetLoadError() {
console.log("Ops... an error has occurred");
}
</script>

0 comments on commit 4efc5f8

Please sign in to comment.