Nested Views in CodeHS

Child Component:

Sits inside the parent. Its size can be determined by absolute dimensions (e.g., width and height in pixels) or relative flex values. Flexbox Rules in React Native

Understanding the Code

Common Mistakes & Tips

By following the step-by-step code provided in this guide, avoiding the common pitfalls of direct screen addition, and using proper coordinate math, you will not only pass the autograder but also build a strong foundation for front-end development.

// Child: Avatar var avatar = new Circle(35); avatar.setPosition(100, 60); avatar.setColor("#4CAF50");