DEV Community

Discussion on: How to integrate React frontend with Node backend

Collapse
 
jeremydmarx813 profile image
Jeremy Marx

Great article, though I would suggest not using the index of the map callback function as the key when rendering the divs from the state data. This can cause problems if you start adding or removing data. Try putting an 'ID' property on each object in the data and use that for they key.

Collapse
 
_s_w_a_y_a_m_ profile image
Swayam Singh

yes absolutely, this tutorial is more focussed on how you can integrate and also assuming reader to have some basic react knowledge.
That's why I tried to make things as simple as they can be, ideally one must should not use index for keys