Category "javascript"

How to properly implement useQueries in react-query?

I'm using react-query to make two separate queries in the same React component. I originally tried using two useQuery hooks: export default function Component()

Javascript Filter Method

I am trying to filter an array of objects to display some content and for some reason it does not display anything . App.js <BrowserRouter> <Routes&g

How i can change text in HTML with Javascript [duplicate]

<a href="/knowledgebase/category/community?language=tr" class="Category-Item"> <h4><span><i class="fas fa-comments">&l

How to prepopulate a react formik form

I have a table tha stores Students with an edit buttom tha opens a formik form. const EditStudentFrom = (props) => ( <Formik initialValues={{s

I want to enable crypto payment on my site [closed]

I want to enable crypto payment by giving the customer an wallet address and the send the amount of crypto to my wallet lets say 10USDT but I

rambda is missing sortWith

I really like rambda (vs ramda), however I faced the function sortWith is missing and that is even not mentioned in spec. Is there any way to get a similar func

Upgrading Jest to v28 - Error Test environment jest-environment-jsdom cannot be found

Has anyone successfully upgraded to latest Jest version 28.0.0? I'm receiving an error: Error: Test environment jest-environment-jsdom cannot be found. Make sur

how to alter reduce function so it produce different result

I have this array: data: [ '+section1+', 'big text 1 here.', 'big text 2 here followed by list:', '-this is list item;', '-this is another list item;'

Why is a _react-native-otp-verify_ library call throwing an 'is not a function' error?

I am trying to use a ReactNative package, react-native-otp-verify to implement automatic SMS verification. At this point, I am getting an error though, that I n

Supabase and Google Apps Script

Is it possible to use Supabase with Google Apps Script (GAS)? I'm new to Supabase and I've never tried to import external library to GAS before. I'm planning to

Lower the variable without impact database variable

I would like to know if it is possible to lower the quantity without touching the database because here I would like the quantity variable to decrease but witho

protected router with react-router v6

this Protected route is works well for profile page. but i want to make a protected route for multiple page. in my project , i want to implement protected route

How does function within addEventListener gets hoisted?

I found a weird behavior that I couldn't understand even reading MDN doc about hoisting. It says that functions and variables gets moved to the top of the scope

codewars Array.diff javascript

this is my first question as I'm learning programming for few days but now and I'm stuck Task: Your goal in this kata is to implement a difference function, wh

How to use a loop inside a slick slider in Vue.js

I'm using vue-slick link https://www.npmjs.com/package/vue-slick inside a bootstrap modal and when i use a v-for loop to loop through the items it display's thi

how to pass a variable to REST API with NodeJS

I must use NodeJs to set different API routes to provide front-end functionalities. I have designed the server as : routes=> controller => models The snip

cypress test asserting a filtering operation on array of objects expecting undefined

I have a cypress test over an API. When I do cy.getUnits(u.email) I'm expecting a 200 OK response similar to this in the body of the response {   &ld

Is it possible to stroke "transparent" with SVG.js?

I'm using SVG.js and want to draw an invisible border around a shape. I use the stroke() method to do this, and I thought just setting the opacity option to 0 w

Discord.js: Is there any possible way of disabling a menu after selecting one of it's options?

I've very recently had a look at buttons for my discord bots, and in doing so I also discovered the menus that you can create. I want to know how, if it's possi

Deprecation notice: ReactDOM.render is no longer supported in React 18

I get this error every time I create a new React app: Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to