All Questions
Tagged with components arrays
151 questions
0
votes
1
answer
59
views
Working with React: Question on deconstructing components
So, I'm going through some React studying and I'm current just doing small code. I was writing two files. The first is where my data is in my variable. I'm using a basic map method to loop through my ...
0
votes
1
answer
41
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
1
answer
25
views
Get the variable associated with a JPanel component from a component array
Say I have a JPanel with buttons (and other things) as components and I make an array of those components as such:
JPanel panel = new JPanel();
JButton btn1 = new JButton();
JButton btn2 = new ...
1
vote
1
answer
5k
views
React - Objects are not valid as a React child when rendering an array of objects
Edit:
I'm encountering an issue in my React project where I'm trying to render an array of objects using the map function, and I'm getting the following Error: Objects are not valid as a React child (...
0
votes
2
answers
172
views
TypeError: Cannot read properties of undefined (reading '0') at Array.map (<anonymous>)
here is I facing problem image
export const FlipData = [
{
id: "1",
tittle: "IT Manpower Consultant",
points: [
"Devops and IT consulting",
&...
0
votes
0
answers
29
views
Object value 'addedToCart' is not updating globally in angular
I'm trying to update the addedToCart value present in bookArr in books.service.ts. The problem is that it's not updating the value.
I'm trying to toggle the "Add to Cart" button present in ...
0
votes
0
answers
21
views
How do I prevent text from populating inside my vue component tag?
In the image I have the component I created .
But I did not write the text inside the tag. They all look like text for array methods. I've never seen this before and I don't know where the text is ...
0
votes
1
answer
93
views
How to set positions in an array of specific component with its selector using Angular?
I'm very new to Angular and I would like to know if it is possible to set positions of an array, that is already declared as empty in one component, with its selector in another component.
For example,...
0
votes
0
answers
56
views
How I can pass the current object from an array as a prop of a react component
I'm doing my personal portifolio. For the projects component I did an array of objects at another file. Each object/item is one project. I used a map to display dynamicaly the items, so if I add a ...
0
votes
2
answers
146
views
I can't access the elements of an array via bracket notation in the frontend but it works in the backend
I am new to coding and I am experiencing a really strange problem. There is an array coming from a database in the backend and I want to access the single elements of the array in the frontend via ...
0
votes
1
answer
997
views
How can I call an array from one component to show in another component using Class Component in React-js?
I have a question that I believe that is simple, buuut I couldn't solve it and I didn't find something similar on the internet.
I have a React Component that have an array like state and I'm trying to ...
-1
votes
2
answers
99
views
Keep getting unique key Warning: Each child in a list should have a unique "key" prop
I'm figuring out what in this code imples i dont have the keys for the pushed array items:
import { Accordion, AccordionSummary } from '@material-ui/core'
import { createStyles, makeStyles, ...
0
votes
2
answers
502
views
children component receiving "undefined" from an array of object prop
I have a parent component that has an array of objects state, this state is passing to a children component. When I receive this prop and console.log, returns undefined.
PARENT
import { useState } ...
0
votes
1
answer
323
views
How to render multiples times the same component with diferent content in angular 12
im trying to render a component that is inside a ng-for, but the content of the component will be trigger after a click on a button, the content will be captured and then sent to the child component. ...
0
votes
1
answer
115
views
Can't access array's elements in child component in Angular
Problem is:
I have an array called wycieczki in parent.component.ts where I can easily (for example) do something like console.log(this.wycieczki[0]);
but when I pass it to child.component.ts, trying ...