{"id":6580,"date":"2026-11-02T06:30:39","date_gmt":"2026-11-02T09:30:39","guid":{"rendered":"https:\/\/tucumandevelopers.com\/index.php\/2026\/11\/02\/here-is-my-new-upcomming-project-movie-explorer\/"},"modified":"2026-11-02T06:30:39","modified_gmt":"2026-11-02T09:30:39","slug":"here-is-my-new-upcomming-project-movie-explorer","status":"publish","type":"post","link":"https:\/\/tucumandevelopers.com\/index.php\/2026\/11\/02\/here-is-my-new-upcomming-project-movie-explorer\/","title":{"rendered":"Here Is my New upcomming project Movie Explorer:"},"content":{"rendered":"<div>\n<div><\/header>\n<div data-article-id=\"4961860\" id=\"article-body\">\n<p>import { useState, useEffect } from &#8220;react&#8221;;<br \/> import axios from &#8220;axios&#8221;;<br \/> import &#8220;.\/Api_fetching.css&#8221;;<\/p>\n<p>function Api_fetching() {<br \/> \/\/ FIXED: Initialize with an empty array so .map() doesn&#8217;t break or render an empty card on load<br \/> const [product, setProduct] = useState([]);<\/p>\n<p>\/\/ Integrated useEffect to load data automatically when the component mounts<br \/> useEffect(() =&gt; {<br \/> axios.get(&#8220;<a href=\"https:\/\/jsonfakery.com\/movies\/paginated%22\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/jsonfakery.com\/movies\/paginated&#8221;<\/a>)<br \/> .then((res) =&gt; {<br \/> \/\/ Safe access: uses optional chaining and fallback to prevent empty array crashes<br \/> setProduct(res.data?.data || []);<br \/> console.log(res);<br \/> })<br \/> .catch((err) =&gt; console.error(&#8220;Error fetching movies:&#8221;, err));<br \/> }, []); \/\/ Empty dependency array ensures this runs exactly once on page load<\/p>\n<p>return ( <\/p>\n<p> <\/p>\n<h2>Movie Explorer<\/h2>\n<pre><code> &lt;div className=\"movie-container\"&gt; {product.map((s) =&gt; ( &lt;div className=\"movie-card\" key={s.id}&gt; &lt;img src={s.poster_path} alt={s.original_title} className=\"movie-image\" \/&gt; &lt;div className=\"movie-details\"&gt; &lt;h2&gt;{s.original_title}&lt;\/h2&gt; &lt;p&gt; &lt;b&gt;Overview:&lt;\/b&gt; {s.overview} &lt;\/p&gt; &lt;p&gt; &lt;b&gt;Release Date:&lt;\/b&gt; {s.release_date} &lt;\/p&gt; &lt;p&gt; &lt;b&gt;Rating:&lt;\/b&gt; {s.vote_average} \u2605 &lt;\/p&gt; &lt;\/div&gt; &lt;\/div&gt; ))} &lt;\/div&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>);<br \/> }<\/p>\n<p>export default Api_fetching; <\/p>\n<pre><code> <\/code><\/pre>\n<\/p><\/div>\n<\/article>\n<p> <!-- Bottom content skipped via SKIP_BOTTOM_CONTENT config --> <\/div>\n<p> <\/main> <\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Fuente: <a href=\"https:\/\/dev.to\/narasimma\/here-is-my-new-upcomming-project-movie-explorer-6c1\">Art\u00edculo original<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>import { useState, useEffect } from &#8220;react&#8221;; import axios from &#8220;axios&#8221;; import &#8220;.\/Api_fetching.css&#8221;; function Api_fetching() { \/\/ FIXED: Initialize with an empty array so .map() doesn&#8217;t break or render an empty card on load const [product, setProduct] = useState([]); \/\/ Integrated useEffect to load data automatically when the component mounts useEffect(() =&gt; { axios.get(&#8220;https:\/\/jsonfakery.com\/movies\/paginated&#8221;) .then((res) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6579,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"webixso_pending_account_ids":""},"categories":[41],"tags":[],"class_list":["post-6580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devto"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/6580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/comments?post=6580"}],"version-history":[{"count":0,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/6580\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media\/6579"}],"wp:attachment":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media?parent=6580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/categories?post=6580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/tags?post=6580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}