This file contains hidden or 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
You need to change syntax to JavascriptReact. | |
Also you can make this syntax project default for new js files by creating file: | |
.vscode/settings.json with following content: | |
{ | |
"files.associations": { "*.js": "javascriptreact" } | |
} |
This file contains hidden or 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
// ----------------------------- | |
// export and import modules | |
// ----------------------------- | |
// uno.js | |
const uno = { | |
value: 1 | |
} | |
export default uno | |
// --- |
This file contains hidden or 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
props: { | |
value: { | |
type: Number, | |
default () { return 2 } | |
}, | |
min: { | |
type: Number, | |
default () { return 1 } | |
}, | |
max: { |
This file contains hidden or 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 Home = () => import(/* webpackChunkName: "home" */ './Home.vue'); | |
const About = () => import(/* webpackChunkName: "about" */ './About.vue'); | |
const Contact = () => import(/* webpackChunkName: "contact" */ './Contact.vue'); | |
const routes = [ | |
{ path: '/', name: 'home', component: Home }, | |
{ path: '/about', name: 'about', component: About }, | |
{ path: '/contact', name: 'contact', component: Contact } | |
]; |
This file contains hidden or 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> | |
<modal v-model="show" effect="fade">...</modal> | |
</template> | |
<script> | |
import Modal from 'vue-strap/src/Modal.vue'; | |
export default { | |
props: ['show'], | |
components: { | |
Modal |
This file contains hidden or 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="jumbotron">...</div> | |
<below-fold></below-fold> | |
<home-modal v-if="show" :show="show"></home-modal> | |
</div> | |
</template> | |
<script> | |
const BelowFold = () => import( |
This file contains hidden or 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="row marketing"> | |
<div class="col-lg-6"> | |
<h4>Subheading</h4> | |
<p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p> | |
... | |
</div> | |
... | |
</div> | |
</template> |
This file contains hidden or 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="jumbotron"> | |
<h1>Jumbotron heading</h1> | |
... | |
</div> | |
<below-fold></below-fold> | |
<!--All the code below here has been put into--> | |
<!--into the above component--> | |
<!--<div class="row marketing"> |
This file contains hidden or 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
'UPDATE_MEETUP' (state, payload) { | |
const sample = state.meetups.find(el => el.id === payload.id) | |
if (sample) { | |
if (payload.title) { | |
sample.title = payload.title | |
} | |
if (payload.description) { | |
sample.description = payload.description | |
} | |
if (payload.date) { |
This file contains hidden or 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
npm install -g [email protected] |