Closed newbiedev1987 closed 7 years ago
Steps to reproduce (I am using React):
yarn add promise
"promise": "^8.0.0"
import Promise from 'promise';
componentDidMount() { var promise = new Promise(function (resolve, reject) { get('http://www.google.com', function (err, res) { if (err) reject(err); else resolve(res); }); }); }
Line 19: 'get' is not defined no-undef Search for the keywords to learn more about each error.`
What am I doing wrong??
This problem is not caused by the promise library. Please ask questions like this on https://stackoverflow.com/
Steps to reproduce (I am using React):
yarn add promise
, which adds"promise": "^8.0.0"
to package.jsonimport Promise from 'promise';
to the top of the fileWhat am I doing wrong??