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
| Vue.component('Counter', { | |
| functional: true, | |
| render(createElement, context) { | |
| return createElement(/**/) | |
| } | |
| }) |
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="list-container"> | |
| <ul v-if="items.length"> | |
| <li v-for="item in items"> | |
| {{ item.name }} | |
| </li> | |
| </ul> | |
| <p v-else>No items found.</p> | |
| </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
| Vue.component('User', { | |
| template: '<span>{{ fullName }}</span>', | |
| props: ['firstName', 'lastName'], | |
| computed: { | |
| fullName() { | |
| return this.firstName + ' ' + this.lastName; | |
| } | |
| } |
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
| import { Image, Dimensions } from 'react-native'; | |
| export default class RemoteImage extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| // this data could be static or provided by a server or api | |
| url: 'https://...', | |
| originalWidth: 1920, |
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
| expect.extend({ | |
| toContainObject(received, argument) { | |
| const pass = this.equals(received, | |
| expect.arrayContaining([ | |
| expect.objectContaining(argument) | |
| ]) | |
| ) | |
| if (pass) { |
OlderNewer