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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// So I'm struggling to name this function so I called it `indexArrayBy` | |
// but it's really doing more. Here's a link to it's demo: | |
// Demo: https://playcode.io/612180/ | |
/** | |
* Transforms an array of objects into an object containing the values | |
* indexed by a unique property on each object, e.g. id and | |
* an array containing all the keys (So you get the keys). | |
* | |
* @param {Array<Object>} array Array of objects |
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 Vue from 'vue' | |
import Breadstick from 'breadstick' | |
// 1. Create a new breadstick instance | |
export const breadstick = new Breadstick() | |
// 2. Import your custom Notification component. | |
// You can use it to render your notifications message. | |
const MyNotification = () => import('@/components/MyNotification.vue') |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
<!-- Parent Component --> | |
<template> | |
<div> | |
<modal :show-modal="showModal"> | |
<h1 slot="header">{{ title }}</h1> | |
<p slot="body">{{ body }}</p> | |
<div slot="footer"> | |
<base-button | |
@click.native="hideModal" | |
> |
NewerOlder