This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
export default class Api { | |
static getUsers() { | |
return axios.get(`https://jsonplaceholder.typicode.com/users`); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="data-table"> | |
<h1>{{headerTitle}}</h1> | |
<br> | |
<table class="table table-bordered table-condensed table-info table-hover"> | |
<thead> | |
<tr> | |
<th v-for="column in columns" class="label-cell sortable-cell" :id="column" @click="sort">{{column}}</th> | |
</tr> | |
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am darrenjennings on github. | |
* I am darrenjennings (https://keybase.io/darrenjennings) on keybase. | |
* I have a public key ASBQgUi8V_OHguh7gPmPexpQ3VZEsuCMyvGAf9OWT96TIQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueToAKill from "./VueToAKill.vue"; | |
const VueToAKillLib = { | |
install(Vue) { | |
Vue.component("vue-to-a-kill", VueToAKill); | |
} | |
}; | |
export default VueToAKillLib; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { shallow } from "vue-test-utils"; | |
import { createRenderer } from "vue-server-renderer"; | |
import VueToAKill from "../src/VueToAKill.vue"; | |
const defaultProps = { | |
agents: ['James Bond', 'Alec Trevelyan', 'M', 'Q'], | |
licenseToKill: true | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Mouse = { | |
name: "Mouse", | |
props: { | |
render: { | |
type: Function, | |
required: true | |
} | |
}, | |
data() { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<Mouse :render="__render"/> | |
</div> | |
</template> | |
<script> | |
import Mouse from "./Mouse.js"; | |
export default { | |
name: "app", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<x-vue yell>Dude</x-vue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div class="stutterer"> | |
<svg | |
height="310" | |
width="310"> | |
<circle | |
ref="face" | |
class="clockFace" | |
cx="155" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StateMachine, interpret, EventObject } from '@xstate/fsm' | |
import { ref, Ref, onBeforeMount } from '@vue/composition-api' | |
export default function useMachine<TContext, TEvent extends EventObject = EventObject> ( | |
stateMachine: StateMachine.Machine<TContext, TEvent, any>): { | |
current: Ref<StateMachine.State<TContext, TEvent, any>>, | |
send: StateMachine.Service<TContext, TEvent>['send'], | |
service: StateMachine.Service<TContext, TEvent>, | |
} { | |
const current = ref(stateMachine.initialState) as Ref<StateMachine.State<TContext, TEvent, any>> |
OlderNewer