E
E
ekety2020-05-09 01:19:38
React
ekety, 2020-05-09 01:19:38

Is it correct to use getElementsByClassName and getElementByid in React.js and can they be used?

Hello. I am interested in such a question, but it is correct to use getElementsByClassName and getElementByid in React.js. I just need to iterate over the elements. Can I use getElementsByClassName ? I also know about Refs. Can you tell more about them? All their shortcomings and so on.
Thanks for the answer )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick, 2020-05-09
@ekety

no, DOM manipulation should not be done directly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question