From the course: Learning React Native

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Completing the Color Details page

Completing the Color Details page

From the course: Learning React Native

Start my 1-month free trial

Completing the Color Details page

- [Instructor] So far we're successfully navigating between the list and details screens. In this next lesson, we're actually going to render some pretty specific details about each color to the user. So the first thing we want to do is display that color as the background of the screen. So on line five, I'm going to go ahead and destructure the color from route params and then on line seven, I'm going to ahead and add a style array where I overwrite the background color with the color that was passed along with the route params. Alright, so we can see the color in the background. But the other thing that we want to do, is we want to display all sorts of information about this color. To do that, I'm going to use an npm package called Color. So let me open up the terminal and we'll install the color package. Next let's import a variable called color from our color package. I'm going to rename this color parameter name…

Contents