<?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: Antoine CHEVALIER</title>
    <description>The latest articles on DEV Community by Antoine CHEVALIER (@seyboo).</description>
    <link>https://dev.to/seyboo</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%2F876093%2F95ba9a52-aed8-4bd9-9e75-96de5357cc42.jpg</url>
      <title>DEV Community: Antoine CHEVALIER</title>
      <link>https://dev.to/seyboo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seyboo"/>
    <language>en</language>
    <item>
      <title>3 Tips to improve your coding skills</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Tue, 07 Mar 2023 06:27:57 +0000</pubDate>
      <link>https://dev.to/seyboo/3-tips-for-software-engineers-1enn</link>
      <guid>https://dev.to/seyboo/3-tips-for-software-engineers-1enn</guid>
      <description>&lt;h1&gt;
  
  
  3 Tips to improve your coding skills
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Table of content :
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Understand your environnement&lt;/li&gt;
&lt;li&gt;Small bites&lt;/li&gt;
&lt;li&gt;Move it around, refine&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1. Understand your environnement
&lt;/h3&gt;

&lt;p&gt;Developing your curiosity is crucial for becoming a successful developer. Always ask yourself questions and experiment with your code to enhance your understanding of it. Try removing certain parts, comment them out, and observe how the program behaves. It's crucial to understand the purpose of the code you're writing, as well as the structure of your project. This knowledge will help you create high-quality software that is efficient and easy to maintain.&lt;/p&gt;

&lt;p&gt;To create efficient, maintainable, and scalable code, you must always be critical of your work and strive to improve it. This includes evaluating your coding practices and learning from your mistakes. A curious and analytical mindset will help you to develop your skills and stay ahead in your field. Moreover, it will enable you to write code that is more precise, effective, and easy to maintain.&lt;/p&gt;

&lt;p&gt;Never stop exploring and experimenting with your code. Keep striving to improve your skills. By doing so, you'll become a more competent and confident developer.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Small bites
&lt;/h3&gt;

&lt;p&gt;One good practice to develop is to work on the smallest feature possible. This approach allows you to focus on one manageable piece of code at a time. And once your done, you can review it and write a well-named commit. By breaking down the work into smaller chunks, you can improve the quality of your code and gain a better understanding of your craft. Moreover, it can help reduce the amount of stress that coding can provide.&lt;/p&gt;

&lt;p&gt;Working on small but manageable pieces of code enables you to be more efficient and productive. And it allows for better collaboration with other team members. Furthermore, when you encounter a bug, it's easier to identify the root cause when the code is well organised into smaller components. Always aim to break down your work into smaller features and iterate on them until they are complete, tested, and well-named. This way, you can create high-quality code that is easy to maintain and scale in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Move it around, refine
&lt;/h3&gt;

&lt;p&gt;Refactoring is a critical practice for developers, and it should get done regularly and proactively. Always keep in mind the next person who will read your code and try to make it more readable and understandable. Consider renaming your variables, functions, folders, and files to be more descriptive and consistent with one another.&lt;/p&gt;

&lt;p&gt;By taking the time to improve the readability of your code, you'll gain a better understanding of your codebase, and it will be easier to maintain and scale in the future. Refactoring can be a daunting task, but by following Rule 2 (i.e., breaking down the work into manageable pieces), you can make it a stress-free and enjoyable process.&lt;/p&gt;

&lt;p&gt;Don't wait until your code is riddled with technical debt before you start refactoring. Instead, make it a regular part of your development process, and you'll find that your code will be more efficient, maintainable, and scalable over time. So, keep your codebase clean and consistent, and you'll be setting yourself up for success in the long run.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>How to make a CRUD application with Firestore and React.</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Sat, 03 Dec 2022 13:27:12 +0000</pubDate>
      <link>https://dev.to/seyboo/how-to-make-a-crud-application-with-firestore-and-react-2k9e</link>
      <guid>https://dev.to/seyboo/how-to-make-a-crud-application-with-firestore-and-react-2k9e</guid>
      <description>&lt;h2&gt;
  
  
  Table of content :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setup Firebase&lt;/li&gt;
&lt;li&gt;Update Firestore rules&lt;/li&gt;
&lt;li&gt;Post&lt;/li&gt;
&lt;li&gt;Get&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup Firebase
&lt;/h3&gt;

&lt;p&gt;You can import the firebase settings from Project Settings inside your firebase application. I will only suggest you to store the values of the given config into a .env file for security reason. (We don’t want to let anyone access our firebase application).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { getFirestore } from ‘firebase/firestore’;
import { initializeApp } from “firebase/app”;

const firebaseConfig = {
  apiKey: process.env.REACT_APP_API_KEY,
  authDomain:  process.env.REACT_APP_AUTH_DOMAIN,
  databaseURL:  process.env.REACT_APP_DATABASE_URL,
  projectId:  process.env.REACT_APP_PROJECT_ID,
  storageBucket:  process.env.REACT_APP_STORAGE_BOCKET,
  messagingSenderId:  process.env.REACT_APP_MESSAGING_SENDER,
  appId:  process.env.REACT_APP_APP_ID,
  measurementId:  process.env.REACT_APP_MEASUREMENT_ID
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
export { db, app };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only difference between the default config is that we initialized the Firestore db.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update Firestore Rules
&lt;/h3&gt;

&lt;p&gt;Firestore got a defined rule that only allow us to write inside a document named like our userID. To do so we need a userID, received when login in. But we are not dealing with auth today so we need to change this rule.&lt;/p&gt;

&lt;p&gt;Initial Rules :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service cloud.firestore {
  match /databases/{database}/documents {
    match /{userId}/{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simplify rules :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Post
&lt;/h3&gt;

&lt;p&gt;We can then process to the creation of new users.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { db } from “./firebase”;
import { setDoc, doc  } from “firebase/firestore”;
  const createUser = async (name, age) =&amp;gt; {
    try {
    const mockUserId = name + age
      await setDoc(doc(db, “users”, mockUserId), {
        name,
        age,
      });
    } catch (e) {
      console.log(e);
    }
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DB : Reference to our Firestore Database that we exported during the setup process.&lt;/p&gt;

&lt;p&gt;A Doc : A document is a lightweight record that contains certains fields. Data-type : Object&lt;/p&gt;

&lt;p&gt;A Collection : A collection is a container of documents. Data-type : Array&lt;/p&gt;

&lt;p&gt;We create a function that take as an argument the name and the age of the user. We then call the setDoc function.“users” is the name of the collection that will contains our users.  mockUserId is the id of our user table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get
&lt;/h3&gt;

&lt;p&gt;Now let’s get the list of our users.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const getUsers = async () =&amp;gt; {
    try {
      const usersRef = collection(db, “users”);
      const usersSnap = await getDocs(usersRef)
      const users = [];
      usersSnap.forEach(user =&amp;gt; users.push(user.data()));
      return users;
    } catch (e) {
      console.log(e);
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We select the collection users, then get the docs of this collection. We then create a list of users. And for each documents we add their data to the list of users and return it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const deleteUser = async (userID) =&amp;gt; {
    try {
      const userRef = doc(db, “users”, userID);
      await deleteDoc(userRef)
    } catch (e) {
      console.log(e);
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To delete a user we need their reference ID in the collection. So we get it and create a ref of the document, and call the deleteDoc function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "../common/style/index.css";
import Navbar from "../common/components/NavBar";
import { db } from "../common/firebase";
import { setDoc, doc, deleteDoc, getDocs , collection } from "firebase/firestore";
import { useEffect, useState } from "react";

function App() {
  const [newUser, setNewUser] = useState();
  const [users, setUsers] = useState([])

  const createUser = async (name, age) =&amp;gt; {
    try {
      await setDoc(doc(db, "users", name + age), {
        name,
        age,
      });
    } catch (e) {
      console.log(e);
    }
  };

  const getUsers = async () =&amp;gt; {
    try {
      const usersRef = collection(db, "users");
      const usersSnap = await getDocs(usersRef)
      const users = [];
      usersSnap.forEach(user =&amp;gt; users.push(user.data()));
      return users;
    } catch (e) {
      console.log(e);
    }
  }

  const deleteUser = async (userID) =&amp;gt; {
    try {
      const userRef = doc(db, "users", userID);
      await deleteDoc(userRef)
    } catch (e) {
      console.log(e);
    }
  }

  const handleDeleteUser = async (userRef) =&amp;gt; {
    try {
      await deleteUser(userRef);
      setUsers(await getUsers());
    } catch (e) {
      console.log(e);
    }
  }

  useEffect(() =&amp;gt; {
    (async() =&amp;gt; setUsers(await getUsers()))()
  }, [])

  const handleCreateUser = async (e) =&amp;gt; {
    e.preventDefault();
    createUser(newUser.name, newUser.age);
    setUsers(await getUsers());
  };

  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;form className="form" onSubmit={(e) =&amp;gt; handleCreateUser(e)}&amp;gt;
        &amp;lt;div className="group"&amp;gt;
          &amp;lt;input
            type="text"
            required
            minlength="3"
            placeholder="Name..."
            onChange={(e) =&amp;gt;
              setNewUser({
                ...newUser,
                name: e.target.value,
              })
            }
          /&amp;gt;
          &amp;lt;span className="highlight"&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;span className="bar"&amp;gt;&amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;div className="group"&amp;gt;
          &amp;lt;input
            type="text"
            placeholder="Age..."
            required
            onChange={(e) =&amp;gt;
              setNewUser({
                ...newUser,
                age: e.target.value,
              })
            }
          /&amp;gt;
          &amp;lt;span className="highlight"&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;span className="bar"&amp;gt;&amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;button className="button"&amp;gt;Create User&amp;lt;/button&amp;gt;
      &amp;lt;/form&amp;gt;
     {users.length &amp;gt; 1 &amp;amp;&amp;amp; users.map((user, index) =&amp;gt; {
      return (
        &amp;lt;div key={index}&amp;gt;
          {" "}
          &amp;lt;h1&amp;gt;Name: {user.name}&amp;lt;/h1&amp;gt;
          &amp;lt;h1&amp;gt;Age: {user.age}&amp;lt;/h1&amp;gt;
          &amp;lt;button
          onClick={() =&amp;gt; handleDeleteUser(user.name + user.age)}
          &amp;gt;
            X
          &amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
      );
    })}
    &amp;lt;/div&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  End
&lt;/h3&gt;

&lt;p&gt;Thanks for reading this article. - Antoine&lt;/p&gt;

&lt;p&gt;Here’s a &lt;a href="https://github.com/SeyBoo/crud-firebase"&gt;link to the Github application&lt;/a&gt;&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to make a React Application support more than One language.</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Fri, 18 Nov 2022 10:17:45 +0000</pubDate>
      <link>https://dev.to/seyboo/how-to-make-a-react-application-support-more-than-one-language-5alg</link>
      <guid>https://dev.to/seyboo/how-to-make-a-react-application-support-more-than-one-language-5alg</guid>
      <description>&lt;h2&gt;
  
  
  What are we learning ?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;How to Create a Context.&lt;/li&gt;
&lt;li&gt;Import and use our Hook.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  A bit of context
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What's an hook ?
&lt;/h4&gt;

&lt;p&gt;Hooks are functions that let you add into the React State and lifecycle.&lt;/p&gt;

&lt;h4&gt;
  
  
  What's a context ?
&lt;/h4&gt;

&lt;p&gt;Context provides a way to pass data through the component without having to pass props.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create our Context.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oo0pc15M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl7et8q53vkilr874pfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oo0pc15M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl7et8q53vkilr874pfa.png" alt="Image description" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We create our context with the createContext function. We pass an Empty Object {} (we don't want to define any default value). Then add an empty Interface (We will use it later to enforce our typing).&lt;/p&gt;

&lt;p&gt;Then we create a Function Provider to wrap our application with. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Function Component&lt;/code&gt; =&amp;gt; Type our function to be a React Component.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Props With Children&lt;/code&gt; =&amp;gt; Type our application to contain a children props.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Children&lt;/code&gt; =&amp;gt; Is the react component that will get rendered in our component. In this case our Application.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;value={{}}&lt;/code&gt; =&amp;gt; There we will pass the function/data we want to share to the other components. (The type of value is our TranslationContextActions interface).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yiK-iDpl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qot4gb17d3hmvv2y0y5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yiK-iDpl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qot4gb17d3hmvv2y0y5.png" alt="Image description" width="800" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create our translation files
&lt;/h3&gt;

&lt;p&gt;We are gonna create a folder named Translation with 2 different files within. French and English. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XiTYNwk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxtm8c44z6aqwbh6x6b7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XiTYNwk4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxtm8c44z6aqwbh6x6b7.png" alt="Image description" width="297" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once those files created we create another file name language.interface.ts . This file will ensure that both files contain the same Data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NHv4qWR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w38swtgjvzumxibuernr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NHv4qWR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w38swtgjvzumxibuernr.png" alt="Image description" width="457" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we populate our French.ts file with&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y7JaxjDX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1txkw0knaolqlk42vvl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y7JaxjDX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1txkw0knaolqlk42vvl.png" alt="Image description" width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And our English.ts file with&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Lxg4Kl5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udc4qeqeavinenaqe21l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Lxg4Kl5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udc4qeqeavinenaqe21l.png" alt="Image description" width="800" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that our data is type safe, and created we can begin the importation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Import the right Language
&lt;/h3&gt;

&lt;p&gt;To do so, we start by setting a type of the supported Language by our application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0n9iqzk8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhqxaxzdr1yv6rqrnmlm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0n9iqzk8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhqxaxzdr1yv6rqrnmlm.png" alt="Image description" width="725" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we create a function that get the navigator language of our user. Then, with an if statement, we return the correct value. Without forgetting the default one, English in our case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cZbHE_YG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzya36eg9d9yb0vcag98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cZbHE_YG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzya36eg9d9yb0vcag98.png" alt="Image description" width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our function name is self explained and everything got a correct type so we can move on to the importation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--URBkujAh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7rwmr0h5e7uuvyflqt9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--URBkujAh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7rwmr0h5e7uuvyflqt9.png" alt="Image description" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nothing special on this function, we import our file based on the given variable. The name also makes sense, and we gave a type to the Function and our Variable. Now let's import this file when the component renders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BKrDf0bP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eoyy8088424c0jtukiou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BKrDf0bP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eoyy8088424c0jtukiou.png" alt="Image description" width="800" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We check if our &lt;code&gt;translationData&lt;/code&gt; is undefined cause we don't want to import it twice. Then we call our fonctions and use &lt;code&gt;setTranslationData&lt;/code&gt; on the imported file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why making so much different function ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm a strong believer that a function should serve one action. If it does more then one thing, slice it.&lt;/p&gt;

&lt;p&gt;But why ? &lt;/p&gt;

&lt;p&gt;Small well named function are self explanatory which make them easy to understand, to maintain and are way more readable. &lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a hook
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SBsQJX4B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3wd6jvae2xykg7whsdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SBsQJX4B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3wd6jvae2xykg7whsdg.png" alt="Image description" width="666" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First we need to type our &lt;code&gt;ContextActions&lt;/code&gt;. So let's add an action named &lt;code&gt;translationData&lt;/code&gt; with the same type of our useState.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XTqN6KkR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88dkhcbpao9wrdjaklh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XTqN6KkR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88dkhcbpao9wrdjaklh9.png" alt="Image description" width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we add the value &lt;code&gt;translationData&lt;/code&gt; of our useState to value. We can now access &lt;code&gt;translationData&lt;/code&gt; through our application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Our hook&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dUczMzT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzeogg1jwe3ppiyrceum.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dUczMzT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzeogg1jwe3ppiyrceum.png" alt="Image description" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We make sure that our hook is placed in a TranslationProvider and we return our &lt;code&gt;translationData&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using our Translation Hook
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZA3D8ul0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhwj4jbcjjpi0xzlh2m6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZA3D8ul0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhwj4jbcjjpi0xzlh2m6.png" alt="Image description" width="554" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's place the Application between our TranslationProvider.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lhuOVG4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7c35d0dw6hufbl6pjtp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lhuOVG4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7c35d0dw6hufbl6pjtp.png" alt="Image description" width="511" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And boom ! We can then use our hook !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QCKwllhG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8q0jxvxds4mxkc7wab2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QCKwllhG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8q0jxvxds4mxkc7wab2d.png" alt="Image description" width="800" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2QYerb8V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ju1xk058cim2leh9j9c1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2QYerb8V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ju1xk058cim2leh9j9c1.png" alt="Image description" width="800" height="751"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's a link to the Github Repo : &lt;a href="https://github.com/SeyBoo/translation-hook"&gt;https://github.com/SeyBoo/translation-hook&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A Beginner guide to structuring your Python Projects</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Tue, 01 Nov 2022 10:46:34 +0000</pubDate>
      <link>https://dev.to/seyboo/a-beginner-guide-to-structuring-your-python-projects-576g</link>
      <guid>https://dev.to/seyboo/a-beginner-guide-to-structuring-your-python-projects-576g</guid>
      <description>&lt;h2&gt;
  
  
  A Beginner guide to structuring your Python Projects
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Packages and Environment &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Linting and code style &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get rid of the old make file&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Packages and Environment
&lt;/h3&gt;

&lt;h5&gt;
  
  
  The old way of doing things
&lt;/h5&gt;

&lt;p&gt;Back then the way to deal with packages in python was to create a new environment with Conda or the included venv and active it, then installing you're packages with pip then freezing them into a requirements.txt so that you're team could install the same deps as you do.&lt;/p&gt;

&lt;h5&gt;
  
  
  An easier way to approach this problem
&lt;/h5&gt;

&lt;p&gt;With Pipenv you no longer need to use pip and virtualenv separately. They work together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simply install it with pip&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install --user pipenv&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then active your environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv shell&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And install whatever you want !&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv install request&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Linting and code style
&lt;/h3&gt;

&lt;p&gt;I personally picked pylint cause it felt like it's the more easy and intuitives to use and seem to contain all the use full features and is compatibility with code editor.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv install pylint&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Get rid of the old make file
&lt;/h3&gt;

&lt;p&gt;Pipenv give us the possibility to run scripts easily !&lt;/p&gt;

&lt;p&gt;Simply give create a Script inside the Scripts section of you're Pipfile&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i9kIfcHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iujnefweakbndati0hoa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i9kIfcHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iujnefweakbndati0hoa.png" alt="Image description" width="800" height="701"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now i can run &lt;code&gt;pipenv run lint&lt;/code&gt; to lint my files&lt;br&gt;
or &lt;br&gt;
&lt;code&gt;pipenv run start&lt;/code&gt; to start my Django Project !&lt;/p&gt;

&lt;p&gt;Thanks for taking time to read this article i hope it help you ! &lt;/p&gt;

&lt;p&gt;If you have any suggestion or way i can improve it i'll be happy to ear them !&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to successfully start with Nest.js and Postgres</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Tue, 09 Aug 2022 18:50:57 +0000</pubDate>
      <link>https://dev.to/seyboo/how-to-successfully-start-with-nestjs-and-postgres-34n0</link>
      <guid>https://dev.to/seyboo/how-to-successfully-start-with-nestjs-and-postgres-34n0</guid>
      <description>&lt;p&gt;In this tutorial will see how to install, configure postgres with Nest.js typeorm.&lt;/p&gt;

&lt;h1&gt;
  
  
  Postgres
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Let's install Postgres
&lt;/h2&gt;

&lt;p&gt;Install &lt;a href="https://www.postgresql.org/download/" rel="noopener noreferrer"&gt;postgres on the official website&lt;/a&gt;. I'll recommend installing it on the official website rather then using homebrew cause it could lead to some trouble later&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Basic of Postgres
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Start Postgres app and start server&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg96a6kzqo5elowgn24vk.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%2Fg96a6kzqo5elowgn24vk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your terminal and add psql to your path.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;export PATH="/Applications/Postgres.app/Contents/Versions/9.5/bin:$PATH"&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%2Feaszqulwxgbu9a18cmv1.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%2Feaszqulwxgbu9a18cmv1.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Command
&lt;/h3&gt;

&lt;p&gt;To open psql terminal : &lt;code&gt;psql postgres&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw75e73eg7kgi8fi0eje.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%2Ftw75e73eg7kgi8fi0eje.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;List all Database with &lt;code&gt;\l&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwdhe8naw1762dus5fne.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%2Fhwdhe8naw1762dus5fne.png" alt="Image description"&gt;&lt;/a&gt;``&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Database with &lt;code&gt;CREATE DATABASE name;&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfrbe8w7mjw9oob9wrcc.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%2Fxfrbe8w7mjw9oob9wrcc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to a Database with &lt;code&gt;\c name&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuacd5467nk2382y5x6zq.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%2Fuacd5467nk2382y5x6zq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Exit postgres with &lt;code&gt;\q&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiwog92guqfwzf10dxyz0.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%2Fiwog92guqfwzf10dxyz0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Nest
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Setup Nest Project
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;npm i -g @nest/cli&lt;/code&gt;&lt;br&gt;
&lt;code&gt;nest new project-name&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create .env file for the config of our Database
&lt;/h2&gt;

&lt;p&gt;Create a .env file containing the PORT, USERNAME, DATABASE NAME, URL ...&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PORT=4242&lt;br&gt;
POSTGRES_PORT=5432&lt;br&gt;
POSTGRES_USER=postgres&lt;br&gt;
POSTGRES_DB=nest&lt;br&gt;
POSTGRES_HOST=localhost&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure App Module
&lt;/h2&gt;

&lt;p&gt;Inside your app module add the .env config file :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import { ConfigModule } from '@nestjs/config';&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ConfigModule.forRoot({ envFilePath: ['.env'] })&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure and install TypeOrm
&lt;/h2&gt;

&lt;p&gt;Install Typeorm postgres for Next :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install --save @nestjs/typeorm typeorm postgres&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then import our configuration inside the app.module :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import { TypeOrmModule } from '@nestjs/typeorm'&lt;/code&gt;&lt;br&gt;
&lt;code&gt;TypeOrmModule.forRoot({&lt;br&gt;
      type: 'postgres',&lt;br&gt;
      host: 'process.env.POSTGRES_HOST,&lt;br&gt;
      port: parseInt(process.env.POSTGRES_PORT),&lt;br&gt;
      username: process.env.POSTGRES_USER,&lt;br&gt;
      database: process.env.POSTGRES_DB,&lt;br&gt;
      entities: [],&lt;br&gt;
      synchronize: true,&lt;br&gt;
      logging: true,&lt;br&gt;
      autoLoadEntities: true,&lt;br&gt;
    })&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Little explanation &lt;br&gt;
&lt;code&gt;synchronize: true,&lt;br&gt;
 autoLoadEntities: true,&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Allow schema to be automatically with Database.&lt;/p&gt;

&lt;p&gt;Little explanation &lt;br&gt;
&lt;code&gt;logging: true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Log all the interaction with the Database&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Entity
&lt;/h2&gt;

&lt;p&gt;Create a user.entity.ts file inside an entities folder.  &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%2Fbeuwkhj01gwzu4jse9i2.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%2Fbeuwkhj01gwzu4jse9i2.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
I won't go into detail about this code cause you can find good documentation on Typeorm website.&lt;/p&gt;

&lt;p&gt;`import {&lt;br&gt;
  Entity,&lt;br&gt;
  Column,&lt;br&gt;
  PrimaryGeneratedColumn,&lt;br&gt;
  CreateDateColumn,&lt;br&gt;
} from 'typeorm';&lt;/p&gt;

&lt;p&gt;@Entity()&lt;br&gt;
export class User {&lt;br&gt;
  @PrimaryGeneratedColumn()&lt;br&gt;
  id: number;&lt;/p&gt;

&lt;p&gt;@Column()&lt;br&gt;
  username: string;&lt;/p&gt;

&lt;p&gt;@Column()&lt;br&gt;
  email: string;&lt;/p&gt;

&lt;p&gt;@Column()&lt;br&gt;
  password: string;&lt;/p&gt;

&lt;p&gt;@Column({&lt;br&gt;
    nullable: true,&lt;br&gt;
    unique: true,&lt;br&gt;
  })&lt;br&gt;
  access_token: string;&lt;/p&gt;

&lt;p&gt;@CreateDateColumn()&lt;br&gt;
  created_at: Date;&lt;br&gt;
}`&lt;/p&gt;

&lt;p&gt;Then inside your app.module add &lt;code&gt;entities: [User]&lt;/code&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>postgres</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to learn React Native and Firebase in a month.</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Fri, 17 Jun 2022 06:51:34 +0000</pubDate>
      <link>https://dev.to/seyboo/how-to-learn-react-native-and-firebase-in-a-month-1hp0</link>
      <guid>https://dev.to/seyboo/how-to-learn-react-native-and-firebase-in-a-month-1hp0</guid>
      <description>&lt;h2&gt;
  
  
  How to learn React Native and Firebase in a month.
&lt;/h2&gt;

&lt;p&gt;During the month of April i quitted my job and started to work on a personal project, the first that i faced problem is that i had no prior experience with building a Mobile Application so i had to learn everything from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  What did i had to learn ?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;React Native&lt;/li&gt;
&lt;li&gt;Firebase&lt;/li&gt;
&lt;li&gt;Redux&lt;/li&gt;
&lt;li&gt;Native Base&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  My learning journey...
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Week 1
&lt;/h4&gt;

&lt;p&gt;The first days i spent the majority of my time reading the docs about React Native and Native Base (if you don't know about Native base it's a component library, so i don't had to focus too much on Design)&lt;/p&gt;

&lt;p&gt;After understanding the core concept about this Framework i have watched a video about someone creating a todo application with it. And i decided to clone the code base and try to understand the code, after spending an hour or so figuring it out the logic of the code....&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/k2h7usLLBhY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I have decided to build a small project i just integrated a small design at first with Native Base and React Native then i decided to challenge my self a bit and i stated to integrate a &lt;a href="https://api.adviceslip.com/advice"&gt;small api&lt;/a&gt; the goal was to know the basic.&lt;/p&gt;

&lt;p&gt;Understanding the basic i started to go all in for my application i was full of hope that i could start building it with my new knowledge that i just acquired, that's what i did i set my project my &lt;a href="https://github.com/SeyBoo/simplyfile-app"&gt;Github Repo&lt;/a&gt; and i started to integrate all the basic design that i could.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mUVqoUDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bchiflnymqvkveenozrl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mUVqoUDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bchiflnymqvkveenozrl.gif" alt="Image description" width="828" height="1792"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Week 2
&lt;/h4&gt;

&lt;p&gt;The next week it was time to get into the core of the application, the user account so it was time to learn Firebase, like always i have setup the project and i have read the doc to see how should i use it and how, and i started to register and sign in my users, the only problem was that i didn't know how to show/hide the authentification screen based on if the users was logged in or no, and after doing some research Redux was the solution for me, well not at 100% i still had to spend a couple of days trying to understand how it work, and how it work with Typescript and after giving all of my sanity into crash course, the doc and Stackoverflow i had a perfectly working authentification system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PnPxVOBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media2.giphy.com/media/cn6mz2xAoi22dbRezo/giphy.gif%3Fcid%3D790b76112d357107ef7eea8edcf5271ec8dafe13b6c74ba0%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PnPxVOBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media2.giphy.com/media/cn6mz2xAoi22dbRezo/giphy.gif%3Fcid%3D790b76112d357107ef7eea8edcf5271ec8dafe13b6c74ba0%26rid%3Dgiphy.gif%26ct%3Dg" alt="Image description" width="222" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Week 3
&lt;/h4&gt;

&lt;p&gt;I was so happy about the current progress of the application but it still wasn't finished i needed to continue working on it, so i finished my work concerning the user account and i create a personal info page where users can change their email, password, name, phone number and delete their account, i also added Two Factor Auth with phone number which took me a lot of time to research and build.&lt;/p&gt;

&lt;h4&gt;
  
  
  Week 4
&lt;/h4&gt;

&lt;p&gt;During the last week i already had a good understanding on both React Native and Firebase i was really confident about those tools, but i wanted to go further and i started to implement a bottom sheet that will allow me to take picture/ upload picture to Firestore and map those in the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resume :
&lt;/h3&gt;

&lt;p&gt;If you wanna learn something, know why you are doing it and every-time you wanna quit think about why you're doing it, it's the easiest way to stay consistency knowing why. Then improve, challenge yourself do something harder and harder everyday when you pick your project you say to yourself i don't know how to do anything about this project but i will learn to finish it.&lt;/p&gt;

&lt;h4&gt;
  
  
  But what's the project about ?
&lt;/h4&gt;

&lt;p&gt;Simplyfile is a document managing app built for Web and Mobile so that you can access them from everywhere, Simplyfile also make the sorting process very easy thanks to some I.A.&lt;/p&gt;

&lt;p&gt;You can support the project by giving a star to the &lt;a href="https://github.com/SeyBoo/simplyfile-app"&gt;Github Repo.&lt;/a&gt; Or feel free to give any feedback about the project or the article. &lt;/p&gt;

&lt;p&gt;Thanks for reading -&lt;/p&gt;

&lt;p&gt;Chevalier Antoine&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>beginners</category>
      <category>firebase</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How to become a Mobile Developper in a month.</title>
      <dc:creator>Antoine CHEVALIER</dc:creator>
      <pubDate>Fri, 17 Jun 2022 06:50:02 +0000</pubDate>
      <link>https://dev.to/seyboo/how-to-become-a-fullstack-mobile-developper-in-a-month-58e0</link>
      <guid>https://dev.to/seyboo/how-to-become-a-fullstack-mobile-developper-in-a-month-58e0</guid>
      <description>&lt;h2&gt;
  
  
  How to become a Mobile Developper in a month.
&lt;/h2&gt;

&lt;p&gt;During April i quitted my job and started to work on a personal project. The first problem that i faced was that i had no experience on how to build a Mobile Application... So i had to learn everything from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did i had to learn ?
&lt;/h2&gt;

&lt;p&gt;React Native&lt;/p&gt;

&lt;p&gt;Firebase&lt;/p&gt;

&lt;p&gt;Redux&lt;/p&gt;

&lt;p&gt;Native Base&lt;/p&gt;

&lt;p&gt;My learning journey...&lt;/p&gt;

&lt;h3&gt;
  
  
  Week 1
&lt;/h3&gt;

&lt;p&gt;The first days, i spent the majority of my time reading the docs about React Native and Native Base. (if you don't know about Native base it's a component library, so i don't had to focus too much on Design)&lt;/p&gt;

&lt;p&gt;After understanding the big picture of it, i started to watch a guy creating a todo application with it. And i decided to clone the code  and try to understand it, after spending an hour or so figuring out the logic of the code....&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/k2h7usLLBhY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I decided to build a small project, integrating a small design with Native Base and React Native. After doing so i wanted to challenge my self a bit and i started to play with a &lt;a href="https://api.adviceslip.com/advice"&gt;small api&lt;/a&gt;, the goal was to make basic requests.&lt;/p&gt;

&lt;p&gt;Understanding the request, i wanted to go all in, i was full of hope that i could build it with my new knowledge. So that's what i did, creating a repo on Github and integrating all the design of my application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mUVqoUDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bchiflnymqvkveenozrl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mUVqoUDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bchiflnymqvkveenozrl.gif" alt="Image description" width="828" height="1792"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Week 2
&lt;/h3&gt;

&lt;p&gt;The next week it was time to get into the core of the application, the user account so it was time to learn Firebase. Like always i setup the project and read the doc to see how can i use it . So i started to register and sign in my users. The only problem was that i didn't knew how to display a different type of navigation if a user get logged in. After doing some research it seemed that Redux was the solution for me. Well not at 100% i still had to spend a couple of days trying to understand how it work, and how to use it with Typescript. After spending all the rest of my sanity into some crash course, Stackoverflow and the doc... I had a working authentification system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PnPxVOBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media2.giphy.com/media/cn6mz2xAoi22dbRezo/giphy.gif%3Fcid%3D790b76112d357107ef7eea8edcf5271ec8dafe13b6c74ba0%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PnPxVOBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media2.giphy.com/media/cn6mz2xAoi22dbRezo/giphy.gif%3Fcid%3D790b76112d357107ef7eea8edcf5271ec8dafe13b6c74ba0%26rid%3Dgiphy.gif%26ct%3Dg" alt="Image description" width="222" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Week 3
&lt;/h3&gt;

&lt;p&gt;I was so happy about the current progress of the application. But it still wasn't done i was in the need to continue working on it. So i finished my work on the user account. And i created a personal info page where users can change their infos and delete their account. I also decided to add a Two Factor Auth with phone number which took me a lot of time to research and build.&lt;/p&gt;

&lt;h3&gt;
  
  
  Week 4
&lt;/h3&gt;

&lt;p&gt;During the last week i already had a good understanding of both React Native and Firebase. I was confident about those tools, but i wanted to go further. So i started to put in place a bottom sheet that will allow me to take picture/ upload picture to Firestore.  To conclude i mapped those pictures in the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resume
&lt;/h3&gt;

&lt;p&gt;If you wanna learn something, know why you are doing it and every-time you wanna quit think about why you're doing it. Doing so is the easiest way to stay consistency, knowing why. Then improve, challenge yourself, do something harder and harder everyday. When you picking your project you need to say to yourself i don't know how to build any of that but i will learn it.&lt;/p&gt;

&lt;h3&gt;
  
  
  But what's the project about ?
&lt;/h3&gt;

&lt;p&gt;Simplyfile is a document managing app built for Web and Mobile. Making you capable of accessing them from everywhere. Simplyfile also make the sorting process very easy thanks to some A.I.&lt;/p&gt;

&lt;p&gt;You can support the project by giving a star to the Github Repo. Or feel free to give any feedback about the project or the article.&lt;/p&gt;

&lt;p&gt;Thanks for reading -&lt;/p&gt;

&lt;p&gt;Chevalier Antoine&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
