Skip to main content

All Questions

0 votes
1 answer
21 views

useState returning empty array on default state, using react + supabase

I need help to understand why when I console.log(menus) on Menu.jsx it returns an array of values, but if I console.log(item) it only returns an empty array, while the default value of the item is &...
eko pram's user avatar
3 votes
2 answers
60 views

Traverse over tree type structured data uing JavaScript

I have a data set having parent and nested children in it. The purpose of this data is to traverse over parent to -> child1 to-> Child1Child ..... -> child2 to -> child1 to -> child2 ...
vikas dhiman's user avatar
2 votes
1 answer
52 views

javascript setting a .map() range and update the range later

I'm building an app with React & JS which returns products from a json list inside a component, the array is outputted on the app using a .map() array. I'm also limiting the amount to return ...
Chobbit's user avatar
  • 493
0 votes
1 answer
33 views

Reactjs, StricMode calling setState twice. Alternative and best practices

Technical question here. I created a context provider to handle the state of some variables and to create functions to update these variables from other components. It is of my understanding that ...
Rochin's user avatar
  • 1
1 vote
0 answers
61 views

How to handle multiple color palettes?

I'm a newbie here and in programming overall. I am working on a project that resembles a pixel art editor using React + Redux and Canvas. I want to give the user the option to create and use their own ...
Qrisk's user avatar
  • 11
2 votes
2 answers
49 views

How to reset my useState to it's initial state after filtered list has rendered?

I am having trouble figuring out how to reset my projectList to it's initial state so that way in the filterProjects function it is filtering through the entire projectList and not the already ...
Amanda Morgan's user avatar
0 votes
1 answer
33 views

Not all the elements inside of the <div> are rendered. React.js

Recipe Card with button labelled "View Recipe" This is a recipe application where all of the data displayed is fetched from spoonacular (API) and when the user clicks on the button (View ...
Jonathan_Anon's user avatar
0 votes
3 answers
55 views

Filter an array of objects based on multiple categories

The data looks like: export const data = [ { id: 1, company: "Photosnap", logo: "./images/photosnap.svg", new: true, featured: true, position: "...
Saptaparnee's user avatar
1 vote
0 answers
24 views

Why is the array cut and handled in a very enigmatic way, when trying to apply the Fisher-Yates algorithm in React? [duplicate]

I want to shuffle an Array of data, I fetched using apollo/client, inside an App I am writing with React. The data is used for interaction with the API, but it's not needed for rendering. I fetched ...
Jothon's user avatar
  • 11
0 votes
2 answers
98 views

The three dots menu apears on the last video (Multiple HTML videos)

I am rendering some HTML video tags to play videos. Now the problem is when the user click on the three dots menu, the menu should appear near the button that triggered it but the menu shows near the ...
ali abbas's user avatar
1 vote
1 answer
92 views

JS filter on array tree

I want to filter on my array tree and display only founded node based on the label this is my output with my code : enter image description here I've added a input search and when I type into I update ...
Bouchet's user avatar
  • 15
1 vote
0 answers
38 views

How to replace/fill div values in the Table.Cell React

I have a React table and I want to load all general data on the loading. And data that is not already loaded, I want it to be stored like empty lines. For example, I have a Table.Cell in the Table.Row ...
Programmer's user avatar
1 vote
1 answer
38 views

Creating sortable table with react is not working

The first part include passing the items of the table to useSortableData function, as well as config variable which determine the sort order. const useSortableData = (items, config = null) => { ...
Ahmed B's user avatar
  • 49
0 votes
0 answers
28 views

React filter arrays using PaginatedList

I'm filtering a list of users from my DB according to their names. It works fine. Now I added react-paginated-list for a better list view but I'm stuck in how to filter that list again listing users ...
madsongr's user avatar
  • 715
2 votes
1 answer
81 views

How can I loop through array of objects and get result in key values form?

I have an array of objects as shown below. this is slightly complex but I will try to explain in simple way as I can. As you can see, each object with name Engineering, Environment and others has its ...
Aren Trot's user avatar
  • 473

15 30 50 per page
1
2 3 4 5
447