<?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: Banele1999</title>
    <description>The latest articles on Forem by Banele1999 (@banele1999).</description>
    <link>https://forem.com/banele1999</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%2F1219623%2F759414a2-6894-432d-9f0d-54a37375b6db.jpg</url>
      <title>Forem: Banele1999</title>
      <link>https://forem.com/banele1999</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/banele1999"/>
    <language>en</language>
    <item>
      <title>Learn React with me. Pt 2</title>
      <dc:creator>Banele1999</dc:creator>
      <pubDate>Tue, 13 Feb 2024 09:27:37 +0000</pubDate>
      <link>https://forem.com/banele1999/learn-react-with-me-pt-2-i14</link>
      <guid>https://forem.com/banele1999/learn-react-with-me-pt-2-i14</guid>
      <description>&lt;h2&gt;
  
  
  Working With Components
&lt;/h2&gt;

&lt;p&gt;REACT COMPONENT&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;react apps are made of components.&lt;/li&gt;
&lt;li&gt;Components are used as building blocks of UI.&lt;/li&gt;
&lt;li&gt;In Component a piece of UI has its own data, logic and appearance.&lt;/li&gt;
&lt;li&gt;Using components you can build complex UI by building multiple components and combining them.&lt;/li&gt;
&lt;li&gt;Component can be reused, nested.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import ReactDOM from "react-dom/client";

const pizzaData = [
    {
      name: "Pizza Spinaci",
      ingredients: "Tomato, mozarella, spinach, and ricotta cheese",
      price: 12,
      photoName: "pizzas/spinaci.jpg",
      soldOut: false,
    }
  ];


function App() {
    return  (
        &amp;lt;div&amp;gt;
            &amp;lt;h1&amp;gt;Hello React!&amp;lt;/h1&amp;gt;
            &amp;lt;Pizza /&amp;gt;
            &amp;lt;Pizza /&amp;gt;
            &amp;lt;Pizza /&amp;gt; //reusing the pizza component x3
        &amp;lt;/div&amp;gt;
    );
}

// PIZZA. in react we write new components using fuctions
function Pizza() {
    return (
        &amp;lt;div&amp;gt;
            &amp;lt;img src="pizzas/spinaci.jpg" alt="Pizza Spinaci"/&amp;gt;
            &amp;lt;h2&amp;gt;Pizza Spinaci&amp;lt;/h2&amp;gt;
            &amp;lt;p&amp;gt;Tomato, mozarella, spinach, and ricotta cheese&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    );
}


const root = ReactDOM.createRoot(document.getElementById
    ("root"));
    root.render(
    &amp;lt;React.StrictMode&amp;gt;
        &amp;lt;App /&amp;gt;
    &amp;lt;/React.StrictMode&amp;gt;);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50bibh1b0l9hy6b3by5u.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50bibh1b0l9hy6b3by5u.PNG" alt="Image description" width="584" height="918"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TIP: Save images on the public folder. WHY? Assets are store in the public folder so that so the module bundler (webpack) can automatically get them.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>softwareengineering</category>
      <category>tutorial</category>
      <category>react</category>
    </item>
    <item>
      <title>Learn React with Me. Pt 1</title>
      <dc:creator>Banele1999</dc:creator>
      <pubDate>Tue, 13 Feb 2024 08:00:30 +0000</pubDate>
      <link>https://forem.com/banele1999/learn-react-with-me-pt-1-2kkd</link>
      <guid>https://forem.com/banele1999/learn-react-with-me-pt-1-2kkd</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhr71wxy6mr07acwtk6qz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhr71wxy6mr07acwtk6qz.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rendering the Root Component and Strict Mode
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import ReactDOM from "react-dom/client";

function App() {
    return &amp;lt;h1&amp;gt;Hello React&amp;lt;/h1&amp;gt;
}


// Render items in the DOM using react 18
const root = ReactDOM.createRoot(document.getElementById
    ("root"));      //id root is from the index.html
    root.render(
    &amp;lt;React.StrictMode&amp;gt;
        &amp;lt;App /&amp;gt;
    &amp;lt;/React.StrictMode&amp;gt;);   //Wrapping the component with strict mode.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The &lt;u&gt;root element&lt;/u&gt; refers to the top-level element that is the parent of all other components in your application. It is typically represented as a DOM node within the public/index.html file that serves as the entry point for your React app.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;StrictMode&lt;/u&gt; is a tool for highlighting potential problems in an application. Like Fragment, StrictMode does not render any visible UI. It activates additional checks and warnings for its descendants.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>react</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Learn React with me</title>
      <dc:creator>Banele1999</dc:creator>
      <pubDate>Fri, 05 Jan 2024 22:39:40 +0000</pubDate>
      <link>https://forem.com/banele1999/learn-react-with-me-40hh</link>
      <guid>https://forem.com/banele1999/learn-react-with-me-40hh</guid>
      <description>&lt;p&gt;Today I start "The Ultimate React Course 2024: React, Redux &amp;amp; More" by Jonas Schmedtmann on Udemy. I will share a detailed blog post on everything I learned in the course.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z6c5K9sW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwvuysukzjtauv48yohn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z6c5K9sW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwvuysukzjtauv48yohn.jpg" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useEffect, useState } from "react";

export default function App() {
  const [advice, setAdvice] = useState("");
  const [count, setCount] = useState(0);

  useEffect(function () {
    getAdvice();
  }, []);

  async function getAdvice() {
    const res = await fetch("https://api.adviceslip.com/advice");
    const data = await res.json();
    setAdvice(data.slip.advice);
    setCount((a) =&amp;gt; a + 1);
  }

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{advice}&amp;lt;/h1&amp;gt;
      &amp;lt;button onClick={getAdvice}&amp;gt;Get Advice&amp;lt;/button&amp;gt;
      &amp;lt;Message count={count} /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

function Message(props) {
  &amp;lt;p&amp;gt;
    You have read &amp;lt;strong&amp;gt;{props.count}&amp;lt;/strong&amp;gt; pieces of advice
  &amp;lt;/p&amp;gt;;
}
_**

#### 


**_
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>UX is not UI</title>
      <dc:creator>Banele1999</dc:creator>
      <pubDate>Tue, 02 Jan 2024 13:07:39 +0000</pubDate>
      <link>https://forem.com/banele1999/ux-is-not-ui-23ci</link>
      <guid>https://forem.com/banele1999/ux-is-not-ui-23ci</guid>
      <description>&lt;h6&gt;
  
  
  UI &amp;amp; UX Design
&lt;/h6&gt;

&lt;p&gt;The two terms are often used together, although they mean different things. However the relationship between the them is so close that it's hard to talk about one without touching the other.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_sRoAEkt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uoak1a6j9o3i0cvfpu2x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_sRoAEkt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uoak1a6j9o3i0cvfpu2x.jpg" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;**&lt;br&gt;
UI, which stands for &lt;em&gt;User Interface&lt;/em&gt;, refers to the process of designing complete interfaces that allow users to interact with your product. This includes buttons, toggles, or icons. UX, which stands for &lt;em&gt;User Experience&lt;/em&gt;, it defines the experience a user would go through when interacting with a company, its services, and its products. It includes the design of the UI but also elements such as usability, accessibility, performance, and user satisfaction&lt;/p&gt;

&lt;p&gt;The main goal of UI design is to create a visually appealing and easy-to-navigate interface. The main goal of UX design is to design the best possible user experience. This means that the product should be functional, accessible and fun to use.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>frontend</category>
      <category>design</category>
    </item>
  </channel>
</rss>
