It's definitely a bad practice to nest component definitions inside another component, but I've not seen a beginner do that if they did follow tutorials or a good mentor. What I did see before in beginner code was directly mutating component state with functions like push(), pop() etc, which is against the rules of react. Anyway, the react docs now caution its readers not to do these things.
@hikari1690