General Discussion Displaying the Search Results

How I can display the name of gifs under the main header after I searched

How I can display the name of gifs under the main header after I searched

1 Answer

Henry Blandon
seal-mask
.a{fill-rule:evenodd;}techdegree
Henry Blandon
Full Stack JavaScript Techdegree Student 15,854 Points

To get the title of the gifs, you pass a prop in the GifsList.js in the map function just after the ''key". like this: title={gif.title} then in the Gif.js you can try {console.log(props.title)} just below the img tag, like the code below.

const Gif = props => (
  <li className="gif-wrap">
    <img src={props.url} alt=""/>
    {console.log(props.title)}
  </li>

if you run the app you will see all the titles in the console. good luck trying to make them display in the page. You will have to play with css most likely.