Answer the question
In order to leave comments, you need to log in
Is it ok to use in React components?
I saw many examples where "empty" tags were used in components , and also where they were not used.
This is where the question comes in: is it good practice (or even "tone") to write such empty tags in React components? <> ... </>
Answer the question
In order to leave comments, you need to log in
JSX only allows one block to be returned, i.e.
<div>Первый блок</div>
<div>Второй блок</div>
<React.Fragment></React.Fragment>
<></>
used as needed, it's not a matter of good or bad tone
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question