<?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: PJ Mantoss</title>
    <description>The latest articles on DEV Community by PJ Mantoss (@pjmantoss).</description>
    <link>https://dev.to/pjmantoss</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%2F238792%2Fff52e6fa-9200-47ae-8b0b-1c8dde7b88b5.jpeg</url>
      <title>DEV Community: PJ Mantoss</title>
      <link>https://dev.to/pjmantoss</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pjmantoss"/>
    <language>en</language>
    <item>
      <title>How to Build an Issue Tracker with Appsmith</title>
      <dc:creator>PJ Mantoss</dc:creator>
      <pubDate>Sat, 06 Feb 2021 10:07:42 +0000</pubDate>
      <link>https://dev.to/pjmantoss/how-to-build-an-issue-tracker-with-appsmith-204e</link>
      <guid>https://dev.to/pjmantoss/how-to-build-an-issue-tracker-with-appsmith-204e</guid>
      <description>&lt;p&gt;An Issue Tracker is a tool that is used by tech support teams in any organization to track and resolve complains and issues as raised by customers or users of a particular software product. Below are images of the finished tracker:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dm3cjp2pmf" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dm3cjp2pmf" title="Issue Tracker Dashboard" alt="Issue Tracker 1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dwars4kzef" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dwars4kzef" title="Issue Tracker Dashboard" alt="Issue Tracker 1"&gt;&lt;/a&gt;&lt;br&gt;
Finished version of the &lt;a href="https://app.appsmith.com/applications/6006e8c15b452f525458dd7c/pages/6006e8c15b452f525458dd7e" rel="noopener noreferrer"&gt;Issue Tracker Dashboard&lt;/a&gt; on Appsmith&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;em&gt;If you prefer videos to reading, scroll down to the bottom for links to the video tutorial&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Tracker will be created using &lt;strong&gt;Appsmith&lt;/strong&gt; and &lt;strong&gt;Airtable&lt;/strong&gt;. Appsmith is a JavaScript based development platform used for building internal tools swiftly while Airtable is a cloud database service.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Things First:
&lt;/h2&gt;

&lt;p&gt;Before you start building, first do the following;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visit this &lt;a href="https://app.appsmith.com/user/signup?" rel="noopener noreferrer"&gt;link&lt;/a&gt; to Sign Up for a free Appsmith account (if you already have one, feel free to skip this step)&lt;/li&gt;
&lt;li&gt;Visit this &lt;a href="https://airtable.com/signup" rel="noopener noreferrer"&gt;link&lt;/a&gt; to Sign Up for the free version of an Airtable account&lt;/li&gt;
&lt;li&gt;Sign into your airtable account after confirming your e-mail and click on &lt;strong&gt;Add a base&lt;/strong&gt; from the &lt;strong&gt;My First Workspace&lt;/strong&gt; section of your account. Create a database that has the same structure like the one in the image below;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Duezjkzgzx" title="Issue Tracker Database" alt="Issue Tracker Airtable Database"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have done the necessary basics, let's start building our Issue Tracker tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1:&lt;/strong&gt; Sign into your Appsmith account and click on &lt;strong&gt;Create New&lt;/strong&gt; under your personal organization.&lt;/p&gt;

&lt;p&gt;You will be re-directed to a new page for the new app&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 2:&lt;/strong&gt; The new app is created with the default name &lt;strong&gt;Untitled Application 1&lt;/strong&gt;. Rename it to &lt;strong&gt;Issue Tracker Dashboard&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The new app by default comes with new directories as seen in the image below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dfngeuamdp" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dfngeuamdp" title="Appsmith Environment" alt="Appsmith Environment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pages&lt;/strong&gt; is the container for all the pages of your app. &lt;strong&gt;Page1&lt;/strong&gt; is the container holding the following entities;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Widgets&lt;/strong&gt;, a container for all the widgets that will be used on &lt;strong&gt;Page1&lt;/strong&gt;,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;APIs&lt;/strong&gt;, a container for all APIs that Page1 connects to,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DB Queries&lt;/strong&gt;, a container for all databases and their queries used by Page1 to read and write data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Issue Tracker&lt;/strong&gt; app will contain &lt;strong&gt;2&lt;/strong&gt; pages. The &lt;strong&gt;first page&lt;/strong&gt; will list all the &lt;strong&gt;issues&lt;/strong&gt; that have been submitted and the &lt;strong&gt;second page&lt;/strong&gt; will contain the add &lt;strong&gt;issue form&lt;/strong&gt; for submitting &lt;strong&gt;new issues&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 3&lt;/strong&gt;: Rename &lt;strong&gt;Page1&lt;/strong&gt; to &lt;strong&gt;IssuesListPage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 4&lt;/strong&gt;: Set up the required API for connecting to the Airtable database which allows for connection using REST API. Go to &lt;a href="https://airtable.com/api" rel="noopener noreferrer"&gt;Airtable API&lt;/a&gt; to view the API documentation on how to setup a GET request to the &lt;strong&gt;Issues&lt;/strong&gt; table in the Issues Tracker database endpoint. In appsmith, Click on &lt;strong&gt;+&lt;/strong&gt; to the right of &lt;strong&gt;APIs&lt;/strong&gt;. Then click &lt;strong&gt;Create new&lt;/strong&gt; (&lt;strong&gt;IssuesListPage &amp;gt; APIs &amp;gt; Create new&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 5&lt;/strong&gt;: Rename your API to &lt;strong&gt;AirtableGET&lt;/strong&gt;, copy and paste the &lt;strong&gt;URL&lt;/strong&gt; from Airtable API documentation and enter &lt;strong&gt;Authorization&lt;/strong&gt; and &lt;strong&gt;Bearer API_KEY&lt;/strong&gt; under &lt;strong&gt;Headers&lt;/strong&gt; as shown in the image below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Djfk84zva4" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Djfk84zva4" title="API GET Request" alt="API GET Request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 6&lt;/strong&gt;: Click on &lt;strong&gt;+&lt;/strong&gt; to the right of &lt;strong&gt;Widgets&lt;/strong&gt;, to add a &lt;strong&gt;TABLE&lt;/strong&gt; widget (&lt;strong&gt;IssuesListPage &amp;gt; Widgets&lt;/strong&gt;). Drag and drop the TABLE widget to the canvas on your right. This will create a new table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 7&lt;/strong&gt;: Click on &lt;strong&gt;Table1&lt;/strong&gt; in the left panel to open the property-pane of the table widget. In the property-pane, click on &lt;strong&gt;Table1&lt;/strong&gt; to change its name to &lt;strong&gt;IssuesTable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 8&lt;/strong&gt;: Select and delete all the content of Table Data in the table’s property-pane and write in the below JavaScript code:&lt;br&gt;
&lt;code&gt;{{AirtableGET.data.records.map(item =&amp;gt; item.fields)}}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Write the code with the double braces.&lt;/p&gt;

&lt;p&gt;This will link up your table to the API data pulled in from Airtable. &lt;/p&gt;

&lt;p&gt;If you have followed the steps correctly up to this point, you should be able to see the records from airtable displayed in the &lt;strong&gt;IssuesTable&lt;/strong&gt; like in the image below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dbzucwb8mj" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dbzucwb8mj" title="Issues Table" alt="Issues Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 9&lt;/strong&gt;: Next, we add the second page of our application that will contain the add issue form. Click on &lt;strong&gt;IssuesListPage&lt;/strong&gt; to minimize it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 10&lt;/strong&gt;: Click on &lt;strong&gt;+&lt;/strong&gt; beside &lt;strong&gt;Pages&lt;/strong&gt; to add a new page to the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 11&lt;/strong&gt;: Rename the new page to &lt;strong&gt;AddIssuesPage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 12&lt;/strong&gt;: Click on &lt;strong&gt;+&lt;/strong&gt; beside &lt;strong&gt;Widgets&lt;/strong&gt; to add a new widget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 13&lt;/strong&gt;: Drag and Drop the &lt;strong&gt;FORM&lt;/strong&gt; widget unto the canvas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 14&lt;/strong&gt;: On the left panel click &lt;strong&gt;Form1&lt;/strong&gt; to open its property-pane.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 15&lt;/strong&gt;: In the property-pane, rename &lt;strong&gt;Form1&lt;/strong&gt; to &lt;strong&gt;IssuesForm&lt;/strong&gt;, change Background Color from &lt;strong&gt;white&lt;/strong&gt; to &lt;strong&gt;#D9D9D9&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 16&lt;/strong&gt;: Click on &lt;strong&gt;Form&lt;/strong&gt; at the top of the form and rename it to &lt;strong&gt;Add Isssue&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 17&lt;/strong&gt;: Drag and drop the &lt;strong&gt;RICH TEXT EDITOR&lt;/strong&gt; widget unto the form and, inside its property-pane, rename it to &lt;strong&gt;DescriptionInput&lt;/strong&gt;.  Drag and drop the &lt;strong&gt;TEXT&lt;/strong&gt; widget above the &lt;strong&gt;DescriptionInput&lt;/strong&gt; field and rename it to &lt;strong&gt;Description&lt;/strong&gt;: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 18&lt;/strong&gt;: Drag and drop the &lt;strong&gt;DROPDOWN&lt;/strong&gt; widget unto the form (below &lt;strong&gt;DescriptionInput&lt;/strong&gt;) and, inside its property-pane, rename it to &lt;strong&gt;SeverityDropdown&lt;/strong&gt;.  Drag and drop the &lt;strong&gt;TEXT&lt;/strong&gt; widget above &lt;strong&gt;SeverityDropdown&lt;/strong&gt; field and rename it to &lt;strong&gt;Severity&lt;/strong&gt;: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 19&lt;/strong&gt;: Drag and drop the &lt;strong&gt;INPUT&lt;/strong&gt; widget unto the form (below &lt;strong&gt;SeverityDropdown&lt;/strong&gt;) and, inside its property-pane, rename it to &lt;strong&gt;AssignToInput&lt;/strong&gt;.  Drag and drop the &lt;strong&gt;TEXT&lt;/strong&gt; widget above &lt;strong&gt;AssignToInput&lt;/strong&gt; field and rename it to &lt;strong&gt;Assign To:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 20&lt;/strong&gt;: Delete the &lt;strong&gt;RESET&lt;/strong&gt; button and rename the text value of the &lt;strong&gt;SUBMIT&lt;/strong&gt; button (in its property-pane) to &lt;strong&gt;Add Issue&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you followed up to this stage without missing a step, you should have a form similar to the one in the image below;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3D235veer6r" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3D235veer6r" title="Issues Form" alt="Issues Form"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 21&lt;/strong&gt;: Next, Click on &lt;strong&gt;+&lt;/strong&gt; beside &lt;strong&gt;APIs&lt;/strong&gt; under the &lt;strong&gt;AddIssuesPage&lt;/strong&gt; (&lt;strong&gt;AddIssuesPage &amp;gt; APIs &amp;gt; Create new&lt;/strong&gt;) to set up a &lt;strong&gt;POST&lt;/strong&gt; request to update the airtable database whenever the form is filled and submitted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 22&lt;/strong&gt;: Go to &lt;a href="https://airtable.com/api" rel="noopener noreferrer"&gt;Airtable API&lt;/a&gt;, click the database name (&lt;strong&gt;Issue Tracker&lt;/strong&gt;) and navigate to the &lt;strong&gt;Issues Table&lt;/strong&gt; section to view the &lt;strong&gt;API documentation&lt;/strong&gt; on how to make a POST request to the &lt;strong&gt;Issues endpoint&lt;/strong&gt;;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dbrsysahby" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dbrsysahby" title="POST Request" alt="POST Request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 23&lt;/strong&gt;: Rename the &lt;strong&gt;API&lt;/strong&gt; to &lt;strong&gt;AirtablePOST&lt;/strong&gt; and fill in the &lt;strong&gt;URL&lt;/strong&gt;, &lt;strong&gt;Headers and body&lt;/strong&gt; as shown in the images below;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3D46wauw5jw" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3D46wauw5jw" title="POST Request" alt="POST Request"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dfcmnba99v" 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%2Ffiles.fm%2Fthumb_show.php%3Fi%3Dfcmnba99v" title="POST Request body" alt="POST Request body"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 24&lt;/strong&gt;: On the &lt;strong&gt;AddIssuesForm&lt;/strong&gt; open the property-pane of the &lt;strong&gt;Add Issue&lt;/strong&gt; button and do the following for each of the fields;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click inside the &lt;strong&gt;onClick&lt;/strong&gt; field, click &lt;strong&gt;Call An API&lt;/strong&gt; and click &lt;strong&gt;AirtablePOST&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click inside &lt;strong&gt;onSuccess&lt;/strong&gt; field (&lt;strong&gt;onSuccess &amp;gt; Show Message&lt;/strong&gt;) and type &lt;strong&gt;Success! Issue was Added&lt;/strong&gt; in the message field&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click inside &lt;strong&gt;onError&lt;/strong&gt; field (&lt;strong&gt;onError &amp;gt; Show Message&lt;/strong&gt;) and type &lt;strong&gt;Fail! Issue was not Added&lt;/strong&gt; in the message field&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What we’ve done above is to bind the form to the &lt;strong&gt;AirtablePOST&lt;/strong&gt; so that each time the fields in &lt;strong&gt;AddIssuesForm&lt;/strong&gt; are filled and submitted (by clicking the &lt;strong&gt;Add Issue button&lt;/strong&gt;), the &lt;strong&gt;AirtablePOST&lt;/strong&gt; runs, creating and setting a new record on the &lt;strong&gt;airtable&lt;/strong&gt; database. Then we added &lt;strong&gt;success and error messages&lt;/strong&gt; to alert us if the issue was added successfully or not.&lt;/p&gt;

&lt;p&gt;Now the &lt;strong&gt;Issue Tracker tool&lt;/strong&gt; is functional. Deploy it and try adding an issue. Then open the &lt;strong&gt;IssuesListPage&lt;/strong&gt; to verify it was added. Also open the &lt;strong&gt;Airtable&lt;/strong&gt; database to confirm the record has been added there too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hippovideo.io/video/play/cNCvqnsXnu8_enu8XoBv3yt-iN4B6ZObFGIXjMzJtIQ?org_tok=8UBh-shvQ3u95GXcAiiZAw&amp;amp;utm_source=hv-campaigns&amp;amp;hreferer=private&amp;amp;_=1612604686841&amp;amp;&amp;lt;br&amp;gt;%0AWatch%20Video" rel="noopener noreferrer"&gt;Video Tutorial - Part 1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hippovideo.io/video/play/uaMp2ArBWUqM3vinWulDscmbrqBQFikTXu46DXrJgiA?org_tok=8UBh-shvQ3u95GXcAiiZAw&amp;amp;utm_source=hv-campaigns&amp;amp;hreferer=private&amp;amp;_=1612604947763&amp;amp;&amp;lt;br&amp;gt;%0AWatch%20Video" rel="noopener noreferrer"&gt;Video Tutorial - Part 2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for learning with me. If you have any questions, feel free to ask in the comments section.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>appsmith</category>
      <category>react</category>
      <category>issuetracker</category>
    </item>
    <item>
      <title>How can I make this React Project Pass some Tests?</title>
      <dc:creator>PJ Mantoss</dc:creator>
      <pubDate>Wed, 25 Mar 2020 13:18:56 +0000</pubDate>
      <link>https://dev.to/pjmantoss/how-can-i-make-this-react-project-pass-some-tests-3e1m</link>
      <guid>https://dev.to/pjmantoss/how-can-i-make-this-react-project-pass-some-tests-3e1m</guid>
      <description>&lt;p&gt;Hello everyone! I just concluded the first project in the ‘Front End Libraries course’ on FreeCodeCamp - The Random Quote Machine, using React JS. The app is working, but it’s failing almost all the tests in the test suite. How can I make it to pass all the tests?&lt;/p&gt;

&lt;p&gt;The project - &lt;a href="https://codesandbox.io/s/charming-hill-fvi4f"&gt;https://codesandbox.io/s/charming-hill-fvi4f&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Test Requirements - &lt;a href="https://www.freecodecamp.org/learn/front-end-libraries/front-end-libraries-projects/build-a-random-quote-machine"&gt;https://www.freecodecamp.org/learn/front-end-libraries/front-end-libraries-projects/build-a-random-quote-machine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The test suite - &lt;a href="https://codepen.io/freeCodeCamp/pen/MJjpwO"&gt;https://codepen.io/freeCodeCamp/pen/MJjpwO&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for your help.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>functional</category>
    </item>
    <item>
      <title>Returning an object using reduce()</title>
      <dc:creator>PJ Mantoss</dc:creator>
      <pubDate>Fri, 06 Mar 2020 09:33:12 +0000</pubDate>
      <link>https://dev.to/pjmantoss/returning-an-object-using-reduce-h98</link>
      <guid>https://dev.to/pjmantoss/returning-an-object-using-reduce-h98</guid>
      <description>&lt;p&gt;Hi good people! I need help with some JavaScript challenge:&lt;/p&gt;

&lt;p&gt;QUESTION: Write a function called getSongCountByArtist which takes in an array of songs and returns an object. The keys in the object should be artist names, and the values should be the number of songs by that artist in the original array.&lt;/p&gt;

&lt;p&gt;My code Solution:&lt;/p&gt;

&lt;p&gt;function getSongCountByArtist(arr){&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return arr.reduce(function(acc,val){
    let artistSong = val.name;
    let songNo = artistSong.length;

    return acc[val.artist] + songNo;

}, {})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;getSongCountByArtist(songs); //NaN&lt;/p&gt;

&lt;p&gt;data source &lt;a href="https://github.com/PJMantoss/iterators2/blob/master/data.js"&gt;https://github.com/PJMantoss/iterators2/blob/master/data.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PROBLEM EXPLANATION: The function is supposed to return an object with &lt;code&gt;artist&lt;/code&gt; names as keys and number of songs by the artist as values. But On running getSongCountByArtist(songs) it returns &lt;code&gt;NaN&lt;/code&gt;. How can I refactor my code to work? Thank you&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Returning part of a string data using map()</title>
      <dc:creator>PJ Mantoss</dc:creator>
      <pubDate>Fri, 28 Feb 2020 17:14:19 +0000</pubDate>
      <link>https://dev.to/pjmantoss/returning-part-of-a-string-data-using-map-2cb0</link>
      <guid>https://dev.to/pjmantoss/returning-part-of-a-string-data-using-map-2cb0</guid>
      <description>&lt;p&gt;Hi good people! I'm trying to solve a JavaScript challenge, but my code is not working as expected&lt;br&gt;
/*&lt;br&gt;
PROBLEM: Write a function called getMainArtists which takes in an array of songs&lt;br&gt;
 and returns an array of the primary artists on the recordings. &lt;br&gt;
 If there's only one artist, that artist should be returned; &lt;br&gt;
 if there are featured artists, they should be ignored &lt;br&gt;
 (so only the artist to the left of "featuring" is kept.)&lt;br&gt;
*/&lt;/p&gt;

&lt;p&gt;//My Code Solution...&lt;/p&gt;

&lt;p&gt;function getMainArtists(arr){&lt;br&gt;
    return arr.map(function(val){&lt;br&gt;
        if ((val.artist).includes("featuring")){&lt;br&gt;
            return null;&lt;br&gt;
        } else {&lt;br&gt;
            return val.artist;&lt;br&gt;
        }&lt;br&gt;
    })&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;getMainArtists(songs);&lt;/p&gt;

&lt;p&gt;/*&lt;br&gt;
The data I'm using can be found here &lt;a href="https://github.com/PJMantoss/iterators2/blob/master/data.js"&gt;https://github.com/PJMantoss/iterators2/blob/master/data.js&lt;/a&gt;&lt;br&gt;
*/&lt;/p&gt;

&lt;p&gt;PROBLEM STATEMENT: When I run getMainArtists(songs) it returns an array of artist names excluding names that contain 'featuring'. It's suppose to also return artist names that have 'featuring', but should only leave out all the words starting from 'featuring'. Any ideas how I can refactor my code to work? Thank you for your help&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>functional</category>
    </item>
    <item>
      <title>Need some Help on React and ChatKit</title>
      <dc:creator>PJ Mantoss</dc:creator>
      <pubDate>Mon, 30 Sep 2019 10:04:06 +0000</pubDate>
      <link>https://dev.to/pjmantoss/need-some-help-on-react-and-chatkit-525b</link>
      <guid>https://dev.to/pjmantoss/need-some-help-on-react-and-chatkit-525b</guid>
      <description>&lt;p&gt;Hi fellow devs! I need some help. I'm trying to create a chat app with React and ChatKit API. The app is not working as it should. I created 2 users and 6 rooms in Chatkit. I then entered and saved some messages(in the chatkit) but on running the app the messages don't show on the screen(MessageList). Also, after typing a message and hitting ENTER on the UI again nothing shows on the screen (MessageList area). Please how can I fix this?&lt;/p&gt;

&lt;p&gt;Website... &lt;a href="https://toss-chat.netlify.com/"&gt;https://toss-chat.netlify.com/&lt;/a&gt;&lt;br&gt;
Github Repo... &lt;a href="https://github.com/PJMantoss/toss_chat"&gt;https://github.com/PJMantoss/toss_chat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

</description>
      <category>react</category>
      <category>chatkit</category>
      <category>pusher</category>
      <category>chatapp</category>
    </item>
  </channel>
</rss>
