Skip to content

Tag: javascript

How to run useQuery inside forEach?

I have loop – forEach – which find productId for every element of array. I want to fetch my database by productId using apollo query. How to do it? Answer From the rules of hooks: Don’t call Hooks inside loops, conditions, or nested functions. Instead, always use Hooks at the top level of your Rea…

React textarea component not able to expand horizontally

I am learning React/JS and I am on a spot where I want to have a textarea that I can resize horizontally and vertically. I have tried using react-bootstrap text area and one from material-ui (https://material-ui.com/components/textarea-autosize/). My app.js looks like this.. But when the text area is spawned …

Discord.JS AwaitMessages

In the line of “message.channel.awaitmessages” i think the code is bad writted, the thing i want to do is to await for 1 message that is a number btw 0 and 23. Here is the corresponding code : Answer You need to update your filter for this to work: Additionally the .then() needs a collected too. I…