Error when I declare a variable at the beginning of the class Component in React

I want to know why I put _isMounted=false; at the beginning of myClass appears the following error: “SyntaxError: Unexpected token”. I’m following the second answer in this thread: Can't perform a React state update on an unmounted component. class myClass extends Component { _isMounted = false; constructor(props) { super(props); this.state = { test: “” };…

Details

Error closing node-oracledb pool connections with Oracle DB and Node.js

I have problems closing the connection to the database in Oracle. First I create the connection without any problems. try { console.log(‘Initializing database module’); await database.initialize(); } catch (err) { console.error(err); process.exit(1); // Non-zero failure code } async function initialize() { console.log(dbConfig.hrPool); const pool = await oracledb.createPool(dbConfig.hrPool); } module.exports.initialize = initialize; when I want to…

Details