<?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>DEV Community: Phinehas Alabi</title>
    <description>The latest articles on DEV Community by Phinehas Alabi (@richiepee).</description>
    <link>https://dev.to/richiepee</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%2F920635%2Fd9479309-c921-41b0-a6d7-541f02083f75.png</url>
      <title>DEV Community: Phinehas Alabi</title>
      <link>https://dev.to/richiepee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/richiepee"/>
    <language>en</language>
    <item>
      <title>obs failed to connect to any servers please check your internet connection and try again</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Fri, 03 May 2024 02:38:32 +0000</pubDate>
      <link>https://dev.to/richiepee/obs-failed-to-connect-to-any-servers-please-check-your-internet-connection-and-try-again-134l</link>
      <guid>https://dev.to/richiepee/obs-failed-to-connect-to-any-servers-please-check-your-internet-connection-and-try-again-134l</guid>
      <description>&lt;p&gt;So this was fixed by having to select the RIGHT service which in this case was &lt;strong&gt;Youtube -HLS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;NB: Selecting Youtube - RTMPS would result in the error message below:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;obs failed to connect to any servers please check your internet connection and try again&lt;/p&gt;
&lt;/blockquote&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%2Fu6tk4uit5hjolj4z54ud.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%2Fu6tk4uit5hjolj4z54ud.png" alt="Image description" width="695" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as 'standalone'</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Fri, 16 Jun 2023 09:38:47 +0000</pubDate>
      <link>https://dev.to/richiepee/if-ngmodel-is-used-within-a-form-tag-either-the-name-attribute-must-be-set-or-the-form-control-must-be-defined-as-standalone-153g</link>
      <guid>https://dev.to/richiepee/if-ngmodel-is-used-within-a-form-tag-either-the-name-attribute-must-be-set-or-the-form-control-must-be-defined-as-standalone-153g</guid>
      <description>&lt;p&gt;&lt;strong&gt;This happens when you are missing name attribute&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Solution&lt;br&gt;
&lt;code&gt;&amp;lt;!--Add the 'name' attribute--&amp;gt;&lt;br&gt;
&amp;lt;input [(ngModel)]="name" name="any name"&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>yarn cannot be loaded because running scripts is disabled on this system</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Fri, 16 Jun 2023 09:28:46 +0000</pubDate>
      <link>https://dev.to/richiepee/yarn-cannot-be-loaded-because-runningscripts-is-disabled-on-this-system-411h</link>
      <guid>https://dev.to/richiepee/yarn-cannot-be-loaded-because-runningscripts-is-disabled-on-this-system-411h</guid>
      <description>&lt;p&gt;&lt;strong&gt;This happens whenever you are on powershell&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;solution:&lt;br&gt;
Switch to GitBash and you should be good.&lt;/code&gt;&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Difference between ngOnChanges vs ngOnInit in angular component</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Sat, 10 Jun 2023 16:14:12 +0000</pubDate>
      <link>https://dev.to/richiepee/difference-between-ngonchanges-vs-ngoninit-in-angular-component-2ihd</link>
      <guid>https://dev.to/richiepee/difference-between-ngonchanges-vs-ngoninit-in-angular-component-2ihd</guid>
      <description>&lt;p&gt;In simplest terms:&lt;br&gt;
ngOnChange - changes on every click event made or component interaction&lt;/p&gt;

&lt;p&gt;ngOnInit -Initializes only once upon server start&lt;br&gt;
example below:&lt;br&gt;
in component.ts file:&lt;br&gt;
ex. app.component.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; private number: number = 234;
  name: string = 'Oyata';
  user = {
    name: 'Yamata',
  };

get counter() {
    return this.number;
  }
  set counter(value) {
    this.number = value;
  }
  increment() {
    this.counter++;
  }
  decrement() {
    this.counter--;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste below code in any child component.ts file.&lt;br&gt;
Based on the exmaple below I name the file child.component.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ngOnChanges(changes: SimpleChanges) {
    // runs before ngOnInit()
    // executes on every change
    const newNumberChange: SimpleChange = changes.myNewNumber;
    console.log(
      'Previous Value - (ng on changes): ',
      newNumberChange.previousValue
    );
    console.log(
      'Current Value - (ng on changes): ',
      newNumberChange.currentValue
    );
    this.myNewNumber = newNumberChange.currentValue;
  }
 ngOnInit() {
    // executes only one time
    // use to initialize or call functions / methods
    console.log('ngOnInit Value: ', this.myNewNumber);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the chicld.component.html, you can paste the below code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h2&amp;gt;{{ myNewNumber }}&amp;lt;/h2&amp;gt;
&amp;lt;h2&amp;gt;{{ myName.name }}&amp;lt;/h2&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In app.component.html, you can paste the below code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button (click)="decrement()"&amp;gt;Subtract&amp;lt;/button&amp;gt;
&amp;lt;div&amp;gt;
  &amp;lt;app-child [myNewNumber]="counter" [myName]="user"&amp;gt;&amp;lt;/app-child&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;button (click)="increment()"&amp;gt;Add&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>angular</category>
      <category>typescript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Add dark mode custom theme - @angular/material</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Sat, 01 Apr 2023 15:00:19 +0000</pubDate>
      <link>https://dev.to/richiepee/add-dark-mode-custom-theme-angularmaterial-52n4</link>
      <guid>https://dev.to/richiepee/add-dark-mode-custom-theme-angularmaterial-52n4</guid>
      <description>&lt;p&gt;Lets begin with the installation process after then properly configuring the custom dark team in our application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng add @angular/material 
Choose a prebuilt theme name, or "custom" for a custom theme: (Use arrow keys)
&amp;gt; Indigo/Pink        [ Preview: https://material.angular.io?theme=indigo-pink ]
  Deep Purple/Amber  [ Preview: https://material.angular.io?theme=deeppurple-amber ]
  Pink/Blue Grey     [ Preview: https://material.angular.io?theme=pink-bluegrey ]
  Purple/Green       [ Preview: https://material.angular.io?theme=purple-green ]
  Custom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;selected Custom&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;? Choose a prebuilt theme name, or "custom" for a custom theme: Custom
? Set up global Angular Material typography styles? (y/N) y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;? Set up browser animations for Angular Material? (Y/n) y 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to use the dark theme, please follow the below syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$Products-theme: mat.define-dark-theme((
  color: (
    primary: $Products-primary,
    accent: $Products-accent,
    warn: $Products-warn,
  )
));
.dark-theme{
  @include mat.all-component-themes($Products-theme);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>EPERM: operation not permitted" when trying to save/create file on Visual Studio Code</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Mon, 30 Jan 2023 03:20:25 +0000</pubDate>
      <link>https://dev.to/richiepee/eperm-operation-not-permitted-when-trying-to-savecreate-file-on-visual-studio-code-hc9</link>
      <guid>https://dev.to/richiepee/eperm-operation-not-permitted-when-trying-to-savecreate-file-on-visual-studio-code-hc9</guid>
      <description>&lt;p&gt;&lt;em&gt;Fixed:&lt;/em&gt; &lt;br&gt;
&lt;strong&gt;If you are not able to open or create a file in any of the drives ex. C: or D: etc.. Just download the vs-code system installer and you could use that across any drive.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cn5IQiZx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpnwr9p30yjaodz5247q.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cn5IQiZx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpnwr9p30yjaodz5247q.JPG" alt="Image description" width="880" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>React for Beginners</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Fri, 27 Jan 2023 14:39:28 +0000</pubDate>
      <link>https://dev.to/richiepee/react-for-beginners-493f</link>
      <guid>https://dev.to/richiepee/react-for-beginners-493f</guid>
      <description>&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt; is JavaScript Library used for building Rich UI and helps facilitate page interactions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;some best practices in react&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you may want to close tags &lt;code&gt;/&amp;gt;&lt;/code&gt; if they are empty.
ex.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const output= &amp;lt;img src={user.someUrl} /&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;keywords used throughout this post:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;attr - attribute&lt;/li&gt;
&lt;li&gt;output - displays the desired result&lt;/li&gt;
&lt;li&gt;UI - user interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Introducing JSX in React&lt;/strong&gt; -&lt;br&gt;
React JSX: Allows us to put HTML into JavaScript. &lt;br&gt;
ex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const firstName = "Oteele"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in our html file, we can refer to the variable name firstName in an H1 tag like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;my name is {firstName}&amp;lt;/h1&amp;gt; // Oteele 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;OR try the below in your IDE of choice: *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function personName(user) {
  return user.firstName + ' ' + user.lastName;
}
const user = {
  firstName: 'Oteele',
  lastName: 'Ankasa'
};
const output= (
  &amp;lt;h1&amp;gt;
    Hello, {personName(user)}!
  &amp;lt;/h1&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;We can also specify attributes with JSX&lt;/strong&gt;:&lt;br&gt;
&lt;em&gt;using quotes to specify string literals as attr.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const output= &amp;lt;a href="https://www.reactjs.org"&amp;gt; link &amp;lt;/a&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;using curly braces to embed a JSX in an atrr.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const output= &amp;lt;img src={user.someUrl}&amp;gt;&amp;lt;/img&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;As a side note&lt;/strong&gt;: Passing double quotes around a curly braces when embedding JSX in an attribute would not wok as expected.&lt;code&gt;"{}" ❌.&lt;br&gt;
&lt;/code&gt;Better to ignore adding double quotes. &lt;code&gt;{} ✅&lt;/code&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>career</category>
      <category>internship</category>
      <category>learning</category>
    </item>
    <item>
      <title>Deprecation notice: ReactDOM.render is no longer supported in React 18</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Mon, 26 Sep 2022 05:11:22 +0000</pubDate>
      <link>https://dev.to/richiepee/deprecation-notice-reactdomrender-is-no-longer-supported-in-react-18-32o5</link>
      <guid>https://dev.to/richiepee/deprecation-notice-reactdomrender-is-no-longer-supported-in-react-18-32o5</guid>
      <description>&lt;p&gt;For typescript go with the below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement); root.render( );&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Netlify 404 Page Not Found error solved</title>
      <dc:creator>Phinehas Alabi</dc:creator>
      <pubDate>Sun, 04 Sep 2022 12:18:58 +0000</pubDate>
      <link>https://dev.to/richiepee/netlify-404-page-not-found-error-solved-11c9</link>
      <guid>https://dev.to/richiepee/netlify-404-page-not-found-error-solved-11c9</guid>
      <description>&lt;p&gt;While in the course of working on building an app using netlify, I encountered below error message: &lt;br&gt;
Page Not Found. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;issue&lt;br&gt;
: This was due to not referencing the exact build folder in netlify. &lt;/p&gt;

&lt;p&gt;solution&lt;br&gt;
: after running ng build, the app generated a dist folder and in that dist folder, you will find the name of your app. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, on netlify (&lt;a href="https://app.netlify.com/sites/app-name-goes-here/settings/deploys"&gt;https://app.netlify.com/sites/app-name-goes-here/settings/deploys&lt;/a&gt;) &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5sLR7EIV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ft3xxc0xz5r7hc5tcm31.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5sLR7EIV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ft3xxc0xz5r7hc5tcm31.PNG" alt="Image description" width="880" height="359"&gt;&lt;/a&gt;&lt;br&gt;
Click on edit settings and add the app name to the dist folder just like the above attachement and your build should work just &lt;br&gt;
fine. &lt;/p&gt;

&lt;p&gt;step-by-step-video: &lt;iframe width="710" height="399" src="https://www.youtube.com/embed/0Tv23NPt1MM?start=55"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
