Example code: https://playcode.io/757707/ Take a look at what it is logging to the console. I am not sure if there is a way to compute property values, that have dots in the names, as valid JSON. that third field in the objects that are printed is always: In order for it to be valid JSON you need quotes aroun…
Flickity js help, I can’t get my Flickity to work
I can’t get my Flickity JS to work can I get some help. This is my HTML and JS. Please help I’ve watched 2 youtube videos and can’t seem to get it working even though I do it exactly the same. The first part is my HTML and the second is my JS. I’ve tried removing my css to see
React State only updates when setting a useless state variable along with the necessary state variable
State is defined like so: In this case, id is totally useless. Don’t need it in my app at all. However, if I try to update items, the state variable doesn’t change and the UI doesn’t reload, unless I also update id: Why is setId necessary here? What is it doing that setItems isn’t? Ans…
Google Sheets, Import data from multiple sources into one, and create new tables
The source data that i want to import, its on a different multiple worksheets This image contains all the data that i want to send to the main table, Two of the tables are filled in manually, i want to do the third one using a script entirely I’ve already figured out how to write data from one sheet to
Cleaning up axios useEffect function
I keep getting this error for my useEffect. How can I stop getting this warning for my function below? I’m not sure what to add in the useEffect dependency array, I’ve tried using setAppState and the state itself but still getting this warning. Answer Check if the component is still mounted before…
Rebuilding/Parsing plain JavaScript object
Let’s say I have an object containing objects that have 30 key-value pairs each: My goal is to rebuild this object into something like this: The function below works like charm but I feel like there is a 10x better way to do it. I would love to see your suggestions on how I could improve it. Answer I…
Error using new Date() in react Native is not a constructor
When I use new Date(); in react native to create a new date or time I get the error: TypeError: undefined is not a constructor (evaluating ‘new _reactNative.Date()’) What could be causing this? Is there something I am not importing into react Native? Answer There are several issues here that are f…
Node JS + Mongo DB: ValidationError: User validation failed: username: Path `username` is required because it force replaces the field
I am trying to save my data to a mongodb server but somehow it force replaces the first variable as id so it is throwing the above mentioned error. in router code I am doing console.log(req.body,cred) and here is the result I get: { emailAddress: ‘test@gmail.com’, password: ‘123456’, i…
Blured background behind the div
I would like to make a pop up that will appear immediately after loading the page. In addition, I want the background behind the black div to be blured, unfortunately after using filter = blur (8px) whole page is blured. Help… Answer Use the backdrop-filter on your overlay element (the one that fully co…
How to listen scroll in angular and add/remove class based on the scroll position
I am new to Angular, working on a project where the second div should start scrolling one the first div reaches its bottom. I have manage to do it using Vanilla Javascript but not sure how I can achieve the same in Angular. Any help would be appreciated. Fiddle here Styles HTML Script Answer Here is how it ca…