Linked Questions

2099 votes
88 answers
2.2m views

I'm trying to do something like the following in React JSX (where ObjectRow is a separate component): <tbody> for (var i=0; i < numrows; i++) { <ObjectRow/> } </...
B Robster's user avatar
  • 42.2k
1095 votes
32 answers
1.4m views

I'm building a React component that accepts a JSON data source and creates a sortable table. Each of the dynamic data rows has a unique key assigned to it but I'm still getting an error of: Each ...
Brett DeWoody's user avatar
323 votes
14 answers
112k views

I've observed this in Firefox-3.5.7/Firebug-1.5.3 and Firefox-3.6.16/Firebug-1.6.2 When I fire up Firebug: var x = new Array(3) console.log(x) // [undefined, undefined, undefined] var y = [...
rampion's user avatar
  • 89.5k
195 votes
11 answers
200k views

I am using React/JSX and Lodash in my app in order to accomplish what I want. I need to repeat an element a certain amount of times depending on a condition. How should I do that? Here is the element: ...
StillDead's user avatar
  • 2,119
13 votes
4 answers
38k views

I have a big component <User> and a small one <Task> and want to give a big component a button and on click on it append the component <Task> to the <User> User.jsx <div&...
Zeyad's user avatar
  • 2,568
15 votes
2 answers
36k views

I'm creating a table in React (I'm new to React), but the CategoryDataCan we live with those or should we use something else? It is not creating cells correctly, i.e. it's creating cells that are not ...
ssss's user avatar
  • 573
4 votes
3 answers
24k views

I'm trying to create a table from a JSON response formulated from a submitted form, therefore the initial render needs to be blank, but this blank state is proving to be an issue. The issue is ...
johncho's user avatar
  • 641
14 votes
2 answers
11k views

I'm a React and React native noob so its probably going to be a very silly question but how can I use the 'for loop' inside the render function to include my components? This is what I did render(...
DJay's user avatar
  • 1,282
0 votes
1 answer
5k views

I get the following error when I try to create TableHeaderColumn programatically using map. Uncaught Error: Error. No any key column defined in TableHeaderColumn. Use 'isKey={true}' to specify a ...
Ogglas's user avatar
  • 71.3k
-2 votes
1 answer
3k views

I'm creating a page that if user clicks add more button a text box should be added as many time the user clicks I have created a component where I've created texbox. I've tried to render this ...
vicky's user avatar
  • 1
0 votes
2 answers
3k views

I have a React + Rails app and the current S3 server issues made me realize that I don't have a proper fallback mechanism when data can't be pulled from s3. I'm trying to make it work with my locally ...
anonn023432's user avatar
  • 3,132
-1 votes
1 answer
188 views

I want to render components into my React app using a for loop inside of a function. But when I add n > 1 number of components to the variable I am returning inside of the function, the page ends ...
Roly Poly's user avatar
  • 589
-2 votes
2 answers
84 views

const emptyRow = 3; How can I map on this if it's a number and not an array? Similar to using map on an array but instead on a number. something like: emptyRow.map(el => { return ( <div>...
FabricioG's user avatar
  • 3,353
0 votes
1 answer
44 views

So I was trying to setstate a variable with jsx and spread operator but no matter how I try I get stuck without any output or with errors can anyone please help me how to achieve this?? Here is the ...
streak's user avatar
  • 89