Skip to content
Advertisement

How to find an element by id in nested arrays

i trying create reply to comments in my project, and I have some problems with adding comments to reducer, i am trying to add an reply without reloading the page.

My comments looks at:

JavaScript

It’s my reducer, now i trying write to console:

JavaScript

I can’t think of how I can iterate through my array to add a comment to the block I need.

For example this is how i add the usual comment:

JavaScript

Advertisement

Answer

If I understood your problem correctly, that might be helpful.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement