This file contains 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
<?php | |
/** | |
* Events List Widget Template | |
* This is the template for the output of the events list widget. | |
* All the items are turned on and off through the widget admin. | |
* There is currently no default styling, which is needed. | |
* | |
* This view contains the filters required to create an effective events list widget view. | |
* | |
* You can recreate an ENTIRELY new events list widget view by doing a template override, |
This file contains 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
function* myGeneratorFunction(){ | |
console.log("Hello generator!") | |
yield "Yield result one" | |
console.log("Hello generator again!") | |
yield "Yield result two" | |
return "Generator is done" | |
} |
This file contains 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
function getTwoPlusTwo() { | |
return 2 + 2 | |
} | |
function* mathSaga() { | |
const sum = yield getTwoPlusTwo() | |
console.log("two plus two equals: ", sum) | |
const sum2 = yield call(getTwoPlusTwo) | |
console.log("two plus two again equals: ", sum2) |
This file contains 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
function getTwoPlusTwo() { | |
return 2 + 2 | |
} | |
function* myGeneratorFunction() { | |
const sum = yield getTwoPlusTwo() | |
console.log("two plus two equals: ", sum) | |
} | |
const g = myGeneratorFunction(); |
This file contains 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
function getTwoPlusTwo() { | |
return 2 + 2 | |
} | |
function* myGeneratorFunction() { | |
const sum = yield getTwoPlusTwo() | |
console.log("two plus two equals: ", sum) | |
} | |
const g = myGeneratorFunction(); |
This file contains 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
{ | |
"@@redux-saga/IO": true, | |
"combinator": false, | |
"type": "PUT", | |
"payload": { | |
"action": { | |
"type": "GET_USERS_SUCCEEDED", | |
"payload": [ | |
{ | |
"name": "Bob", |
This file contains 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
function getUsersAsync() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve([{ name: "Bob", age: 24 }, { name: "Alice", age: 50 }]) | |
}, 3000) | |
}) | |
} | |
export function* getUsersSaga() { | |
try { |
This file contains 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
function getTwoPlusTwo() { | |
return 2 + 2; | |
} | |
function* myGeneratorFunction() { | |
const sum = yield getTwoPlusTwo(); | |
console.log("two plus two equals: ", sum); | |
} | |
const g = myGeneratorFunction(); |
This file contains 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
it('Should increment counter when button is pressed', () => { | |
const button = getByTestId(wrapper, 'increment-counter'); | |
expect(wrapper.state('counter')).toEqual(0); | |
button.props().onPress(); | |
expect(wrapper.state('counter')).toEqual(1); | |
}); |
This file contains 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 getByA11yLabel = (wrapper, value) => wrapper.findWhere((node) => | |
node.prop('accessibilityLabel') === value); | |
const myButton = getByA11yLabel(wrapper, "my-button") |
OlderNewer