I hereby claim:
- I am duggiemitchell on github.
- I am duggiemitchell (https://keybase.io/duggiemitchell) on keybase.
- I have a public key ASD5q6Mw3W2nH6hb64b5eFkJ4zQN1vzVZPS-yq9PiFMWvAo
To claim this, I am signing this object:
// source list | |
const theList = [{id: 'foo'}, {id: 'bar'},{id: 'bazzle'} ]; | |
// the item to remove | |
const item = {id: 'foo'}; | |
// get the item's index from soure list | |
const indx = theList.findIndex(v => v.id === item.id) | |
// function to remove |
enum UserAccessLevel { | |
READ = 1, | |
READ_WRITE = 2, | |
ADMIN = 3, | |
CO_OWNER = 4, | |
} | |
type Foo = { | |
[key in UserAccessLevel]: | |
| 'Read-only' | |
| 'Read/Write' |
{ | |
"parser": "@typescript-eslint/parser", | |
"env": { | |
"browser": true, | |
"es2021": true, | |
"node": true | |
}, | |
"parserOptions": {"ecmaVersion": 2020}, | |
"plugins": ["@typescript-eslint/eslint-plugin", "import"], | |
"extends": [ |
I hereby claim:
To claim this, I am signing this object:
class Timer extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { seconds: 0 }; | |
} | |
tick = () => { | |
this.setState(state => ({ | |
seconds: state.seconds + 1 | |
})); |
I hereby claim:
To claim this, I am signing this object:
type Props = { | |
navigation: NavigationScreenProp<NavigationParams>; | |
}; | |
type State = { | |
musicPreferences: any; | |
}; | |
export class MusicPreferencesScreen extends React.Component<Props, State> { | |
static navigationOptions = ({}) => { |
// Write JavaScript here and press Ctrl+Enter to execute | |
const Card = (props) => { | |
return ( | |
<div style={{margin: '1em'}}> | |
<img style={{width: 75}} src={props.avatar_url} /> | |
<div style={{display: 'inline-block', marginLeft: 10}}> | |
<div style={{fontSize: '1.25em', fontWeight: 'bold'}}> | |
{props.name} | |
</div> |
class Button extends React.Component { | |
handleClick = () => { | |
this.props.onClickFn(this.props.incrementValue) | |
} | |
render() { | |
return ( | |
<button onClick={this.handleClick}> |
let promiseToClean = new Promise(function( resolve, reject) {
// cleaning the room
let isClean = false;
if (isClean){
resolve('Clean');
} else {
reject('not Clean');