Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript One Solution

Alex Kaplan
Alex Kaplan
5,676 Points

When should I use initialList when rendering the container?

In the previous course, when rendering the container, the "items" array was defined using <App initialList={items} />.

In this practice session, the container is rendered with <PlanetList planets={planets} />.

Is there any difference between declaring the array as initalList vs. a custom name? Or is initialList just another name?

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hey Alex Kaplan 👋

There are no differences between these two examples in terms of how they work. The planets and initialList are just how the props have been named for these components and can be called pretty much anything you want 🙂