<?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: Edgar Lindo</title>
    <description>The latest articles on DEV Community by Edgar Lindo (@elindo586).</description>
    <link>https://dev.to/elindo586</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%2F809019%2F9a1ac801-89fe-4be2-980a-58f854b7e179.png</url>
      <title>DEV Community: Edgar Lindo</title>
      <link>https://dev.to/elindo586</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elindo586"/>
    <language>en</language>
    <item>
      <title>Mongoose connect is not a function...  What is wrong? </title>
      <dc:creator>Edgar Lindo</dc:creator>
      <pubDate>Wed, 09 Feb 2022 17:01:53 +0000</pubDate>
      <link>https://dev.to/elindo586/mongoose-connect-is-not-a-function-what-is-wrong-2fmj</link>
      <guid>https://dev.to/elindo586/mongoose-connect-is-not-a-function-what-is-wrong-2fmj</guid>
      <description>&lt;p&gt;I have tried to connect mongodb to REACT in a million different ways, using uri, putting the code straight on the ./app, doing the connection in another file and requiring it in the ./app page... nothing has worked.&lt;/p&gt;

&lt;p&gt;I believe I have the username and password just fine, along with the database name... &lt;/p&gt;

&lt;p&gt;Why am I keep getting these errors and not able to connect? &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%2F9ywddm528mcb6nve0nu9.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%2F9ywddm528mcb6nve0nu9.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>mongoose</category>
      <category>react</category>
    </item>
    <item>
      <title>Why would this code not work to populate html table from MongoDB in REACT?</title>
      <dc:creator>Edgar Lindo</dc:creator>
      <pubDate>Mon, 07 Feb 2022 22:33:29 +0000</pubDate>
      <link>https://dev.to/elindo586/how-to-populate-an-html-table-pulling-data-from-mongodb-to-react-1jn8</link>
      <guid>https://dev.to/elindo586/how-to-populate-an-html-table-pulling-data-from-mongodb-to-react-1jn8</guid>
      <description>&lt;p&gt;Below is the code I am trying to implement.  Basically just trying to map the table and placing the results in the body... but the code breaks after trying to map() &lt;/p&gt;

&lt;p&gt;Would anybody know what could be missing?   thanks..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "./App.css";
import React from "react";

const mongoose = require("mongoose");

main().catch((err) =&amp;gt; console.log(err));

async function main() {
  await mongoose.connect(
    "mongodb+srv://name:password@cluster0.gcyyo.mongodb.net/test?retryWrites=true&amp;amp;w=majority"
  );
}

const PartSchema = new mongoose.Schema({
  reference: String,
  description: String,
  replacements: String,
});

const Part = mongoose.model("Part", PartSchema);


function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;h1&amp;gt;Hello World 5 &amp;lt;/h1&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;thead&amp;gt;
          &amp;lt;tr&amp;gt;
            &amp;lt;th&amp;gt;Reference &amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt; Description &amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt;Replacements &amp;lt;/th&amp;gt;
          &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
          {Part.map((item) =&amp;gt; (
            &amp;lt;tr&amp;gt;
              &amp;lt;td&amp;gt;{item.reference}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{item.description}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{item.replacements}&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
          ))}
        &amp;lt;/tbody&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

</description>
      <category>react</category>
      <category>mongodb</category>
      <category>mongoose</category>
    </item>
    <item>
      <title>Why am I getting tons of errs when adding mongoose to REACT?  </title>
      <dc:creator>Edgar Lindo</dc:creator>
      <pubDate>Fri, 04 Feb 2022 20:35:16 +0000</pubDate>
      <link>https://dev.to/elindo586/why-am-i-getting-tons-of-errs-when-adding-mongoose-to-react-4c1i</link>
      <guid>https://dev.to/elindo586/why-am-i-getting-tons-of-errs-when-adding-mongoose-to-react-4c1i</guid>
      <description>&lt;p&gt;Sure.. I can run npm audit fix --force  .. but REACT goes on error after error to the point where it doesn't responds any more..&lt;/p&gt;

&lt;p&gt;Is this a mongoose problem?  Is there another way to work with it? &lt;/p&gt;

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

</description>
      <category>mongoose</category>
      <category>react</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>What dependencies do I need to work with REACT?</title>
      <dc:creator>Edgar Lindo</dc:creator>
      <pubDate>Thu, 03 Feb 2022 23:51:31 +0000</pubDate>
      <link>https://dev.to/elindo586/what-dependencies-do-i-need-to-work-with-react-20d2</link>
      <guid>https://dev.to/elindo586/what-dependencies-do-i-need-to-work-with-react-20d2</guid>
      <description>&lt;p&gt;For example, I need to work with MongoDB, so I did install Mongoose.&lt;/p&gt;

&lt;p&gt;Do I need nodemon to work with REACT?&lt;/p&gt;

&lt;p&gt;This is a list of dependencies that I have on a test run&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "name": "table2",&lt;br&gt;
  "version": "0.1.0",&lt;br&gt;
  "private": true,&lt;br&gt;
  "dependencies": {&lt;br&gt;
    "@testing-library/jest-dom": "^5.16.2",&lt;br&gt;
    "@testing-library/react": "^12.1.2",&lt;br&gt;
    "@testing-library/user-event": "^13.5.0",&lt;br&gt;
    "cors": "^2.8.5",&lt;br&gt;
    "dotenv": "^16.0.0",&lt;br&gt;
    "express": "^4.17.2",&lt;br&gt;
    "mongoose": "^6.2.0",&lt;br&gt;
    "nodemon": "^2.0.15",&lt;br&gt;
    "react": "^17.0.2",&lt;br&gt;
    "react-dom": "^17.0.2",&lt;br&gt;
    "react-scripts": "^5.0.0",&lt;br&gt;
    "save-dev": "^0.0.1-security",&lt;br&gt;
    "web-vitals": "^2.1.4"&lt;br&gt;
  },&lt;br&gt;
  "scripts": {&lt;br&gt;
    "start": "react-scripts start",&lt;br&gt;
    "build": "react-scripts build",&lt;br&gt;
    "test": "react-scripts test",&lt;br&gt;
    "eject": "react-scripts eject"&lt;br&gt;
  },&lt;br&gt;
  "eslintConfig": {&lt;br&gt;
    "extends": [&lt;br&gt;
      "react-app",&lt;br&gt;
      "react-app/jest"&lt;br&gt;
    ]&lt;br&gt;
  },&lt;br&gt;
  "browserslist": {&lt;br&gt;
    "production": [&lt;br&gt;
      "&amp;gt;0.2%",&lt;br&gt;
      "not dead",&lt;br&gt;
      "not op_mini all"&lt;br&gt;
    ],&lt;br&gt;
    "development": [&lt;br&gt;
      "last 1 chrome version",&lt;br&gt;
      "last 1 firefox version",&lt;br&gt;
      "last 1 safari version"&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Why is my "hello world" disappearing after adding the connection code from MongoDB Atlas in my REACT app?</title>
      <dc:creator>Edgar Lindo</dc:creator>
      <pubDate>Thu, 03 Feb 2022 23:45:20 +0000</pubDate>
      <link>https://dev.to/elindo586/why-is-my-hello-world-disappearing-after-adding-the-connection-code-from-mongodb-atlas-in-my-react-app-3bb5</link>
      <guid>https://dev.to/elindo586/why-is-my-hello-world-disappearing-after-adding-the-connection-code-from-mongodb-atlas-in-my-react-app-3bb5</guid>
      <description>&lt;p&gt;Why is my "hello world" disappearing after adding the connection code from MongoDB Atlas?&lt;/p&gt;

&lt;p&gt;The code is fine and showing "Hello world!" on my 3000 port, and as soon as I add the mongoose.connect function, then the port 3000 goes blank and the "Hello world!" disappear.   What could be happening? &lt;/p&gt;

&lt;p&gt;Yes, I did install mongoose on package.json&lt;/p&gt;

&lt;p&gt;`import React from "react";&lt;br&gt;
import ReactDOM from "react-dom";&lt;br&gt;
import "./index.css";&lt;br&gt;
import reportWebVitals from "./reportWebVitals";&lt;/p&gt;

&lt;p&gt;const mongoose = require("mongoose");&lt;/p&gt;

&lt;p&gt;mongoose.connect(&lt;br&gt;
  "mongodb+srv://:@cluster0.gcyyo.mongodb.net/test?retryWrites=true&amp;amp;w=majority"&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;const partSchema = new mongoose.Schema({&lt;br&gt;
  partN: "string",&lt;br&gt;
  description: "string",&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;const Part = mongoose.model("Part", partSchema);&lt;/p&gt;

&lt;p&gt;ReactDOM.render(&lt;br&gt;
  &lt;br&gt;
    &lt;/p&gt;
&lt;h1&gt;Hello world! &lt;/h1&gt;
&lt;br&gt;
  ,&lt;br&gt;
  document.getElementById("root")&lt;br&gt;
);`

</description>
      <category>react</category>
      <category>mongodb</category>
      <category>mongoose</category>
    </item>
  </channel>
</rss>
