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
const delay = ms => new Promise(res => setTimeount(res, ms)); | |
async function * gen() { | |
await delay(1000); | |
yield 1; | |
await delay(1000); | |
yield 2; | |
await delay(1000); | |
yield 3; | |
} |
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 React from 'react'; | |
const names = [{name: 'Arsen'}, {name: 'Vazgen'}, {name: 'Vlad'}]; | |
const User = ({ name, ...rest }) => { | |
return ( | |
<div> | |
<span> | |
{ name } | |
</span> |
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 React from 'react'; | |
import { | |
View, | |
Text, | |
FlatList, | |
StyleSheet | |
} from 'react-native'; | |
import { ListItem } from 'react-native-elements'; | |
class Users extends React.Component { |
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
// custom | |
const compose = (...functions) => data => | |
functions.reduceRight((value, func) => func(value), data) | |
const pipe = (...functions) => data => | |
functions.reduce((value, func) => func(value), data) | |
// with ramda | |
import r from 'ramda'; |
OlderNewer