Skip to content

Instantly share code, notes, and snippets.

const routes = [
{
path: '/',
component: App,
meta: {
title: 'My Website- Homepage'
}
},
{
path: '/contact',
router.beforeEach((to, from, next) => {
document.title = to.meta.title
next()
})
// Register a global custom directive called `v-focus`
Vue.directive('focus', {
// When the bound element is inserted into the DOM...
inserted: function (el) {
// Focus the element
el.focus()
}
})
<template>
<div>
<GlobalEvents
@focus="handleAppFocus"
></GlobalEvents>
<!-- Component Contents -->
</div>
</template>
<script>
<li tabindex="0" class="checkbox" checked>
Check Me
</li>
<li tabindex="0" class="checkbox" role="checkbox" checked aria-checked="true">
Check Me
</li>
<template>
<div
:aria-hidden="!isActive"
role="button">
</div>
</template>
<script>
export default {
data: () => ({
brew install node
npm install -g react-native-cli
@emilyruby
emilyruby / gist:3e8a8ff280981c0a780ec605341b5a8f
Created April 14, 2018 14:33
Set up new React-Native Application
react-native init TreasureCache