title: GET http://image.tmdb.org/t/p/w300undefined 404 (Not Found) in React
body: <p>I passed the movieId and fetched the Movie in detail.js file.
  But, I see the &quot;GET <a href="http://image.tmdb.org/t/p/w300undefined" rel="nofollow noreferrer">http://image.tmdb.org/t/p/w300undefined</a> 404 (Not Found)&quot; error in the console.
  The picture shows correctly and everything is fine.
  I wanted to fix this error.</p>
  <p>And, I really appreciate it if you advise me on a better code.</p>
  <p>My code is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const [movie, setMovie] = useState({});
    const apiImageAddress = "http://image.tmdb.org/t/p/";
    const movieId = props.match.params.id;
  
    useEffect(() =&gt; {
      window.scroll(0, 0);
      axios
        .get(
          `https://api.themoviedb.org/3/movie/${movieId}?api_key=${API}&amp;language=en-US`
        )
        .then((res) =&gt; setMovie(res.data));
    }, [movieId]);
  
    return (
      &lt;Wrap&gt;
        &lt;section className="midContainer"&gt;
          &lt;div className="detailLeft"&gt;
            &lt;img
              src={`${apiImageAddress}w300${movie.poster_path}`}
              alt="movie_picture"
            /&gt;
            &lt;p className="voteAverage"&gt;{movie.vote_average}&lt;/p&gt;
          &lt;/div&gt;
  
          &lt;div className="detailRight"&gt;
            &lt;h1&gt;
              {movie.original_title} ({movie.status})
            &lt;/h1&gt;
            &lt;p&gt;Release_Date:{movie.release_date}&lt;/p&gt;
            &lt;p&gt;
              Genres:{` `}
              {movie.genres &amp;&amp; movie.genres.map((genre) =&gt; genre.name).join(", ")}
            &lt;/p&gt;
            &lt;p&gt;
              Overview: &lt;br /&gt;
              {movie.overview}
            &lt;/p&gt;
          &lt;/div&gt;
        &lt;/section&gt;
      &lt;/Wrap&gt;
    );</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.1/umd/react.production.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.1/umd/react-dom.production.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>