<?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: Wensy</title>
    <description>The latest articles on DEV Community by Wensy (@wensyd).</description>
    <link>https://dev.to/wensyd</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%2F787446%2F85a6f7b7-d1f7-4128-a025-4ea9a2dbd504.jpeg</url>
      <title>DEV Community: Wensy</title>
      <link>https://dev.to/wensyd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wensyd"/>
    <language>en</language>
    <item>
      <title>Command Line Terminal Cheatsheet</title>
      <dc:creator>Wensy</dc:creator>
      <pubDate>Fri, 10 Jun 2022 16:15:15 +0000</pubDate>
      <link>https://dev.to/wensyd/command-line-terminal-cheatsheet-4d6b</link>
      <guid>https://dev.to/wensyd/command-line-terminal-cheatsheet-4d6b</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vmU7DrwD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkqvjb80753zx0co3x1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vmU7DrwD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkqvjb80753zx0co3x1l.png" alt="Image description" width="880" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>terminal</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>developers</category>
    </item>
    <item>
      <title>How to get started creating a Frontend React-App</title>
      <dc:creator>Wensy</dc:creator>
      <pubDate>Mon, 14 Mar 2022 19:46:41 +0000</pubDate>
      <link>https://dev.to/wensyd/how-to-get-started-creating-a-frontend-react-app-1g2a</link>
      <guid>https://dev.to/wensyd/how-to-get-started-creating-a-frontend-react-app-1g2a</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a folder that you want your project to be in. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cd into that folder and create a new React Project and make sure to give the project a name. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this example i'll use "sampleapp" as the name of the new project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app@latest sampleapp 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;** Once the app is done installing make sure to cd into the folder that was just created.**&lt;/p&gt;

&lt;p&gt;Install your support libraries and styles library for some page styling so the app doesn't look plain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i react-router-dom bootstrap 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When installing Bootstrap make sure to also add the css and bundle to the index.html file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://getbootstrap.com/docs/5.1/getting-started/introduction/" rel="noopener noreferrer"&gt;Getting Started with Bootstrap&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Test the server to ensure it is working &lt;/p&gt;

&lt;p&gt;run &lt;code&gt;npm start&lt;/code&gt; then go to &lt;code&gt;localhost:3000&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Once you see this, your app has been successfully installed and is ready to be edited. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now it's time to set up the React Router.&lt;/strong&gt;&lt;br&gt;
Inside of index.js&lt;/p&gt;

&lt;p&gt;add the following:&lt;br&gt;
&lt;code&gt;import {BrowserRouter as Router} from 'react-router-dom&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then you want to wrap the App component inside Router in order for the App and children will be able to use the Router.&lt;/p&gt;

&lt;p&gt;Finally you pass the app component inside of Router so that it can have access to all the router props.&lt;/p&gt;

&lt;p&gt;like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ReactDOM.render(
  &amp;lt;Router&amp;gt;
  &amp;lt;React.StrictMode&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/React.StrictMode&amp;gt;
  &amp;lt;/Router&amp;gt;,
  document.getElementById('root')
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we're ready to start customizing the application!!&lt;/p&gt;

&lt;p&gt;in the App.js file delete everything inside the &lt;/p&gt; so that you are left with a blank canvas.

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

&lt;p&gt;Here we will be adding all of the routes to the different pages of the application. &lt;/p&gt;

&lt;p&gt;In the src Folder create a new folder called "components" and a folder called "pages"&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Components&lt;/strong&gt; folder you can add small pieces of code that are related to the User Interface. For example I added a navbar.js and a footer.js file to my components folder. &lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Pages&lt;/strong&gt; folder you can have the different pages that act as routes for the app. &lt;/p&gt;

&lt;p&gt;For example the &lt;strong&gt;Home Page&lt;/strong&gt; and &lt;strong&gt;About Page&lt;/strong&gt;. &lt;/p&gt;

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

&lt;p&gt;For this example I will not be styling the navigation or footer. I will simply style the components and pages so that you can get a picture of how to set up the application. &lt;/p&gt;

&lt;p&gt;In every page and component you will set up the basic skeleton of the page.&lt;/p&gt;

&lt;p&gt;it will look as follows:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";

const About = (props) =&amp;gt; {
 return(
    &amp;lt;h1&amp;gt; this is the about page &amp;lt;/h1&amp;gt;
)
}

export default About 
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Once you have created the skeleton for each page, it's time to import the components, and also the components from React Router into the app.js file. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Now it's time to add the Routes and the Route paths.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inside of the returned JSX of the app.js file add the following and adjust it according to the app you want to make.&lt;/p&gt;

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

&lt;p&gt;In the top url search bar it look like this, when wanting to see the home page:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://localhost:3000/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the Home page that you have created&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lt8fgugb1o7zuvl8aa0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lt8fgugb1o7zuvl8aa0.png" alt="This is the Home page that you have created"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Since I want the Navbar and Footer to show on each page of the app, I will add it to the index.js file.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To add the Navbar and Footer to the index.js file you first import the components&lt;/p&gt;

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

&lt;p&gt;Then you add the the Navbar and Footer to be rendered inside the Router. &lt;/p&gt;

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

&lt;p&gt;You want to make sure you add this in the order you want it to be displayed. &lt;/p&gt;

&lt;p&gt;Once you style your pages and components you should have a full functioning app! &lt;/p&gt;

&lt;p&gt;Again this is a basic setup on how to get started creating a react app. &lt;/p&gt;

&lt;p&gt;Have fun coding and make it a great day! :) &lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Using React-Icons in Reactjs</title>
      <dc:creator>Wensy</dc:creator>
      <pubDate>Fri, 21 Jan 2022 04:49:00 +0000</pubDate>
      <link>https://dev.to/wensyd/using-react-icons-3loh</link>
      <guid>https://dev.to/wensyd/using-react-icons-3loh</guid>
      <description>&lt;p&gt;I have found that the best way to incorporate icons in your code is by using react icons. They have a variety of different icons, ranging from bootstrap icons, Font Awesome icons, ant design icons and BoxIcons to name a few out of many more. &lt;/p&gt;

&lt;p&gt;The installation process is fast and easy. &lt;/p&gt;

&lt;p&gt;Install by typing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react-icons --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the terminal for your project. &lt;/p&gt;

&lt;p&gt;Once react-icons is installed, you will need to import it into the page where you want to use the icons.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { FaGithub } from 'react-icons/fa';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you have imported you need to declare the icon in the code with a self-closing tag. &lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
     &amp;lt;h2 align="center"&amp;gt;Hello world!&amp;lt;/h2&amp;gt;
     &amp;lt;div align="center"&amp;gt;&amp;lt;FaGithub/&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt48im4ifmi3glgkv5je.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt48im4ifmi3glgkv5je.png" alt="react-icons"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing to keep in Mind! &lt;/p&gt;

&lt;p&gt;Whenever you are importing an icon make sure you are addressing the correct icon, whether it be from Font Awesome(fa) or bootstrap icons(bs). The icons will not work if you use a bootstrap icon and import it as an "fa" icon. &lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;When importing from 'react-icons/fa' the "fa" at the end is what indicates where the icon is coming from. In this case Font Awesome. &lt;/p&gt;

&lt;p&gt;The great thing is that at the top of the documentation it gives you the proper import method for the type of icon you want to use. &lt;/p&gt;

&lt;p&gt;Such as follows:&lt;/p&gt;

&lt;p&gt;Bootstrap Icons&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { IconName } from "react-icons/bs";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Font Awesome&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { IconName } from "react-icons/fa";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simply replace the IconName with the icon of your choosing and you should be all set!&lt;/p&gt;

&lt;p&gt;All documentation for this can be found here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://react-icons.github.io/react-icons" rel="noopener noreferrer"&gt;React-Icons&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is all information that I found to be helpful as a new developer and took me some time to figure out how it all worked. After several failed attempts, I thought I'd share my experience and hope to help someone else looking for an easy way to add icons to their code! &lt;/p&gt;

&lt;p&gt;Best of luck in your journey!&lt;/p&gt;

&lt;p&gt;-Wensy&lt;/p&gt;

</description>
      <category>react</category>
      <category>bootstrap</category>
      <category>icons</category>
      <category>fontawesome</category>
    </item>
  </channel>
</rss>
