skip to Main Content

Mongodb – MongooseError: Model.findOne() no longer accepts a callback in backend log

import express from"express" import cors from "cors" import mongoose from "mongoose" import bodyParser from'body-parser' // const {Schema} = mongoose; const app = express() app.use(bodyParser.json()) app.use(bodyParser.urlencoded({extended: true})) app.use(cors()) await mongoose.connect('mongodb://127.0.0.1:27017/loginRegisterDB',{ useNewUrlParser: true, useUnifiedTopology: true },) .then(() => console.log( "connected")) .catch((err) =>…

VIEW QUESTION

Reactjs – Boolean state react

what is the best approach? i need a boolean to use in a button and the result of this boolean i already have in a state of menuPosition. const [menuPosition, setMenuPosition] = useState<null | HTMLElement>(null); I thought creating a new…

VIEW QUESTION
Back To Top
Search