const hello = () => {
console.log('Hello World');
}
hello();
const hello = () => {
console.log('Hello World');
function* gen() { | |
const three = yield 'three'; | |
const two = yield 'two'; | |
const sum = yield `${two}, ${three}`; | |
return sum; | |
} | |
const iterable = gen(); // the generator instance folllws the iterable protocol |
//usage example: | |
function* watchChangeAction() { | |
const changeActionChannel = yield actionChannel(actionTypes.CHANGE); | |
const requestChannel = yield call(debouncedChannel, 300, changeActionChannel); | |
// handleRequest will be called with the debounced actions | |
yield fork(handleRequest, requestChannel) | |
} | |
export function* debouncedChannel(ms, originalChannel) { |
// https://en.wikipedia.org/wiki/Normalization_(statistics)#Examples | |
data = [ | |
14, | |
15, | |
17, | |
22, | |
25, | |
28, | |
40, | |
40, |
const getBranches = async () => | |
await [ | |
{ | |
id: "fe4b7150-c29d-4da0-8785-5f4479163f0f", | |
sourceBranchId: "fe4b7150-c29d-4da0-8785-5f4479163f0f", | |
name: "Origin Version", | |
branchUpdatedUser: { | |
value: "[email protected]", | |
valueType: "EMAIL", // can be: EMAIL, SITE_OWNER, WIX_STAFF | |
}, |
async function listBranches(){} | |
async function createBranch(){} | |
async function deleteBranch(){} | |
async function renameBranch(){} | |
async function publishBranch(){} | |
const branchesManager = Machine({ | |
id: "branches-manager", | |
initial: "loading", |
import {makeAutoObservable, autorun} from 'mobx' | |
import * as uuid from 'uuid' | |
class RepeaterStore { | |
constructor(){ | |
this.items = [] | |
} | |
} | |
function connectRepeater({selector = '#repeater1', initialData, renderItem}) { |
// API Reference: https://www.wix.com/velo/reference/api-overview/introduction | |
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world | |
import {makeAutoObservable, autorun, toJS} from 'mobx' | |
import * as uuid from 'uuid' | |
const fakeData = [ | |
{ | |
"name": "blah0", | |
"number": "0", |
const hello = () => {
console.log('Hello World');
}
hello();
const hello = () => {
console.log('Hello World');