<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ermal Vrapi</title>
    <description>The latest articles on Forem by Ermal Vrapi (@ermal96).</description>
    <link>https://forem.com/ermal96</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F231424%2F1cc2c51e-2a55-4421-a586-b515d70a4a5a.png</url>
      <title>Forem: Ermal Vrapi</title>
      <link>https://forem.com/ermal96</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ermal96"/>
    <language>en</language>
    <item>
      <title>Movies App With React</title>
      <dc:creator>Ermal Vrapi</dc:creator>
      <pubDate>Fri, 19 Feb 2021 18:40:51 +0000</pubDate>
      <link>https://forem.com/ermal96/movies-app-with-react-1cgi</link>
      <guid>https://forem.com/ermal96/movies-app-with-react-1cgi</guid>
      <description>&lt;p&gt;Hello Everyone 🖐, hope you are doing great i want to introduce to you my movies app to which is a little bit like Netflix 😅. &lt;br&gt;
First of all i have to say that this app in Albanian language, i chosed to do this app with react not just because is fast but also i love it 😍.&lt;/p&gt;

&lt;p&gt;For the backend i have used node with express and mongo.&lt;/p&gt;

&lt;p&gt;Some of the functionalities that i have added for this app are live search, favorite movies also the time of movies that you are watching [you have to signup for those functionalities] which are free &lt;/p&gt;

&lt;p&gt;In the future maybe will also be a English version&lt;/p&gt;

&lt;p&gt;I hope you will like it 🤩&lt;/p&gt;

&lt;p&gt;Note all movies are with albanian captions&lt;/p&gt;

&lt;p&gt;Here is the url &lt;a href="https://ufilma.com/"&gt;https://ufilma.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>node</category>
      <category>mongodb</category>
      <category>express</category>
    </item>
    <item>
      <title>Personal Portfolio With React</title>
      <dc:creator>Ermal Vrapi</dc:creator>
      <pubDate>Mon, 09 Nov 2020 11:17:11 +0000</pubDate>
      <link>https://forem.com/ermal96/personal-portfolio-with-react-4i8c</link>
      <guid>https://forem.com/ermal96/personal-portfolio-with-react-4i8c</guid>
      <description>&lt;p&gt;It's been a long time since i wanted to update my portfolio online but now is finally done 🎉&lt;/p&gt;

&lt;p&gt;You can check it here ⤵️&lt;br&gt;
&lt;a href="https://ermal.dev/"&gt;https://ermal.dev/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>sass</category>
      <category>javascript</category>
      <category>contentful</category>
    </item>
    <item>
      <title>How to get all WordPress posts from the WP API in just two steps</title>
      <dc:creator>Ermal Vrapi</dc:creator>
      <pubDate>Tue, 07 Apr 2020 11:26:54 +0000</pubDate>
      <link>https://forem.com/ermal96/how-to-get-all-wordpress-posts-from-the-wp-api-in-just-two-steps-1k2b</link>
      <guid>https://forem.com/ermal96/how-to-get-all-wordpress-posts-from-the-wp-api-in-just-two-steps-1k2b</guid>
      <description>&lt;p&gt;Hello Everyone ✋&lt;br&gt;
On my work, I was building a Gutenberg block to get all the posts and make with them a slider very simple thing 😝 but the problem starts when I was trying to show all posts on a dropdown where the client can choose the posts that want to show on the slider.&lt;/p&gt;

&lt;p&gt;So if you have a case similar to me the code below will work just fine.&lt;/p&gt;

&lt;p&gt;The first thing we will need to make a simple request and get the total amount of posts from WordPress.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   fetch('https://example.com/wp-json/wp/v2/posts?per_page=10', {
    }).then((response) =&amp;gt; { 
        getAllPosts(response.headers.get('X-WP-Total'));
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The second thing for sure we will need to create the &lt;code&gt;getAllPosts&lt;/code&gt; function which is going to request all posts.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const getAllPosts = (allPosts) =&amp;gt; {

 fetch(`https://example.com/wp-json/wp/v2/posts?per_page=${allPosts}`)
  .then((response) =&amp;gt; {
    return response.json();
 })
 .then((posts) =&amp;gt; {
  console.log(posts);
 });

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now you can check your console to see if all the posts are present.&lt;/p&gt;




&lt;p&gt;If you have any questions, comments or feedback to improve, please just leave a comment 🙂&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>javascript</category>
      <category>api</category>
      <category>gutenberg</category>
    </item>
  </channel>
</rss>
