const hello = () => {
console.log('Hello World');
}
hello();
const hello = () => {
console.log('Hello World');
const hello = () => {
console.log('Hello World');
}
hello();
const hello = () => {
console.log('Hello World');
// 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", |
import {makeAutoObservable, autorun} from 'mobx' | |
import * as uuid from 'uuid' | |
class RepeaterStore { | |
constructor(){ | |
this.items = [] | |
} | |
} | |
function connectRepeater({selector = '#repeater1', initialData, renderItem}) { |
async function listBranches(){} | |
async function createBranch(){} | |
async function deleteBranch(){} | |
async function renameBranch(){} | |
async function publishBranch(){} | |
const branchesManager = Machine({ | |
id: "branches-manager", | |
initial: "loading", |
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 | |
}, |
// https://en.wikipedia.org/wiki/Normalization_(statistics)#Examples | |
data = [ | |
14, | |
15, | |
17, | |
22, | |
25, | |
28, | |
40, | |
40, |
//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) { |
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 |