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 Vue from 'vue' | |
import Router from 'vue-router' | |
import Hello from '@/components/Hello' | |
// loads Goodbye as async component and with a code split point | |
const Goodbye = () => import('@/components/Goodbye') | |
Vue.use(Router) | |
export default new Router({ | |
mode: 'history', |
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 Vue from 'vue' | |
import Router from 'vue-router' | |
import Hello from '@/components/Hello' | |
// loads components as async component and with a code split point | |
const Goodbye = () => import('@/components/Goodbye') | |
const Foo = () => import(/* webpackChunkName: "foo-bar" */ '@/components/Foo') | |
const Bar = () => import(/* webpackChunkName: "foo-bar" */ '@/components/Bar') | |
Vue.use(Router) |
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
<html> | |
<body> | |
<div id="app"> | |
<h1>Prerendered form</h1> | |
<form> | |
<div> | |
<label for="firstName">First name</label> | |
<input id="firstName" name="firstName" /> | |
</div> | |
<div> |
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
Vue.component('my-form', { | |
data: function () { | |
return { | |
email: '', | |
firstName: '', | |
lastName: '', | |
} | |
}, | |
template: ` | |
<div> |
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
Vue.component('my-form', { | |
data: function () { | |
return { | |
email: '', | |
firstName: '', | |
lastName: '' | |
} | |
}, | |
created: function () { | |
// retrieve previous values and previous focus |
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
Vue.component('my-form', { | |
data: function () { | |
return { | |
email: '', | |
firstName: '', | |
lastName: '' | |
} | |
}, | |
created: function () { | |
// retrieve previous values and previous focus |
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 React, { PureComponent } from 'react' | |
import { Svg, G, Rect } from 'react-native-svg' | |
export default class BarChart extends PureComponent { | |
render() { | |
const SVGHeight = 60 | |
const SVGWidth = 60 | |
const graphHeight = 50 | |
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
import React, { PureComponent } from 'react' | |
import { Svg, G, Line } from 'react-native-svg' | |
const GRAPH_MARGIN = 20 | |
const colors = { | |
axis: '#E4E4E4' | |
} | |
export default class BarChart extends PureComponent { | |
render() { |
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 React, { Component } from 'react' | |
import { StyleSheet, View } from 'react-native' | |
import BarChart from './Components/BarChart' | |
export default class App extends Component { | |
render() { | |
const data = [ | |
{ label: 'Jan', value: 500 }, | |
{ label: 'Feb', value: 312 }, |
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 React, { Component } from 'react' | |
import { StyleSheet, View } from 'react-native' | |
import BarChart from './Components/BarChart' | |
export default class App extends Component { | |
render() { | |
const data = [ | |
{ label: 'Jan', value: 500 }, | |
{ label: 'Feb', value: 312 }, |
OlderNewer