<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abdulrahman Ismael on Medium]]></title>
        <description><![CDATA[Stories by Abdulrahman Ismael on Medium]]></description>
        <link>https://medium.com/@abdulrahmanismael?source=rss-e7d5b4c02d35------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CzasWXWwPCtpUQgddPNq-Q.png</url>
            <title>Stories by Abdulrahman Ismael on Medium</title>
            <link>https://medium.com/@abdulrahmanismael?source=rss-e7d5b4c02d35------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:24:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abdulrahmanismael/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Handling Forms in Next.js: When to Use React Hook Form, State Management, or Server Action]]></title>
            <link>https://abdulrahmanismael.medium.com/handling-forms-in-next-js-when-to-use-react-hook-form-state-management-or-server-action-6999cfd8a924?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/6999cfd8a924</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Tue, 03 Mar 2026 18:46:28 GMT</pubDate>
            <atom:updated>2026-03-03T18:46:28.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*727tmVOe348P29FRZ5X7Ug.png" /><figcaption>Next.js—Forms</figcaption></figure><p>Hello, Long time no see. Today, we’re going to discuss an important thing when working with Next.js. You definitely will face a situation like this, and you should make the right choice, and that’s why you’re here: to learn how to differentiate between every choice.</p><h3>Handling Forms</h3><ul><li>When you have a form in your project, you would probably create a post or update request out of it.</li><li>So you need to save these input values in a place to manage to send them to the endpoint with the request; therefore, there are ways to do that, but what to choose, and why?</li></ul><h3>State Management vs React-Hook-Form</h3><ul><li>There are many ways, and the most famous one is managing form inputs with state management tools, there are multiple ones…</li><li><strong>useState</strong> is the simplest state management algorithm in Next.js/React Projects, so it is needed for simple state management. Therefore, simple state management (a simple form like one or two inputs) is suitable for it</li><li>It is suitable when you want to change a section of the UI based on an input value like a search query….</li></ul><pre>const [inputValue, setInputValue] = useState&lt;string&gt;(&quot;&quot;);</pre><ul><li>You might consider using State management libraries like <strong>Zustand </strong>or <strong>Redux, </strong>but I would never have recommended that, because there is already the React-hook-form library made for that kind of complex forms with multiple inputs whose values need to be used in the application.</li><li><strong>React-Hook-Form</strong> is an optimized form Handler library that is used to handle complex forms that have multiple inputs and require validation and error handling.</li><li>So, no way you&#39;ll install Zustand for that, unless you&#39;re already using it in the project</li></ul><pre>const {register, handleSubmit, ...} = useForm&lt;FormDataInterface&gt;({<br>  defaultValues: {<br>    .<br>    .<br>    . <br>  }<br>})</pre><h3><strong>Server Actions</strong></h3><ul><li>Now, a lot of thinking, there is already a way to handle forms in the server, so why choose to handle it in the browser?!</li><li><strong>Server Actions </strong>is a way to handle forms from the server, so it is suitable for POST or UPDATE HTTP Requests. Doing it on the server is way better for the application.</li></ul><pre>function sendData(formData: FormData) {<br>&quot;use server&quot;; // very important!!!!<br>const inputValue = formData.get(&quot;username&quot;); // username is the input name<br>console.log(inputValue)<br>};<br>.<br>.<br>.<br>&lt;form action={sendData}&gt;<br>.<br>.<br>.<br>&lt;/form&gt;</pre><p><strong>In Conclusion</strong></p><p>When the UI will change based on a value, use <strong>State management like useState</strong>; for more complex and long forms, use <strong>React-Hook-Form. </strong>Otherwise, for HTTP Request, use <strong>Server Actions.</strong></p><p>Happy to be back again, and I’ll post more articles soon. Thank you for reading up to here, and I hope you get something from this…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6999cfd8a924" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Event Delegation in JavaScript]]></title>
            <link>https://abdulrahmanismael.medium.com/the-power-of-event-delegation-in-javascript-0d536e413fb4?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d536e413fb4</guid>
            <category><![CDATA[event-delegation]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[event-bubbling]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Mon, 07 Oct 2024 22:06:55 GMT</pubDate>
            <atom:updated>2024-10-07T22:06:55.303Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5GEb0AtjP0m4O4mjzukECw.png" /><figcaption>Event Delegation</figcaption></figure><p>We hear a lot about event bubbling &amp; event delegation, but we don’t understand what they are and why we—as web developers—should understand them.</p><p>You might face a situation that forces you to use <strong>event delegation,</strong> so I must let you understand what it is and how to use it, so keep going with me, and do not forget to open VS code for practice while reading!</p><h3>Event Bubbling</h3><ul><li>If we have child element (element 1) and parent element (element 2), and each element has click event that triggers when you click on the element</li><li>But when you click on the child element, both child and parent element events trigger and not only the child element event.</li><li>That’s because the event bubbles up to the absolute parent element, and that’s the <strong>Event Bubbling</strong></li><li>In some cases, Event Bubbling might be useful for you, and in some other cases, you would prefer to use <strong>Event Delegation</strong></li></ul><pre>&lt;div class=&quot;parent&quot;&gt;<br>  &lt;button class=&quot;child&quot;&gt; Click &lt;/button&gt;<br>&lt;/div&gt;</pre><pre>const parent = document.querySelector(&quot;div.parent&quot;);<br>const chlid = document.querySelector(&quot;button.child&quot;);<br><br>parent.addEventListener(&quot;click&quot;, () =&gt; {<br>  console.log(&quot;parent is clicked!&quot;);<br>});<br><br>child.addEventListener(&quot;click&quot;, (e) =&gt; {<br>  e.preventDefault();<br>  console.log(&quot;child is clicked!&quot;);<br>});<br><br>/* <br>if you clicked on the child, <br>the parent click event handler would trigger as well,<br>and not only the chlid event handler<br>*/</pre><h3>Event Delegation</h3><ul><li>Event Delegation is the opposite of Event bubbling; instead of bubbling the event up to the parent element, you want to make the event trigger only for its element (where you clicked)</li><li>We can achieve this by attaching the event only to the parent element and handling the actions of the child elements within the parent element&#39;s event handler</li></ul><pre>const parent = document.querySelector(&quot;div.parent&quot;);<br>const chlid = document.querySelector(&quot;button.child&quot;);<br><br>parent.addEventListener(&quot;click&quot;, (e) =&gt; {<br>  if(e.target.className = &quot;child&quot;) console.log(&quot;child is clicked!&quot;);<br>  if(e.target.className = &quot;parent&quot;) console.log(&quot;parent is clicked!&quot;)<br>});<br><br>/* <br>if you clicked on the parent, <br>only the parent click event handler would trigger,<br>and the same thing for the child element<br>*/</pre><p>And that’s it!</p><p>That’s everything you need to know about Event Bubbling &amp; Event Delegation.</p><p>I hope you now understand how and when to use them. Please inform me if I missed something or made a mistake. Thank you ❤️🌹</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d536e413fb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google unveils the new Visual studio challenger IDE, Project IDX]]></title>
            <link>https://abdulrahmanismael.medium.com/google-unveils-the-new-visual-studio-challenger-ide-project-idx-562eb5216a23?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/562eb5216a23</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ide]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[project-idx]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Fri, 10 Nov 2023 12:14:07 GMT</pubDate>
            <atom:updated>2023-11-10T15:26:12.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CFkUF6Cyr3vosX2LBp1hSQ.png" /><figcaption>Project IDX</figcaption></figure><p>Finally, we are going to experience a new journey with web development with a fully new IDE, which will make our development process much more interesting.</p><p>Despite being built based on the Visual Studio Code Editor (VS Code Editor), all the expectations show that it will be a great challenge between both workspaces.</p><h3>Built for Full-stack web applications</h3><ul><li><strong>Project IDX </strong>is actually built especially for web development to make the development experience <strong><em>faster</em></strong>, more <strong><em>efficient</em></strong>, and more <strong><em>productive</em></strong>.</li><li>With a bunch of features, it aims to make web development faster, so instead of building your application in days, time won’t be your concern anymore.</li></ul><h3>Supports most of the Techs</h3><ul><li><strong>Project IDX </strong>will support most of the popular frameworks, such as <strong><em>React</em></strong>, <strong><em>Angular</em></strong>, <strong><em>Next.js</em></strong>, <strong><em>Flutter</em></strong>, and more.</li><li><strong><em>Python </em></strong>and <strong><em>Go</em></strong><em> </em>will be supported later.</li><li>That makes it easier to build your application that works across multiple platforms.</li><li>It also gives you the capability to import your previous projects from GitHub and expand them with Project IDX.</li></ul><h3>Generative AI with Codey</h3><ul><li>With <strong>AI assistance</strong> included with Project IDX, your development will be faster and more efficient.</li><li>This AI will be integrated with the IDE, and it includes <strong><em>code generation</em></strong>, <strong><em>code completion</em></strong>, <em>code review</em>, <strong><em>code translation</em></strong> from one programming language to another, and more.</li><li>All of these capabilities are powered by <strong>Codey</strong>, a specialized programming-trained AI powerhouse.</li></ul><h3>Preview your application</h3><ul><li>Project IDX will give you the capability to preview your application using the built-in browser for web preview. Also, it will include an iOS simulator alongside an Android emulator.</li><li>With all these tools, you can be sure of how the users will see your application and enhance it.</li></ul><p>With these cool features and even more on the way, get ready for an interesting and fun coding experience!</p><p>You can join the waitlist to be one of the first people to try it. Join the waitlist now through the link below:<br><a href="https://idx.dev/">Project IDX</a></p><p>Thanks for reading, and I hope you have enjoyed it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=562eb5216a23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Start modernizing your web development projects using these fresh code techniques.]]></title>
            <link>https://abdulrahmanismael.medium.com/start-modernizing-your-web-development-projects-using-these-fresh-code-techniques-6ca79d012c6c?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ca79d012c6c</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 18:44:03 GMT</pubDate>
            <atom:updated>2023-10-27T20:30:17.920Z</atom:updated>
            <content:encoded><![CDATA[<h3>Start modernizing your web development projects using these fresh code techniques and best practices.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Us9vfNEzHd8w2Tijh5nNdA.png" /><figcaption>Modern JavaScript</figcaption></figure><h3>Welcome back 👋</h3><p>Welcome again to a new article about web development, especially <strong>JavaScript programming language</strong>.<br>Today, we’re going to talk about some <strong>modern techniques and best practices </strong>that will take you to the next level in JavaScript and web development, so bring your coffee, keep both eyes and mind open, and prepare your notebook or note software.</p><p>Most of the article will have code with comments, so no more boring reading. Enjoy! ❤️</p><h3>1. Use ‘let’ and ‘const’ instead of ‘var’</h3><pre>var num = 2;  // no more var</pre><pre>let num = 2;<br>const constantThing = 100;<br><br>/*<br>let =&gt; for variables that may change its value later<br>const =&gt; for constant variables that won&#39;t change its value<br>*/</pre><h3>2. Destructuring</h3><ul><li>Extracting properties from an object without destructuring:</li></ul><pre>const obj = {a: 1, b: 2};<br><br>// without destructuring<br>const firstProp = obj.a;<br>const secondProp = obj.b;</pre><ul><li>Extracting properties from an object with destructuring:</li></ul><pre>const obj = {a:1, b:2};<br><br>// with destructuring<br>const {a:firstProp, b:secondProp} = obj;<br><br>/* <br>1. just open curly braces and write the properties you need <br>to create a variable for it<br><br>2. you can use (:) in order to use different name for the values <br>of the properties<br>*/</pre><pre>// You can use it for arrays as well<br>const nums = [1, 2, 3];<br><br>// Destructuring<br>const [a,b,c] = nums;<br><br>/*<br>write the variables in order with the values<br>a =&gt; 1<br>b =&gt; 2<br>c =&gt; 3<br>*/</pre><h3>3. Reduce using ‘let’ and ‘const’</h3><ul><li>In some situations, you can use just one ‘const’ or ‘let’ for different variables.</li></ul><pre>const btn = document.querySelector(&#39;.btn&#39;),<br>      item = document.querySelector(&#39;.item&#39;),<br>      text = document.querySelector(&#39;.text&#39;);</pre><h3>4. Combining arrays</h3><ul><li><strong>Spread operator (…)</strong>: it is a new feature that has been introduced to the ES6 update of JavaScript.</li><li>One of its use cases is combining arrays.</li></ul><pre>const arr1 = [2, 5, 6];<br>const arr2 = [8, 9, 2];<br><br>const arr3 = [...arr1, ...arr2];<br><br>// arr3 = [2, 5, 6, 8, 9, 2]</pre><h3>5. Rest Parameters</h3><ul><li>If you do not know how many parameters you need for a function, then the rest parameter is your solution.</li><li>For example, we want to create a function that takes any number of parameters and returns the sum of them, and for that, the rest parameter is our savior.</li><li>We can just use an array as a parameter and return the sum of its items, but for me, this is the best solution using the rest parameter:</li></ul><pre>function sum(...nums) {<br>  return nums.reduce((acc, val) =&gt; acc + val);<br>};<br><br>console.log(sum(1, 2, 3, 4)); // return 10<br><br>/*<br>1. The rest parameter is used just like the spread operator (...), but for <br>different purpose<br><br>2. here, nums is an array of the arguments you&#39;re going to use in the <br>function call<br>*/</pre><h3>6. Different techniques to copy arrays and convert string into array</h3><pre>/* Copying arrays */<br>const arr = [1, 2, 3];<br>const arr1 = [...arr];    // spread operator<br>const [...arr2] = arr;  // rest parameter<br>const arr3 = arr;  // bad practice;<br><br><br>/* Conver string into array */<br>const str = &#39;hello world&#39;;<br>const arr1 = [...str];  // spread operator<br>const [...arr2] = str;  // rest parameter<br>const arr3 = Array.from(str);<br>const arr4 = str.split(&#39;&#39;);</pre><p>Using these modern techniques, you can improve your code way better. Now get ready to apply them in your next project 😀.</p><p>This article might be updated in the future.</p><p>Thanks for reading. Happy coding! ❤️☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ca79d012c6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the Power of React: Fresh Hooks to Expand Your Development Toolkit]]></title>
            <link>https://abdulrahmanismael.medium.com/unlocking-the-power-of-react-fresh-hooks-to-expand-your-development-toolkit-35f87d87dfbf?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/35f87d87dfbf</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 11:39:08 GMT</pubDate>
            <atom:updated>2023-10-04T11:39:08.022Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byF4YDSMRBwtKi0wWgiqAQ.png" /><figcaption>React Hooks</figcaption></figure><p>React has introduced some new hooks that can make it easier to use React.</p><p>We’re going to discuss some of them today. Enjoy 😉</p><h3>1. useId:</h3><ul><li>useIdis a new release hook in React.</li><li>It is used to generate unique IDs. It can help in many matters, especially with accessibility attributes in HTML Elements.</li><li>Do not try to use useId to generate keys in a list. Keys should be generated from the data itself.</li></ul><pre>import { useId } from &#39;react&#39;;<br><br>function generateUniqueKey() {<br>  const uniqueKey = useId();<br>  .<br>  .</pre><h3>2. useTransition:</h3><ul><li>You may want to update the state of useState hook without changing the UI, now you can do that using useTransition.</li><li>In other words, useTransition is used to mark some states as non-blocking transitions. which means updating states won’t block the UI as if nothing changed and that might be useful in some situations.</li><li>useTransition accepts no parameters. But it returns 2 things:</li></ul><ol><li><strong>Ispending</strong>: which indicates whether there is a transition or not</li><li><strong>transitionFn</strong>: function that is used to mark states as transitions by calling the set functions within its function parameter.</li></ol><pre>function CountComponent() {<br>  const [isPending, transitionFn] = useTransition();<br>  const [count, setCount] = useState(0);<br><br>  function markCountAsTransition(nextCount) {<br>    transitionFn(() =&gt; {<br>      setCount(nextCount);<br>    });<br>  }<br>  .<br>  .<br>}</pre><h3>3. useDeferredValue</h3><ul><li>useDeferredValue is used to delay showing the new value of state or prop in the UI when you change it.</li><li>So, when you change the state, the UI still uses the old value, and the new value is updated in the background. Then, after any other re-renders happen, the UI will use the new value.</li><li>It accepts state or prop that is displayed in the UI as a parameter and returns the deferred value, so make sure to use the deferred value instead of the original one to delay the display.</li></ul><pre>import { useState, useDeferredValue } from &#39;react&#39;;<br><br>function DeferValue() {<br>  const [state, setState] = useState(0);<br>  const deferredState = useDeferredValue(state);<br>  .<br>  .<br>  .<br>  <br>  return &lt;div&gt; {deferredState} &lt;/div&gt;<br>}</pre><p>These are some of the new introduced hooks, and they’re the most significant ones for now. In the future, this article might be updated with any new hooks that are released.<br>I hope you enjoyed and unleashed your knowledge today 😃</p><p>Have a nice day 🌹</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35f87d87dfbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[State management in React.js]]></title>
            <link>https://abdulrahmanismael.medium.com/state-management-in-react-js-7e9d6628447a?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e9d6628447a</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[usereducer]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[usestate]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Fri, 25 Aug 2023 16:30:56 GMT</pubDate>
            <atom:updated>2023-08-25T16:30:56.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gMUAfrHInWGo6p_QSrEVAw.png" /><figcaption>React.js</figcaption></figure><p>Hello again, and sorry for being late. I had some important tasks in the last few months, but today I am back with an important and exciting topic.</p><p>Today we are going to talk about state management in React.js.</p><h3>Introduction</h3><ul><li>One of the most important features of React is <strong>state management</strong>. It gives React the ability to<strong> remember the values</strong> even if the component is re-rendered.</li><li>The states are split into <strong>local states, global states, server states, and URL states.</strong></li><li><strong>Local states</strong> are only managed in the current component and cannot be shared across multiple components; they can be managed by ‘<strong>useReducer</strong>’ or ‘<strong>useState</strong>’.</li><li><strong>Global states</strong> can be shared across multiple components. For that, we can use the<strong> React Context API</strong> (which will be discussed in another article) or <strong>Third-party libraries</strong>.</li><li>There are many ways to handle state in React, and we will discuss most of them today.</li></ul><h3>1. UseState hook</h3><ul><li>‘<strong>useState</strong>’ is a built-in hook in React. Its main purpose is to store the state, and it has the ability to remember or change it in every render.</li></ul><blockquote>Note: state is a normal value but controlled by React</blockquote><ul><li>‘useState’ accepts one argument:<strong> the state</strong>, and returns two values in an array:<strong> the variable</strong> that will store the value and <strong>the method</strong> that can be used to change or set the value (that’s why we call it the <strong>setter method</strong>).</li><li>The convention for naming the setter method is to use ‘<strong>set</strong>’ at the beginning, followed by the variable name.</li></ul><pre>import {useState} from &#39;react&#39;;<br><br>function stateManagement() {<br>  const [variable, setVariable] = useState(&#39;any value&#39;);<br>  .<br>  .<br>  .<br>}</pre><h3>2. useReducer hook</h3><ul><li>Another valuable hook in React is ‘<strong>useReducer</strong>’. It is similar to useState’, but with more features.</li><li>If you want to manage the state based on conditions or complex logic, then ‘useReducer’ is the appropriate way.</li><li>It accepts two arguments:<strong> the reducer function</strong> and <strong>the initial state</strong>, and returns<strong> the variable</strong> that holds the state and the <strong>dispatch method</strong>.</li><li><strong><em>The reducer function</em></strong> contains the logic that changes the state, and it has two parameters: the state and the action (the action is passed to the dispatch method in order to connect the reducer and dispatch methods, which gives us the ability to change the state based on the particular logic).</li><li><strong><em>The dispatch method</em></strong> is used to change the state based on its argument, which is the action (the action is usually an object that has some helpful properties in the logic)</li></ul><blockquote>Note: developers usually use ‘type’ property in the action to describe the type of changing in the state</blockquote><ul><li>An example from w3schools:</li></ul><pre>import { useReducer } from &quot;react&quot;;<br><br>the initial state<br>const initialTodos = [<br>  {<br>    id: 1,<br>    title: &quot;Todo 1&quot;,<br>    complete: false,<br>  },<br>  {<br>    id: 2,<br>    title: &quot;Todo 2&quot;,<br>    complete: false,<br>  },<br>];<br><br>// the reducer method<br>const reducer = (state, action) =&gt; {<br>  switch (action.type) {<br>    case &quot;COMPLETE&quot;:<br>      return state.map((todo) =&gt; {<br>        if (todo.id === action.id) {<br>          return { ...todo, complete: !todo.complete };<br>        } else {<br>          return todo;<br>        }<br>      });<br>    default:<br>      return state;<br>  }<br>};<br><br>function Todos() {<br>  // calling useReducer<br>  const [todos, dispatch] = useReducer(reducer, initialTodos);<br><br>  const handleComplete = (todo) =&gt; {<br>    dispatch({ type: &quot;COMPLETE&quot;, id: todo.id });<br>  };<br><br>  return (<br>    &lt;&gt;<br>      {todos.map((todo) =&gt; (<br>        &lt;div key={todo.id}&gt;<br>          &lt;label&gt;<br>            &lt;input<br>              type=&quot;checkbox&quot;<br>              checked={todo.complete}<br>              onChange={() =&gt; handleComplete(todo)}<br>            /&gt;<br>            {todo.title}<br>          &lt;/label&gt;<br>        &lt;/div&gt;<br>      ))}<br>    &lt;/&gt;<br>  );<br>}</pre><h3>3. Libraries</h3><ul><li>There are third-party libraries used to manage global states.</li><li>For example, we have libraries like Redux, Recoil, and Zustand.</li><li>I recommend the Redux library. You should learn the <strong>Redux toolkit</strong> first, then move on to using Redux in React using ‘React-Redux’.</li></ul><h3>Summary</h3><ul><li>We have many ways to manage states, and each has its own uses. So, make sure to know what type of state you need to manage and how to manage it, then choose the appropriate way to do that.</li><li>There are <strong>server states</strong> (which manage the data coming from the server) and <strong>URL states</strong> (which are the data in URLs that existed in the pathname and query parameters), we can discuss them in another topic.</li></ul><p>Thanks for Reading and I hope you enjoyed today’s topic and learned something, Goodbye ❤️.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e9d6628447a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionize Your CSS Skills with These 8 Cutting-Edge CSS Features]]></title>
            <link>https://abdulrahmanismael.medium.com/revolutionize-your-css-skills-with-these-8-cutting-edge-css-features-870b70b8f940?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/870b70b8f940</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css3]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[ui]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 20:53:47 GMT</pubDate>
            <atom:updated>2023-03-23T17:09:51.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tstYyqtn3kQfB1_uHjOa3w.png" /></figure><h3>Introduction:</h3><p>Having all the CSS concepts and remembering them is quite difficult, so here I will go over the most important CSS concepts that will take your CSS knowledge to the next level…</p><h3>Now, get your pen and paper ready because we have some exciting new CSS features to unveil:</h3><h3>1- “:empty” Pseudo-Class:</h3><ul><li>A new pseudo-class I came up with is “:empty”, which styles any element that contains no child nodes (child elements, text, etc.) so that you can fill up the element later with JavaScript which will remove those styles as the element is no longer empty. This is useful in a variety of situations.</li></ul><pre>p:empty{<br>  display: none;<br>}</pre><ul><li>the element will not be displayed only if it is empty, otherwise, It will show up on the screen with its children</li></ul><h3>2- “:target” Pseudo-Class:</h3><ul><li>Sometimes you want to make some links that move to someplace on the same page, and at that moment you need to make some “focus styling” on the place you are moving to, that’s why “:target” pseudo-class has existed…</li><li>“:target” pseudo-class is used to style any element in the page that is targeted from some link on the same page</li></ul><pre>section:target{<br>  outline: 2px solid #ff0000;<br>}</pre><h3>3- “:only-child” | “:only-of-type” Pseudo-Classes:</h3><ul><li><strong>“:only-child”</strong> pseudo-class is used to style an element that is the only child in its parent element</li><li><strong>“:only-of-type”</strong> pseudo-class is used to style an element that is the only element of its type in its parent element</li></ul><pre>&lt;section&gt;<br>  &lt;p class=&#39;paragraph&#39;&gt; Hello World &lt;/p&gt;<br>&lt;/section&gt;</pre><pre>.paragraph:only-child {<br>  color: #666;<br>}<br>.paragraph:only-of-type {<br>  border: 1px solid #ff0000; <br>}</pre><h3>4- “:has()” Pseudo-Class:</h3><ul><li>Absolutely, It is one of the most powerful features that really changed CSS, you should understand how powerful this pseudo-class is.</li><li>It is used to style any element but just if it has some child element in it.</li><li>for instance, let’s say you have two “section” elements and one of them has “h1” element inside it. If you want to give the element that has the heading element inside it some special style, that can be done by giving the element some specific class or id or using JavaScript.</li><li>but now using this new feature, that can be done in a few seconds</li></ul><pre>&lt;section&gt;<br>  &lt;h1&gt; Hello From Section 1 &lt;/h1&gt;<br>&lt;/section&gt;<br>&lt;section&gt;<br>  &lt;p&gt; Hello From Section 2 &lt;/p&gt;<br>&lt;/section&gt;</pre><pre>section:has(h1) {<br>  border: 1px solid red;<br>}</pre><ul><li>Only the first section element that has the “h1” element inside it will have a red border.</li></ul><h3>5- “:is()” Pseudo-Class:</h3><ul><li>This feature will save you a lot of time, It is used to simplify grouping selectors, Its usages:</li><li>grouping element selectors</li></ul><pre>:is(h1,h2,h3,h4,h5,h6) {<br>  margin: 0;<br>}</pre><ul><li>grouping pseudo-classes</li></ul><pre>button:is(:hover, :focus) {<br>  border: 1px solid #555;<br>}</pre><h3>6- inset property:</h3><ul><li>Save yourself some coding time with this shorthand property, which combines the (top, right, bottom, and left) properties into a single line. It’s a convenient way to streamline your code and make it more efficient.</li><li>And if you’re looking to position an element absolutely and have it fill its parent container, look no further than this property. It’s the perfect solution for achieving a seamless, full-width design.</li></ul><pre>section::after{<br>  position: absolute;<br>  inset: 0;<br>  <br>  /* Instead of */<br>  /* top: 0; */<br>  /* bottom: 0; */<br>  /* left: 0; */<br>  /* right: 0; */<br>}</pre><h3>7- “vmax” unit:</h3><ul><li>This versatile unit has many applications. For instance, if you want to create a pill-shaped element, simply apply a “border-radius” property with a value of “100vmax”. It’s that easy!</li></ul><pre>div{<br>  .<br>  .<br>  border-radius: 100vmax;<br>}</pre><ul><li>It can be used to give an element the full width of the viewport, instead of using “100vw” values and falling into (overflow) issues:</li></ul><pre>div {<br>  box-shadow: 0 0 0 100vmax var(—same-bgColor-of-the-element);<br>  clip-path: inset(0 -100vmax); <br>}</pre><h3>8- Advanced Selectors:</h3><ul><li>Knowing these advanced selectors is essential for any web developer, as they can help you achieve complex effects without relying on JavaScript. In other words, they’re powerful tools that can streamline your workflow and enhance your coding skills.</li></ul><pre>img[alt]{<br>  /* Selecting any (img) element that has (alt) attribute */<br>}</pre><pre>img[alt=&quot;image&quot;]{<br>  /* Selecting any (img) element that has (alt) attribute <br>  with the value &quot;image&quot; */<br>}</pre><pre>img[alt^=&quot;image&quot;]{<br>  /* Selecting any (img) element that has (alt) attribute <br>  with the letters &quot;image…&quot; at the first of the value */<br>}</pre><pre>a[href$=&quot;.com&quot;]{<br>  /* Selecting any (a) element that has (href) attribute with<br>  the letters &quot;….com&quot; at the end of the value */<br>}</pre><pre>div[class*=&quot;box&quot;]{<br>  /* Selecting any (div) element that has (class) attribute with<br>  the letters &quot;box&quot; anywhere in the value */<br>}</pre><h3>Conclusion:</h3><p>In conclusion, CSS is constantly evolving, with new features and enhancements being added all the time. By keeping up to date with the latest developments and leveraging the power of advanced selectors, shorthand properties, and versatile units, you can take your CSS skills to the next level and create stunning, responsive designs. So keep experimenting, keep learning, and keep pushing the boundaries of what’s possible with CSS!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=870b70b8f940" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How does The Internet work behind the scenes?! ]]></title>
            <link>https://abdulrahmanismael.medium.com/how-does-the-internet-work-behind-the-scenes-862aa48e1000?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/862aa48e1000</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[internet]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Tue, 03 Jan 2023 18:28:13 GMT</pubDate>
            <atom:updated>2023-01-03T18:28:13.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5papvgnD3sJz4fJHG1h4A.png" /><figcaption>Internet around the world</figcaption></figure><p>If you type “www.tealfeed.com&quot; in the browser or search for YouTube and click on the link, do you think about how the web page is opened and served for you?!</p><p>When you are trying to send someone a message or download a file, do you know why there is a possibility that this message or file may not be sent, or why these processes on the internet may fail???</p><p>Well, that’s why you’re here 🙂. We’ll talk about the internet and how it works behind the scenes, and how all these processes are managed.</p><h3>Data Center</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*csiWA_9b32lo0sb2DKuoag.png" /><figcaption>Some Servers in a Data Center</figcaption></figure><p>First, let’s talk about Data Centers, what are they 🤔?</p><p><strong>Data Centers</strong> are places where created and hosted websites are stored in <strong>solid-state drives</strong> (SSDs) called <strong>Servers</strong>, and when you open a website in a browser, this request is sent to Data Centers.</p><p>These <strong>servers </strong>are powerful computers and each server hosts a specific website (EX: Youtube) with its data (EX: Videos,….).</p><p>Each server (website) has its own IP address, an IP address is an address (just like your home address) for each server (website) so that the data center can reach any server.</p><p>Ok now, who stores the IP addresses for the servers ?……. DNS Servers store IP addresses for each server along with the domain name, so you can reach websites without knowing their IP addresses.</p><p>The DNS Server is handled by an organization called <strong>ICANN </strong>(<strong>The Internet Corporation for Assigned Names and Numbers</strong>).</p><p>IP addresses of famous websites :</p><ul><li>Google.com — 209.85.231.104 2.</li><li>Microsoft.com — 207.46.170.1233.</li><li>Facebook.com — 66.220.149.255.</li><li>Wikipedia.com — 208.80.152.26.</li><li>Twitter.com — 128.242.245.116</li></ul><p>Note: Data Centers are managed by Google and they are distributed around the world.</p><h3>How does the website find your device?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYe8Nik6r21jcgrbVFXg8A.png" /><figcaption>How does the Internet work?</figcaption></figure><p>It is important to note that each device connected to the internet has its own IP address, which is provided by an ISP (Internet Service Provider).</p><p><strong>Internet Service Provider (ISP)</strong>: It allows its devices to access the internet, it also assigns an IP address to each device so it can be identified.</p><ul><li>Now, If you click on a domain name like &quot;www.youtube.com&quot;, what happens?</li></ul><ol><li>a request is sent to the data center with the domain name of the website</li><li>The DNS searches for the IP address of the domain name</li><li>The Data Center searches for the server that holds the IP address and then sends a response with the website IP address to open it in the browser</li><li>Now when you click on a video on Youtube, you send a request to the data center to use data from the website.</li><li>So the data center searches for that video on the server.</li><li>Data is then broken up into smaller parts called packets, and each packet has a sequence number (used to identify packets so they can be grouped again), a destination IP address (your device), and the server address.</li><li>The packets then travel across optical fiber cables underground in light pulses, but if a packet fails to reach the destination, it may cause some problems, for example, a message you are trying to send may not be sent and a file you are trying to download may be corrupted.</li><li>When the packets reach the destination, the data gets collected again, now the video reached your device.</li></ol><p>This whole process is handled by Some Protocols which are Rules governing the transmission of information between two or more entities in a communication system.</p><p>This is just a brief overview of what happens on the internet, and it is much more complicated than you think.</p><p>I hope you comprehended everything, remember to search more to get more experience with it</p><p>Thanks and have a nice day ❤️.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=862aa48e1000" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You are not bad at problem-solving as you think, you are just on the right path (Motivated Speech…]]></title>
            <link>https://abdulrahmanismael.medium.com/you-are-not-bad-at-problem-solving-as-you-think-you-are-just-on-the-right-path-motivated-speech-5c824ab98e2?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c824ab98e2</guid>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Tue, 20 Dec 2022 18:59:25 GMT</pubDate>
            <atom:updated>2023-02-23T07:53:09.838Z</atom:updated>
            <content:encoded><![CDATA[<h3>You are not bad at problem-solving as you think, you are just on the right path (Motivated Speech For Developers)👌</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*weBF3T_pqzecWJw0Uq802w.jpeg" /></figure><p>Problem-Solving skill is one of the most essential skills that you must have to apply for jobs in programming, all the interviews ask you to solve a problem using one of the programming languages you know.</p><p>if it is your first time on that path, you may find it difficult a little bit… but by the time, you will master it, all the professional developers have passed through that road at first but later, they managed to master Problem-Solving.</p><h3>The Key of Problem-Solving Mastery :</h3><p>So what to do if you feel that you are getting stuck too much in solving problems whatever the language you use :</p><ul><li>For each problem I couldn’t solve, I try hard to think of a solution even if that solution is 100 lines of code that’s fine.</li><li>if I can’t find one, the last step is searching for the solution on Google…</li><li>Search for the solution, read it, and then try to remember and write it, do not just read the solution and quit, that’s a bad habit for the developers&#39; community and most junior developers do that wrong attitude.</li></ul><p>so do not think of yourself that you are bad in problem-solving as you couldn’t solve one, that’s fine we all have faced that and by knowing the solution and understanding it and its logic, we improve our logical thinking by that.</p><p>And last but not least, repetition, repetition is beneficial for any junior developer, try to solve the previous problems that you got stuck in solving again, or maybe try solving them with another programming language, it doesn’t matter anyway but it is a solution of Boredom.</p><p>Thanks for reading and I hope you become a master in problem-solving…</p><p>support for more and better posts ❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c824ab98e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Netlify vs Vercel vs Surge | The best platform I use to deploy my web projects ?!]]></title>
            <link>https://abdulrahmanismael.medium.com/netlify-vs-vercel-vs-surge-the-best-platform-i-use-to-deploy-my-web-projects-e6609f82816b?source=rss-e7d5b4c02d35------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6609f82816b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[netlify]]></category>
            <dc:creator><![CDATA[Abdulrahman Ismael]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 20:21:10 GMT</pubDate>
            <atom:updated>2022-12-20T19:08:54.034Z</atom:updated>
            <content:encoded><![CDATA[<h3>Netlify vs Vercel vs Surge | The best platform I use to deploy your projects 🤔?!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLfCuVPTJpVG0Tew-UG3OQ.png" /></figure><p>One of the most important steps that should be considered when building Web projects is <strong>deploying your project</strong> so that anyone can see your work and try the project and its Features <strong>live </strong>as reading your code is not enough!</p><p>there are several ways and websites used to do this but in this article, I’ll mention the most ones I use and I prefer.</p><p>But the most ways I follow for deploying my projects are :</p><ol><li><strong>Vercel</strong></li><li><strong>Netlify</strong></li><li><strong>Surge</strong></li></ol><p>These three tools are Great and too helpful and each one has its advantages and disadvantages :</p><ul><li><a href="https://www.netlify.com/"><strong><em>Netlify</em></strong></a><strong><em> </em></strong>is the first one I use and it was a great experience to use it until I found out a big issue faced me, a lot of times the website is down and the server fails and which causes disturbance for most of the users so most of them are no longer use it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7y8T1TiUnM9uXoOer1miA.png" /><figcaption><a href="https://www.netlify.com/">Netlify</a></figcaption></figure><ul><li><a href="https://vercel.com/"><strong><em>Vercel</em></strong></a><strong><em> </em></strong>was my second choice after I left using Netlify, and I still use it and deploy my projects through it, the website is always running and the Netlify issue is no longer facing me so for sure I recommend using it, easy and soft use with no issues and fails…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u1IkXnSmr4RR4_I6XaSrHg.jpeg" /><figcaption><a href="https://vercel.com/">Vercel</a></figcaption></figure><ul><li>the third choice is kind of new to me, it’s just 2 weeks since I knew about it and it is using <a href="https://surge.sh/"><strong><em>Surge</em></strong></a><strong><em> </em></strong>Tool, this time it is not a website, just a few cmd commands will do it for you</li></ul><pre>$ npm install --global surge<br># In your project directory, just run…<br>$ surge</pre><p>….Now for me, I recommend using Vercel, and if not then Surge will be your fastest choice, always make Netlify your last choice</p><p>One last thing, as I mentioned before I know, there are a lot of websites to deploy web projects But here I mentioned my experience of using those websites…. Thanks and Happy Projects 😁❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6609f82816b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>