K
K
Kentavr162021-05-28 22:41:38
React
Kentavr16, 2021-05-28 22:41:38

What is the best way to implement appendchild in react?

Good day. Like any beginner, I develop my own todo) it is necessary: ​​to load the n-th number of todos from the database and create a separate div for each. The task is elementary, but I'm not sure yet how best to implement it. I would be grateful for a hint!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Simkav, 2021-05-28
@Kentavr16

Load your tasks into an array, and use the map to go through it
pseudocode ps Well, don't forget about the key ps doc
tasks.map((task) => <div>{task....}<div/>)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question