In my app, we have lots of components with lots of form fields. So whenever the user changes something in the form and without saving the changes if the user wants to navigate to another component he is getting a warning message using canDeactivate. However, instead of navigating to the app, if the user closes the tab then he is
How to do arrayUnion on an array of objects inside another array of objects in firebase firestore?
I have created a comment section in my react app. The comment section has following data structure in the firestore:- If I want to add a new comment I do this by: – Now, what I actually want to do is to do is to add a new reply to the existing comment. But I can’t find any way to
firebase.auth().currentUser.uid showing previous uid
I’m trying to set user data into the realtime database. To do that I want the uid of the current user who is logged in. But when I use the firebase.auth().currentUser.uid; I’m getting the previous uid. Here’s the code: Don’t mind the (*) in the config, I just don’t want to show that information. Answer If you want to get
How can I convert each google slide into a PDF and JPG?
Google Apps Script I want to create PDF files per each slide of a Google slide file (a normal slide with words and graphs). I reviewed past questions and I found a solution that generates PDF files but taking the slides as images (I need to be able to search for words in those pdf). Another solution was applied to
Puppeteer: waitForSelector followed by click is not working
I am trying to scrape a dynamic site using puppeteer in node, but not able to click the required elements no matter what. Please help! Tried this too, but no luck: Answer It’s a <select>, you probably don’t want to click on it, but choose an option instead: Docs for page.select Triggers a change and input event once all the
Is this a valid way of using v-if and v-for in order to preserve order?
I know that v-if should not be used to filter elements from a list and a computed prop should be used instead, but what if I need to render a different thing depending on a prop from that list ? Example: I have a list of objects, I loop through it with `v-for’ and depending on a prop in that
Unexpected token, expected , (8:21)
So I’m working with this code for a blockchain mining class And I keep getting this error Unexpected token, expected , (8:21), for this line: Any help will be appreciated! Answer Try Using this Seems to me like you key:value pairs are not properly formatted.. The code in probably taking this above line as Key and is expecting a value
Can’t load popper.js with Laravel Mix
I recently upgraded to bootstrap 5 and my tooltips/popovers in my application stopped working. I have the following error in console: My understanding is that my Laravel Mix / webpack is failing to include popper.js in its compilation? I don’t understand why it is looking for popper.js.map, shouldn’t everything be compiled into a single file (app.js)? In my webpack.mix.js I
nextjs has some exclusive functionality for vercel only
I’m migrating all my applications to nextjs framework! and I would like to know, if all the functionality of nextjs is possible to replicate on private dockers servers or any type of jamstack itself or some functionality is limited only to the vercel platform Answer you can replicate all the functionality of nextjs in private applications such as docker k8s
Argument of type ‘Date | null’ is not assignable to parameter of type ‘string’
I just don’t get it. I have this interface. and then I have this function: But I still get this error: What I do wrong then? And how to correct it? Thank you Answer I think the error you are getting here is quite explanatory, but I would try to explain better: Javascript’s Date.parse() method parses a string representation of