Skip to content

Category: Questions

React Hooks useState array storage problem

I have the following problem: I have a method that returns a multidimensional array in my Grids component. I would want to store any multidimensional array recomputed in a separate list. The problem is that when I am using my useState() declared in this way only the current state element is saved repeatedly i…

javascript object modification add key for the object [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I need to add year, month, day for my object. This is my current string arr…

How to reduce loading time of a table when scroll using js

How can i reduce the loading time of a <table> that contains 20000 rows ? the page is very heavy when i scroll, it takes 4/5s to display the rest of the table. I don’t have any idea how to do that, that’s why i didn’t put a code. Answer For this type of problem basically the solution i…

Vuex state empty after reload

Inside a mutation I’m changing my state like: So the state shall hold an array with an object as the entry. Checking the state also shows the same. And it’s displayed on the view. When now reloading everything remains inside the state except of the object inside the array. It just shows an empty a…