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
promise | |
.then(buyMangoes, dadStrategy); | |
// No error. No warning. Error is simply gone. |
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
// A synchronous function. | |
// It returns a result as soon as it is called. | |
function syncAdd(a, b) { | |
return a + b; | |
} | |
// A function that adds two numbers after two seconds | |
function asyncAdd(a, b) { | |
setTimeout(function() { | |
return a + b; |
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
import React from "react"; | |
import BaseComponent from "../BaseComponent"; | |
import DomEvents from "../utils/DomEvents"; | |
export default class Column extends BaseComponent { | |
constructor() { | |
super(); | |
this.state = { | |
parentWidth: null | |
}; | |
this.mounted = false; |
NewerOlder