<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Sanchez on Medium]]></title>
        <description><![CDATA[Stories by Michael Sanchez on Medium]]></description>
        <link>https://medium.com/@michaelsanchez8815?source=rss-c30ca60e3b10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KojmraZG1Hmo25XS</url>
            <title>Stories by Michael Sanchez on Medium</title>
            <link>https://medium.com/@michaelsanchez8815?source=rss-c30ca60e3b10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:00:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michaelsanchez8815/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Impostor Syndrome: Why it’s Okay to Have Fears but How to Combat Them]]></title>
            <link>https://medium.com/@michaelsanchez8815/impostor-syndrome-why-its-okay-to-have-fears-but-how-to-combat-them-4e3d24bef6ce?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e3d24bef6ce</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[imposter-syndrome]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Tue, 31 Jan 2023 20:34:21 GMT</pubDate>
            <atom:updated>2023-01-31T20:34:21.306Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Mg94HtKttsa2LJnM" /><figcaption>Photo by <a href="https://unsplash.com/es/@trastornada13?utm_source=medium&amp;utm_medium=referral">Jaqueline Fritz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Impostor syndrome is a phenomenon that affects millions of people across the world. The feeling of inadequacy and self-doubt arises when one believes they are not as competent as others perceive them to be. Despite achieving success and recognition in their careers or personal lives, those with impostor syndrome often feel like frauds and worry that their achievements result from luck or deception rather than their abilities.</p><p>While impostor syndrome can be discouraging and detrimental to one’s self-esteem, it is essential to understand that this feeling is normal and expected, particularly among high-achievers. Studies show that 70% of people will experience impostor syndrome at some point.</p><p>However, it is not enough to acknowledge the existence of impostor syndrome. It is equally important to know how to combat it. Here are some tips to help overcome impostor syndrome:</p><ol><li>Acknowledge your accomplishments. Make a list of your achievements, no matter how small they may seem. This will help you recognize your abilities and achievements rather than attributing your success to luck or deceit.</li><li>Talk to others. Share your feelings of inadequacy with a trusted friend or mentor. Sometimes just speaking about your fears can make a big difference in how you feel. Talking to someone who has experienced impostor syndrome can also help find ways to cope with it.</li><li>Focus on your strengths. Instead of dwelling on your weaknesses, focus on your strengths and the things you excel at. This will help you build confidence and recognize your worth.</li><li>Practice self-compassion. Treat yourself with the kindness and understanding you would offer a friend. Recognize that everyone makes mistakes and experiences self-doubt and that it is okay to be human.</li><li>Celebrate small victories. Take time to acknowledge and celebrate your successes, no matter how small they may seem. This will help you build a sense of accomplishment and increase your self-esteem.</li><li>Remember why you started. When you feel overwhelmed or discouraged, remind yourself of your goals and why you started your journey. This will help you keep perspective and maintain motivation.</li><li>Surround yourself with positive influences. Seek mentors, friends, and family members who support and encourage you. Being around people who believe in you can also help you believe in yourself.</li></ol><p>In conclusion, it is essential to remember that everyone experiences impostor syndrome, even the most successful people. What sets them apart is their ability to overcome these feelings and recognize their worth. By acknowledging your accomplishments, talking to others, focusing on your strengths, and practicing self-compassion, you can overcome impostor syndrome and build confidence in your abilities. Ultimately, it is not about never having fears but what you do with those fears that define your character.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e3d24bef6ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why a Mentor-Led Coding Bootcamp is Better Than a University]]></title>
            <link>https://medium.com/@michaelsanchez8815/why-a-mentor-led-coding-bootcamp-is-better-than-a-university-bf88242a786d?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf88242a786d</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Fri, 09 Dec 2022 05:41:52 GMT</pubDate>
            <atom:updated>2022-12-09T05:41:52.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EZVP4O1Q6k2uQB2w" /><figcaption>Photo by <a href="https://unsplash.com/@disruptxn?utm_source=medium&amp;utm_medium=referral">Desola Lanre-Ologun</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Are you considering a career in technology but unsure about the best way to gain the necessary skills? While a university education can be an excellent option for some, a mentor-led coding bootcamp may be better for those looking to break into the tech industry.</p><p>First, it’s essential to understand what a coding bootcamp is. A coding bootcamp is a short-term, intensive program that teaches individuals the skills they need to become a software developers. These programs typically last from a few weeks to several months and focus on teaching practical, real-world skills in high demand in the tech industry.</p><p>In contrast, a university education can take several years to complete and often focuses on theoretical concepts rather than practical skills. While a university degree can be valuable, it may only sometimes provide the specific skills and experience needed to start a career in tech.</p><p>One of the key advantages of a mentor-led coding bootcamp is the personalized attention and support that students receive. Unlike a large university class where students may struggle to get the help they need, a coding bootcamp typically has a low student-to-mentor ratio, which means that students receive plenty of one-on-one time with their mentors. This can be especially helpful for those new to coding who need extra support to understand the material.</p><p>Another advantage of a coding bootcamp is the focus on real-world, practical skills. Unlike a university education, which can be more theoretical in nature, a coding bootcamp is designed to teach students the specific skills in demand in the tech industry. This means that students who complete a coding bootcamp will be well-prepared to enter the workforce and start their careers in tech.</p><p>In addition to the personalized support and focus on practical skills, a mentor-led coding bootcamp can be more flexible and affordable than a university education.</p><p>Coding bootcamps can be completed in a much shorter timeframe than a university degree so that students can get started on their careers more quickly. And because they are often more affordable than a university education, coding bootcamps can be an excellent option for those looking to gain the necessary skills without taking on a large debt.</p><p>Another advantage of a coding bootcamp is the networking opportunities it provides. Many coding bootcamps have partnerships with top tech companies so that students can connect with potential employers and internships during their time in the program. This can be a great way to build a professional network and get a foot in the tech industry.</p><p>Overall, a mentor-led coding bootcamp can be a better option than a university education for those looking to break into the tech industry. With personalized support, a focus on practical skills, flexibility, affordability, and networking opportunities, a coding bootcamp can provide the specific skills and experience needed to start a successful career in tech.</p><p>A great option to look at is <a href="https://devslopes.com/">Devslopes</a>! Let me know what you think!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf88242a786d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Write Serverless Functions With Netlify]]></title>
            <link>https://medium.com/@michaelsanchez8815/how-to-write-serverless-functions-with-netlify-60ff4fa162c0?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/60ff4fa162c0</guid>
            <category><![CDATA[convertkit]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[devslopes]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[netlify]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Sat, 18 Jun 2022 04:56:10 GMT</pubDate>
            <atom:updated>2022-06-18T05:00:51.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jv0FEjKevzJ8CTFH" /><figcaption>Photo by <a href="https://unsplash.com/@clark_fransa?utm_source=medium&amp;utm_medium=referral">Arnold Francisca</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I read the phrase <em>serverless functions</em> I was confused. I have been learning back-end/server with ExpressJS and MongoDB for the last couple of months. So when I was assigned the project of making a website that was ‘serverless’, I definitely had to research to understand!</p><p>Serverless functions are pieces of logic that are stateless (do not hold data), are instantly used and destroyed, and are triggered by conditions. To put it in laymen&#39;s terms, functions would act as API endpoints for the front-end code to call asynchronously. The functions created would be <em>served </em>by the website hosting the code, for example, <a href="http://www.netlify.com/">Netlify</a>. In other words, it <strong>SIMPLIFIES</strong> the back-end/server and attaches itself to wherever the front-end website is being hosted. <a href="https://sanchez-serverless-function.netlify.app/">For example, I created this signup for an email newsletter website with react</a>. Knowing I was going to host the front-end code with Netlify, I then decided to develop <a href="https://www.netlify.com/products/functions/?utm_source=google&amp;utm_term=&amp;utm_campaign=DSA-Nonbrand-MaxC-US&amp;utm_medium=ppc&amp;hsa_acc=3888979506&amp;hsa_cam=15837178031&amp;hsa_grp=127204934570&amp;hsa_ad=573697037989&amp;hsa_src=g&amp;hsa_tgt=dsa-42742491733&amp;hsa_kw=&amp;hsa_mt=&amp;hsa_net=adwords&amp;hsa_ver=3&amp;gclid=Cj0KCQjwzLCVBhD3ARIsAPKYTcSyRR2PvqlBePMan6YFNf2Y5FYdjKNRL5DktFfPQwnMIYDjZhjZG-IaAuCtEALw_wcB">Netlify Serverless Functions</a> to host my ‘backend’ logic of the website. Here is the <a href="https://sanchez-serverless-function.netlify.app/">website </a>and <a href="https://github.com/mikesz88/subscriber_form_with_serverless_function">GitHub </a>to see how I made it work. Now I am going to explain how to create a serverless function with Netlify.</p><p>If you have not already, go ahead and create an account with Netlify. I did my code in ReactJs, so at the top level of your folder directory you must create a folder called, “functions”. The name “functions” is the default of Netlify, but you can name it whatever you want as long as you tell Netlify to look for that folder you chose to name it. in the functions folder, you need to create a JavaScript file that exports a <em>HANDLER </em>function like below:</p><pre>exports.handler = (event, context, callback) =&gt; {<br> return callback(null{<br>   statusCode: 200,<br>   body: JSON.stringify({message: &#39;awesome sauce&#39;}) <br> }) <br>}</pre><p>The event object would be something like this that <a href="https://docs.netlify.com/functions/build-with-javascript/">NetlifyDocs</a> explains better:</p><pre>{<br>  &quot;path&quot;: &quot;Path parameter (original URL encoding)&quot;,<br>  &quot;httpMethod&quot;: &quot;Incoming request’s method name&quot;,<br>  &quot;headers&quot;: {Incoming request headers},<br>  &quot;queryStringParameters&quot;: {Query string parameters},<br>  &quot;body&quot;: &quot;A JSON string of the request payload&quot;,<br>  &quot;isBase64Encoded&quot;: &quot;A boolean flag to indicate if the applicable request payload is Base64-encoded&quot;<br>}</pre><p><a href="https://docs.netlify.com/functions/build-with-javascript/">Netlify Docs</a> goes into much more detail about the event, context, and callback parameters, but since we are using this as an asynchronous function, it would be written slightly differently than above:</p><pre>exports.handler = async(event, context) =&gt; {<br> return {<br>  statusCode: 200,<br>  body: JSON.stringify({message: &#39;awesome sauce&#39;}) <br> }<br>}</pre><p>To take this a step further, I did not even use context in any of my functions. Context is important for identifying user information, but in my case, I did not need it for the survey I was making. So I made it even simpler:</p><pre>exports.handler = async (event) =&gt; {<br> return {<br>  statusCode: 200,<br>  body: JSON.stringify({message: &#39;awesome sauce&#39;}) <br> }<br>}</pre><p>This is a great start! Before we go further in the project I am talking about only a few functions that were created, it is important to talk about how the files are named. I named my file where I stored this code ‘subscribe.js’ as my website is based on subscribing to my email newsletter. They go into more detail <a href="https://docs.netlify.com/functions/build-with-javascript/">here</a>, but essentially the name of the file would be the name of the endpoint that Netlify is going to name for API purposes.</p><p>This is all great and dandy! However, when I tested the code it did not work… I learned that Netlify has a command-line interface to use many of the Netlify features locally on your computer as you code and test. So if you have not already, install this code below:</p><pre>npm install -g netlify-cli</pre><p>This next step is important because tells Netlify where to look for the serverless functions. Create a ‘Netlify.toml’ file in the top level of your architecture and make sure you have something like this:</p><pre>[build] <br>  functions = &quot;functions&quot; // or whatever you chose to name it</pre><p>Doing this now created an API endpoint for your serverless functions to be called on. If you created a react project, you would normally use ‘npm start’ to run a live version through a local host to test your code. However, to test your serverless functions you would want to run ‘netlify dev’ instead. This would run your React code and Netlify functions at the same time on different localHost links so it can ‘call’ the serverless functions that you wrote in the ‘function’ folder that Netlify has established as your serverless code. This next step is optional but more for cleaner syntax. The API you must use to actually call your Netlify functions would be something like this: <strong>localhost:8888/.netlify/functions/&lt;function_file_name&gt;. </strong>Adding a redirected path to something easier to write would make your code look much more readable to the next developer. In the Netlify.toml file I wrote this under the [build] code:</p><pre>[[redirects]] <br>  from = &quot;api/*&quot; <br>  to= &quot;.netlify/functions/:splat&quot; <br>  status = 200</pre><p>Now instead of using the long endpoint, I would use something like this: <strong>localhost:8888/api/&lt;function_file_name&gt;.</strong> NOW THAT IS MUCH EASIER TO USE!</p><p>The next step is we are going to write a new file in the function folder called ‘formattedReturn’. This would simplify our return data as it can get very tedious to write JSON.stringify() every time we need to return it as we did earlier.</p><pre>const formattedReturn = (statusCode, body) =&gt; {<br>  return {<br>    statusCode,<br>    body: JSON.stringify(body); <br>  }<br>}</pre><p>So now my exports.handler function would look something like this:</p><pre>exports.handler = async(event, context) =&gt; {<br> return formattedReturn(200, {message: &#39;Awesome Sauce&#39;}); <br>}</pre><p>Ok so now our code is implemented correctly! All I have to do now is create the remaining files with different file names with the same event handlers and then implement the code needed for my serverless function. Well in my situation, all my serverless functions are about creating a subscriber, finding a subscriber, and deleting a subscriber. They all have different CRUD operations within the same category. So I am going to create conditional statements when calling my subscriber function based on what CRUD is being used. Look below what I chose to do:</p><pre>const formattedReturn = require(&#39;./formattedReturn&#39;);<br>const findSubscriber = require(&#39;./findSubscriber&#39;);<br>const createSubscriber = require(&#39;./createSubscriber&#39;);<br>const find = require(&#39;./find&#39;); </pre><pre>exports.handler = async (event) =&gt; {<br>  if (event.httpMethod === &#39;GET&#39;) {<br>    return await findSubscriber(event);  <br>  } else if (event.httpMethod === &#39;POST&#39;) {<br>    return await createSubscriber(event);<br>  } else if (event.httpMethod === &#39;PUT&#39;) {<br>    return await find(event);<br>  } else {<br>    return formattedReturn(405, {});<br>  }<br>}</pre><p>This way it is a lot cleaner and easier to see what is happening with the logic. Each file is using my environment variables to then create an arrow function that is calling a third-party website (ConvertKit) to implement the dedicated function. You can check out this section of my code <a href="https://github.com/mikesz88/subscriber_form_with_serverless_function/tree/master/functions">here</a>!</p><p>This should give you a great idea of what are serverless functions and how they are used with Netlify. As I am learning to use them, let me know how you implemented serverless functions in your app! I would love to explore this great function ;). Thanks again for reading my article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60ff4fa162c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is the Back-End in the M.E.R.N. Stack (Express and CRUD operations)?]]></title>
            <link>https://medium.com/@michaelsanchez8815/what-is-the-back-end-in-the-m-e-r-n-stack-express-and-crud-operations-565909d3b2ad?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/565909d3b2ad</guid>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[devslopes]]></category>
            <category><![CDATA[crud]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Sat, 28 May 2022 04:59:49 GMT</pubDate>
            <atom:updated>2022-05-28T04:59:49.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Mx9QO_tYKFHv9qyA" /><figcaption>Photo by <a href="https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral">Roman Synkevych 🇺🇦</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you have been following my articles, you may know a bit about my background. If not, here is a quick recap. I tried self-teaching for about 5 months before I joined Devslopes. Nine months later I was hired with a six-figure salary and am able to work from home. I have a new daughter that is a week old. Now back to the news…</p><p>When I joined <a href="http://devslopes.com/">Devslopes</a>, I decided to learn the MERN stack. I did this because I wanted to learn how to be a full-stack developer using javascript. What is the MERN stack? MERN stands for MongoDB, Express, React, Node, after the four key technologies that make up the stack.</p><ul><li>MongoDB — NoSQL database</li><li>Express(.js) — Node.js web framework</li><li>React(.js) — a client-side JavaScript framework</li><li>Node(.js) — the premier JavaScript web server</li></ul><p>The MERN Stack is a framework that encourages developers to use the best tools for the job. It consists of four essential building blocks: a framework for defining your application, a web framework for building your application, a runtime for executing your application, and a database for persisting data. The MERN Stack is designed to be flexible so you can swap out any of the four building blocks so you can build whatever application you need, and it will run just as fast.</p><p>When we think of a website, we typically think of the user experience we have on the front end, the design, and the content. But without a doubt, the back-end is just as, if not more, important. Without a back-end framework, like the one we will be using today called Express.js, our front end would be unable to function. Today we are going to be focusing on the back-end, specifically the “CRUD” (Create, Read, Update, and Delete) operations.</p><p>The “CRUD” operations for our app are: create (create a new record), read (retrieve a record), update (update an existing record), and delete (delete a record). When we think about the “CRUD” operations, we typically think about the database, but the key thing to note is that our database doesn’t actually store the data — it just serves as a mediator. We don’t physically store any of the information of the users or their data — we just verify that the data we have matches what we are looking for.</p><p>The “CRUD” operations are executed by our Express.js server and are responsible for keeping our data in sync with our real-world data. They also make it possible for our web app to function properly even if our database is down or offline.</p><p>CRUD operations are composed of several steps: first, we want to store data somewhere. Second, we want to be able to retrieve that data for clients to use. Third, we want to make sure that the data is actually stored correctly.</p><p>When we create a new record in our database, the CRUD operations will take place and our Express server will create the record in our database. The Express server will then read the record from our database and output the data to the client. This is where our Express server comes in — it is responsible for making HTTP connections to our API, which is where our real-world data is stored. The Express server then takes the data it has retrieved from our API and passes it to the client, which is where our front end is.</p><p>When we read a record from our database, the Express server will take the data it has retrieved from the API and will pass it to the client, which is where our front end is. The client will then display the new record to the user.</p><p>Developing full-stack apps in the MERN stack is as simple as it gets, Express.js powers all of the main functions of the app including user authentication, data storage, and API requests. It also handles the routing and a lot of the logic, making it possible to keep your Express.js app small and focused on your app logic and to ensure that your app stays up-to-date.</p><p>Thanks for reading my post about CRUD operations, Express, and a little about me. Tell me your experience with Express or another javascript framework like Express? I would love to hear from you and try another one out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=565909d3b2ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Style My React App (Using Styled-Components)]]></title>
            <link>https://medium.com/@michaelsanchez8815/how-to-style-my-react-app-using-styled-components-702fef81f392?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/702fef81f392</guid>
            <category><![CDATA[styled-components]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[devslopes]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Sat, 28 May 2022 04:08:40 GMT</pubDate>
            <atom:updated>2022-05-28T04:08:40.804Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AN_MYVZmBGx_1_U_" /><figcaption>Photo by <a href="https://unsplash.com/es/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As I have progressed in my time as a developer, I have been introduced to different tools that would help me be a better developer. One of the tools I have been introduced to is styled-components. Styled-components is a library that helps you write CSS in a more concise and readable way within javascript. Styled components create custom-style encapsulated components. It allows you to define a component once, and then style it in any way you want without having to make changes in your code. Styled components use the styles as a prop pattern to pass styles down to your component in the same way you would pass other props. It is a zero-configuration CSS-in-JS solution that lets you write plain CSS that can be parsed, interpreted, and transformed into simple JavaScript objects.</p><p>Here is an example of how to use styled-components that I used in one of my projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gdhPGCeWBq8n0KyKwWs8uA.png" /></figure><p>Another part I liked especially about styled-components is that it allows you to create the same theme that can be used throughout your application. For example, you can establish your color scheme, measurements, and other style components in a single file called ‘theme.js’ and then call it as a prop in your styled component. Here is an example of how to do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*QiKc1jVHmG4SnE-fL-PVJw.png" /></figure><p>One caveat to using styled-components is that it is can feel tedious and unnecessary. However, I think it is a great way to separate your common components with the exact styles you need based on the props provided. In my opinion, this actually streamlines your process by calling the same styles over and over again using the DRY (don’t repeat yourself) principle. Another benefit of using styled-components is that you can style your web without CSS files. Build styles without classes and without hierarchy. Build web components without build tools as it uses CSS within javascript syntax.</p><p>Styled components are a better alternative than other CSS libraries in React because it is more concise, semantic, and customizable. It also provides better isolation for your components, which is beneficial for large projects where you want to separate your components from each other so that you can make changes in one place and not have to make changes in multiple places. It also provides better isolation for your components, which is beneficial for large projects where you want to separate your components from each other so that you can make changes in one place and not have to make changes in multiple places. It also allows you to build web components without using build tools, which is beneficial when using CSS within Javascript syntax.</p><p>Thank you for reading the article! I appreciate any insight you may have in your experience in using styled-components compared to other CSS libraries in React.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=702fef81f392" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NO SHORTCUTS IN LEARNING HOW TO CODE!]]></title>
            <link>https://medium.com/@michaelsanchez8815/no-shortcuts-in-learning-how-to-code-eafa1825a35?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/eafa1825a35</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[app-academy]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[devslopes]]></category>
            <category><![CDATA[code-newbie]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Thu, 14 Apr 2022 02:54:41 GMT</pubDate>
            <atom:updated>2022-04-14T02:54:41.397Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sTKJQu-ZvU_qj59v" /><figcaption>Photo by <a href="https://unsplash.com/@elisa_ventur?utm_source=medium&amp;utm_medium=referral">Elisa Ventur</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It has been 387 days. 387 days since I decided to open my computer and learn how to code. I searched for at least a week trying to decide what website I should use to learn how to code. I did not know exactly what I wanted to do with coding yet, but I felt I needed to start somewhere. I eventually settled with App Academy Open. I went through their online free curriculum and for the first couple of months, it worked quite well. I went through all the bumps and bruises and I felt I had a good handle on the basics of using Ruby language. However, I felt I could have been doing much better than what I was doing. I felt I was wasting a lot of time on learning things I could have learned if someone told me them with an explanation rather than copying certain code and hoping it would make sense.</p><blockquote>I ended up hitting a wall with App Academy Open and that is when it threw me for a loop.</blockquote><p>I nearly gave up because I felt I had no real direction on how to solve problems. I was going around in circles confusing myself and decided to give it a rest. After resting for a couple of weeks and realizing that I could not give up due to the fact that I did not want to be a teacher anymore I decided that it could have been the delivery of the instruction from App Academy Open. That is when I chose to look into freeCodeCamp. I learned the basics of HTML, CSS, and some JavaScript. I again ran into a similar problem. I had no direction. I had no guidance. True, freeCodeCamp had smaller mini-missions, but they were so isolated and the practice skills were just copying directions, it was hard to retain what I was learning with it. That is when I found <a href="http://devslopes.com/">Devslopes</a>.</p><blockquote>I found <a href="http://devslopes.com/">Devslopes </a>through a TikTok and was intrigued instantly.</blockquote><p>It was what I was looking for. It had guidance, a community of like-minded people, and mentorship all being self-paced. That last part was important for me because the only times I have been able to learn how to code have been at night after my daughters go to bed. I signed up with <a href="http://devslopes.com/">Devslopes </a>in mid-September and I am nearing the end of the program. In the time I have been with <a href="http://devslopes.com/">Devslopes</a>, I have learned HTML, CSS, JavaScript, Node, React, Express, Mongo, and so much more. It is unbelievable how much I have learned thus far! All while I am teaching full time, have two daughters, and another one due in May.</p><p>When I was about three months into my journey with <a href="http://devslopes.com/">Devslopes </a>and started learning React, I ended up getting contracted to be a part-time developer! Now I have been with the company for about three months and I am officially a paid developer! It has been such a fantastic experience! I have learned so much since September, it is crazy to think that the goal I set in March of last year is finally coming to fruition!</p><p>Now that the school is starting to wind down, decisions, baby, and more decisions are starting to come into play. Should I teach another year? Should I transition into a full-time developer? Can I work remotely? Can I be a freelancer? Project Management? Many of these questions will be answered in the next few months and I can’t wait.</p><p>The overall point of this reflection of my journey is for those who are just starting or are hitting a wall. I know how you are feeling. It IS a struggle. There will be nights that will drive you crazy. BUT THOSE NIGHTS ARE WHAT MAKE IT WORTH IT! THERE ARE NO SHORTCUTS IF THIS IS WHAT YOU WANT AS A CAREER! Take the time necessary to learn. Some are able to do it in three months. Some take 6 months. It took me over a year overall, but only seven months with the right program and guidance. With that said, do not hesitate to reach out and ask questions. Find that community to help support you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eafa1825a35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is an API and why do I need to know it for Web Development?]]></title>
            <link>https://medium.com/@michaelsanchez8815/what-is-an-api-and-why-do-i-need-to-know-it-for-web-development-ef713bc33987?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef713bc33987</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[back-end-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[devslopes]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Sat, 26 Mar 2022 05:52:55 GMT</pubDate>
            <atom:updated>2022-03-26T05:52:55.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9pvTCzbjKbqmLdVt" /><figcaption>Photo by <a href="https://unsplash.com/@ikukevk?utm_source=medium&amp;utm_medium=referral">Kevin Ku</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In our modern world of web development, APIs or ‘Application Programming Interface’ is a much-needed component to make your website successful. The websites you see on a daily basis: Google, social media, news websites, and even websites like the one you reading right now! APIs are what connect the front-end and back-end of web development. In short, the front-end is what you, the user, see. It allows the accessibility to move all over the website. However, the front-end side does not store your information like your account. They only store temporary information that is typically reset after every refresh. So how does the front-end show my information if it does not store it anywhere? That is where the back-end of web development comes into play! The back-end is in charge of the database and giving access to those who need it with protective layers. How do they do that? <strong>WITH AN API!</strong></p><p>For example, you want to sign in to your social media account you will need to write your username and password. After you write the username and password, the front-end will ‘call’ the API to retrieve the information from the back-end. The back-end will then go to the database and gather, add, update, or delete the information requested and return it back to the front-end. From there the front-end then uses the information that you see on your social media account. The API is what allows both ends to talk to each other.</p><p>Another good example a lot of people like to use to explain APIs is the restaurant. When you go to the restaurant, that is the front-end. You will be directed to your seat (you will click buttons on the screen to get where you want to go on the website). The waiter will then hand you a menu of options the kitchen is able to cook (the menu is a list of APIs or unique routes that the kitchen/database can retrieve). From there you will tell the waiter that you want a,b, and c from the menu and you want as soon as possible (You send the requested APIs a,b, and c to the back-end to retrieve the set information you requested as soon as possible.) From there the waiter will return with your order as requested as long as you ordered it correctly (Then the back-end will return the set of data requested to the front-end to display the requested data as long as you requested it correctly).</p><p>To sum up, APIs are the communicator between what the user sees and the database. The Medium website, for example, does not hold the data of this story as part of the front-end because that could be a lot of wasted memory and not everyone is wanting to read it. That is why it is best to store this information in a database that can store a lot of memory and then can be called upon when the user request to read this particular article.</p><p>As part of my program, I am currently learning the back-end and APIs. I finished my last project within days of starting because it was so interesting to me. The necessary logic that comes with making the APIs is my cup of tea!</p><p>Thank you for reading my article about what is an API and why it is important for web development. Let me know if you have made your own APIs! I would love ideas of what to make and try in order to practice my skills!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef713bc33987" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is TypeScript Required in Web Development?]]></title>
            <link>https://medium.com/@michaelsanchez8815/is-typescript-required-in-web-development-76f6c122ccb2?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/76f6c122ccb2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[coders]]></category>
            <category><![CDATA[devslopes]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Thu, 24 Mar 2022 03:05:52 GMT</pubDate>
            <atom:updated>2022-03-24T03:05:52.225Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8mgB0OT85vOFh66l" /><figcaption>Photo by <a href="https://unsplash.com/@6heinz3r?utm_source=medium&amp;utm_medium=referral">Gabriel Heinzer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It has been over two months since I have posted and I truly apologize for that. I have a very good reason for that! <strong>I GOT A DEVELOPER JOB! </strong>That&#39;s right! I was contacted by a company around the time of my last post and since then I have worked with them on multiple ‘sprints’ with them already! It has been such a great learning opportunity and I have learned so much from it!</p><p>To start off, I have eclipsed my one year of learning code about a week ago and to say that I am now achieving my goal of getting paid to code is such an amazing feat! With that said, that does not mean to stop learning and rely on my current set of skills. With this career, like teaching, you always must be researching and learning new ways to do the practice better. This now brings me to my point, TypeScript. Is it worth learning TypeScript?</p><blockquote><strong>TypeScript </strong>is a superset of the JavaScript language that has a compiler during development that catches mistakes prior to running the program.</blockquote><p>It includes many features, but outside of the compiler during development, types is one of the best features that come with TypeScript. TypeScript uses the same JavaScript language, but it adds layers of ‘protection’ or checking systems as it is being built to help avoid mistakes with data types, parameters, arguments, and SO ON! I learned TypeScript because my part-time developer job needed me to learn it. I notice the power and reason why it is very beneficial, but it also forces you to learn much more as well. There will be many parts in TypeScript that can be frustrating, but in the end, it does help me become a better programmer.</p><p>I could go into much more detail, but that is not what this post is about. As I learn more and more in the web development world, there are going to be many functions, programs, and features that are greater than the one before. By no means JavaScript is the best language out there, but TypeScript was made for a reason and it does have a following that grows louder each and every day. According to many statistics that I read, TypeScript is a much-needed skill in the development world.</p><p>Is it easy to learn TypeScript? Depends on your experience. If you have experience in creating projects on your own with JavaScript (No tutorials) then you should be able to get a handle on TypeScript relatively quickly. If you have not dabbled in any JavaScript, but have prior programming experience, the logic is essentially the same so you are just learning a larger than normal amount of syntax to write in TypeScript. If you have no experience at all, I would expect you to take a decent amount of time because you are learning many things at the same time.</p><p>To sum up, yes I do believe it is worth learning TypeScript. It helps the developer do their job much more effectively and consistently. It avoids mistakes in running the program by catching them in production/development. As I wrapped up my 12th unit out of 16 units in my program, I have officially finished my training of front-end development with React. My next learning with the program is to learn back-end with JavaScript and Node.Js. Next time you see me, I will probably talk about APIs and how they work!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76f6c122ccb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Never Know Enough…]]></title>
            <link>https://medium.com/@michaelsanchez8815/i-never-know-enough-2a7254e8b125?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a7254e8b125</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 02:59:41 GMT</pubDate>
            <atom:updated>2022-01-18T02:59:41.955Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yfJLmWEx94qI3nnZ" /><figcaption>Photo by <a href="https://unsplash.com/@scottbroomephotography?utm_source=medium&amp;utm_medium=referral">Scott Broome</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I can taste it. I am so close. That work-from-home possibility is becoming more and more real…until you are reminded you only know like 10% of what you should know to be a successful web developer. However, with the tiny experience I have, I am noticing the characteristics needed are nearly equal to the knowledge you need to be a successful web developer.</p><p>Since March of 2021, outside of a couple of weeks, I have consistently coded 15–20 hours per week. I amped up even more so when I signed up with DevSlopes in mid-September due to the mentorship and direct path to my goal. I have made about 14 solo projects since September with each one getting more difficult. For the last four months, I have become proficient in HTML, CSS, JavaScript, ReactJs, and basic in TypeScript. My goal is to have a full-time job as a web developer and no longer be a Classroom Teacher by the end of the school year. At this point, I feel like I am starting to put things together and apply to companies that are looking for Front End Developers with ReactJs. But that is where the wrinkle came in…</p><blockquote>I don’t know enough…</blockquote><p>I have talked to many people about their freelancing projects and jobs and each time the conversations have ended with me not knowing enough to/too much of a learning curve in order to do the project effectively. I was starting to get worried that I was not going to be able to reach my goal.</p><blockquote>They don’t just look at knowledge… they look at your character too!</blockquote><p>Through my reading, watching videos, talking to people, I am noticing that yes it is true that you need to have enough knowledge to do the job. However, that is starting to feel like half the equation. The other half are the characteristics (soft skills)you need to be a successful developer. With what I can control and the experience I have I know I am passionate, a creative problem solver, a decent debugger, and willing to accept failure to find my mistakes and learn from them. I am not saying I am not the other skills, but I felt these stand out to me.</p><p>My reason for writing this post today was to update the audience on my learning. I can see the faint light at the end of the tunnel. I also wanted to help the other self-taught developers that the journey is long and not to forget their goal. It is tough, but you know in the end it will be worth it!</p><p><a href="https://mikesz88.github.io/house_essential_commerce_with_api/">Check my latest eCommerce Store called House Essentials.</a> It was made in ReactJs calling an API as my backend. Comment below your journey and how close you are!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a7254e8b125" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Is My State Updating on the Second Click? (React setState Callback Function)]]></title>
            <link>https://medium.com/@michaelsanchez8815/why-is-my-state-updating-on-the-second-click-react-setstate-callback-function-e2784f4dc4cd?source=rss-c30ca60e3b10------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2784f4dc4cd</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[state]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[setstate]]></category>
            <dc:creator><![CDATA[Michael Sanchez]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 03:48:51 GMT</pubDate>
            <atom:updated>2021-12-22T03:48:51.029Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KxDrhaFMgjO-kP4v" /><figcaption>Photo by <a href="https://unsplash.com/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Want to watch it instead? If not, scroll on to read about it!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.loom.com%2Fembed%2F8b7dbf94843649f2a99bd2f9bc217530&amp;display_name=Loom&amp;url=https%3A%2F%2Fwww.loom.com%2Fshare%2F8b7dbf94843649f2a99bd2f9bc217530&amp;image=https%3A%2F%2Fcdn.loom.com%2Fsessions%2Fthumbnails%2F8b7dbf94843649f2a99bd2f9bc217530-00001.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=loom" width="1280" height="960" frameborder="0" scrolling="no"><a href="https://medium.com/media/512a7e9a36d6f9e07bddb6f1e506c5c3/href">https://medium.com/media/512a7e9a36d6f9e07bddb6f1e506c5c3/href</a></iframe><p>I have been learning ReactJs for over a month. I will say it has not only been <strong>VERY FRUSTRATING</strong> but also <strong>VERY REWARDING</strong>! I definitely see why it is widely used and I have only made a debt calculator app and a simple commerce app with it. It has been quite enjoyable. With that said, I am here to talk about a certain benefit that React gives you. To preface this article, I am assuming you have experience with ReactJs and have been able to create a ‘my-app’ with react with a terminal code written below.</p><pre>npx create-react-app my-app</pre><p>What React brings to the table are state and prop variables among many other things. If you do not know what I am talking about, I highly suggest you go to the <a href="https://reactjs.org/docs/react-component.html#instance-properties-1">documentation website</a> to learn more about it. With state, React allows you to change the variable and re-render the data that is being displayed on the screen. That is a great advantage when you are trying to change data live while the user is interacting with your app! Doing so would look something like this:</p><pre>doubledCount = () =&gt; {</pre><pre><em>    this</em>.setState({</pre><pre>    doubledCount: <em>this</em>.state.count * 2,</pre><pre>    })</pre><pre>}</pre><p>This is a very common practice. As with state being an object that means you are highly likely using it in many of your other functions. That ALSO means that your functions are relying on said data to be the latest. So when you are changing data with setState, it should change in your functions and render in your website instantaneously right? Here is a snippet of a component to indicate what I am talking about.</p><pre>class Header extends React.Component {</pre><pre>    constructor() {</pre><pre><em>    super</em>();</pre><pre><em>        this</em>.state = {</pre><pre>            count: 0,</pre><pre>            doubledCount: 0</pre><pre>        }</pre><pre>    }</pre><pre>    clickMe = () =&gt; {</pre><pre><em>        this</em>.setState(prevState =&gt; ({</pre><pre>            count: prevState.count + 1,</pre><pre>        }))</pre><pre><em>        this</em>.setState({</pre><pre>            doubledCount: <em>this</em>.state.count * 2,</pre><pre>        })</pre><pre>    }</pre><pre>    render() {</pre><pre><em>        return</em> (</pre><pre>            &lt;div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    Count:</pre><pre>                    {<em>this</em>.state.count}</pre><pre>                &lt;/div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    Doubled Count:</pre><pre>                    {<em>this</em>.state.doubledCount}</pre><pre>                &lt;/div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    &lt;button <em>onClick</em>={<em>this</em>.clickMe}&gt;Click Me&lt;/button&gt;</pre><pre>                &lt;/div&gt;</pre><pre>            &lt;/div&gt;</pre><pre>        )</pre><pre>    }</pre><pre>}</pre><p>As you can see, the two state data points have their own setState indicating they should change when the button is clicked. For example, when the button clicks once, it should be Count: 1 and Doubled Count: 2, right? Look below for the before and after:</p><p>Before:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*PJMspf_MpShTir1D6ZdVhQ.png" /></figure><p>After one click:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*ztKBRbigNeeEM4ptERZkvA.png" /></figure><p>After two clicks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*gYjqWYbRSWZIIuPMknVA0g.png" /></figure><p>That does not make sense, does it? The code displayed is changing the state variable for each accordingly but it is almost as if it is one click behind.</p><blockquote><strong>That is exactly is what is happening!</strong></blockquote><p>Using the documentation, you must recognize that when using setState, it will rerender the correct data <strong>asynchronously</strong>. That means it is not going to happen immediately. Therefore, in the above example when I was clicking the first time, the count worked perfectly, but the double count did not. What was happening was the double count was using the value previously what the state variable ‘count’ was then doubling it. In other words, the double count setState code snippet was happening too fast (or before) the count was being changed appropriately. Just because the setState Count code snippet happened first does not matter because it is asynchronous.</p><p>Two common options to combat this are using other functions called ‘componentDidMount()’ or the ‘setTimeout()’. Please for the sake of coding, do not use setTimeout() in this situation! Every computer, internet, or whatever can be drastically different in comparison to yours. That means the user could have a slower loading time and when using the setTimeout() function, it will not solve any of your problems. The componentDidMount() function is definitely a recommended way to work around this asynchronous issue, but that means you must learn another function and use it correctly. The one I recommend is…<strong>setState</strong>! Yes! setState has an extra feature called the…<strong>callback function</strong>! Look at the code snippet below and compare it to the one I wrote already in the previous example:</p><pre>class Header extends React.Component {</pre><pre>    constructor() {</pre><pre><em>        super</em>();</pre><pre><em>            this</em>.state = {</pre><pre>                count: 0,</pre><pre>                doubledCount: 0</pre><pre>            }<br>    }</pre><pre>    doubledCount = () =&gt; {</pre><pre><em>        this</em>.setState({</pre><pre>            doubledCount: <em>this</em>.state.count * 2,</pre><pre>        })</pre><pre>    }</pre><pre>    clickMe = () =&gt; {</pre><pre><em>        this</em>.setState(prevState =&gt; ({</pre><pre>            count: prevState.count + 1,</pre><pre>        }), <em>this</em>.doubledCount)</pre><pre>    }</pre><pre>    render() {</pre><pre><em>        return</em> (</pre><pre>            &lt;div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    Count:</pre><pre>                    {<em>this</em>.state.count}</pre><pre>                &lt;/div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    Doubled Count:</pre><pre>                    {<em>this</em>.state.doubledCount}</pre><pre>                &lt;/div&gt;</pre><pre>                &lt;div&gt;</pre><pre>                    &lt;button <em>onClick</em>={<em>this</em>.clickMe}&gt;Click Me&lt;/button&gt;</pre><pre>                &lt;/div&gt;</pre><pre>            &lt;/div&gt;</pre><pre>        )</pre><pre>    }</pre><pre>}</pre><p>Now look what happens in the first couple of clicks:</p><p>Before:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*C8VY46qd0SsTFyO6hD4-rA.png" /></figure><p>After one click:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*92IMPXZhEbQThvmX7lLapQ.png" /></figure><p>After two clicks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*DPVD5Fy8kA8Xne0zgi-mgA.png" /></figure><p>Notice the difference? The double count variable changed based on what the new count was, not the previous. The code that was different was:</p><pre><em>this</em>.setState(prevState =&gt; ({</pre><pre>    count: prevState.count + 1,</pre><pre>}<strong>), <em>this</em>.doubledCount)</strong></pre><p>This part that is bolded is the callback function that is allowed with setState. It allows me to call/reference another function that must happen after the new count variable has changed. That means the function will not be called until the value changes and then it will execute. <strong>THAT MEANS</strong> the double count variable can execute as expected in doubling whatever the current count is! Perfect! This is a tremendous advantage not to be forgotten!</p><p>Here are a couple of ReactJs App examples I have created that you can explore where I have used this callback effectively.</p><p><strong><em>Debt Free Calculator</em></strong></p><p>GitHub Repository: <a href="https://github.com/mikesz88/code-commerce">https://github.com/mikesz88/code-commerce</a></p><p>GitHub Page: <a href="https://mikesz88.github.io/Debt-Free-Calc-React/">https://mikesz88.github.io/Debt-Free-Calc-React/</a></p><p><strong><em>Code Commerce</em></strong></p><p>GitHub Repository: <a href="https://github.com/mikesz88/Debt-Free-Calc-React">https://github.com/mikesz88/Debt-Free-Calc-React</a></p><p>GitHub Page: <a href="https://mikesz88.github.io/code-commerce/">https://mikesz88.github.io/code-commerce/</a></p><p>I hope this was a great read! If you have any questions write them below! I would love to collaborate with you on understanding ReactJs more! If I made any mistakes, please do not hesitate to reach out as I am still learning React and want to make sure I am saying the correct information.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2784f4dc4cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>