All Questions
6,697
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 &...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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: "...
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 ...
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 ...
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 ...
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 ...
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) => {
...
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 ...
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 ...