So here is the thing, I’m learning JS and I started to do some simple excercices to get familiar with it, So I tried to do a simple form validation but I’m having a probleme with the div that shows …
Category: Questions
Capture two events in two overlapped elements
I have two divs that are overlapped with two mouse-events. Is it possible to capture both events? I’m only able to capture A or B, but not A and B at the same time. function adown() { console….
Stack Navigator: ReferenceError: You are trying to `import` a file after the Jest environment has been torn down
My code is extremely simple. Simply making sure my dev setup is proper. App.js export default function App() { return ( {/* …
Next.js context provider wrapping App component with page specific layout component giving undefined data
I have an auth context component where I’m wrapping my main app component, but at the same time I’m also trying to do page specific layout component per Next.js documentation here: https://nextjs.org/docs/basic-features/layouts#per-page-layouts Am I doing this correctly, because I can’t seem…
How to deal with onClick event?
For instance, I have li. Inside I have paragraphs, spans…
ABC
ABC
When I try to manage …
How to grab more than one div and make them invisible?
Can someone help me out with the following issue? I am trying to create a table with some hidden content in it and display them when someone click on one of the rows. I managed to create it but it is …
How can I select a split element and manipulate it DOM with JavaScript?
I have split an array and now I want to select and manipulate one or more specific elements split. function displayAlignment(data) { let html = “”; html += `
Alignments</…
How to add custom class to body element for some routes – nexjts
I want to add my custom class to some pages. for example all pages must be this class fixed-header exception this routes: this class add or remove to body element. but I don’t know how I can handle this scenario? Answer Create a custom _document.js and _app.js in your pages directory. A small util to ch…
Testing react components with redux-toolkit inside
I have a component like this: and am trying to test it. The problem is, I somehow need to mock the store, to match my case. Any ideas how I should handle this? I remember in my previous project I used a npm package to do this, but can’t find it now, and can’t remember how I did it, or
Nuxt app failed heroku deployement code=H10 error
I’m trying to deploy my ecommerce nuxt app to heroku. Here’s exactly what I did then I followed exactly what the heroku website did list. Everything works Once I visit the link, however, I get an error: After following the heroku tail command, the app keeps crashing with the following error Now i …