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
if (process.env.NODE_ENV !== "production") { | |
require("dotenv").load(); | |
} | |
const path = require("path"); | |
const storage = require("azure-storage"); | |
const blobService = storage.createBlobService(); | |
const listContainers = async () => { |
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
``` | |
setState() | |
- is Asynchronous | |
- can have a function as a parameter instead of object | |
- can accepts a Callback function as a second argument (optional) | |
- does not return promise | |
``` | |
function updateState(){ | |
this.setState({load: true}, () => { |