<?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: Codementor</title>
    <description>The latest articles on DEV Community by Codementor (@codementor).</description>
    <link>https://dev.to/codementor</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%2Forganization%2Fprofile_image%2F517%2F65fc77e1-1af5-4ddb-af43-66852f297aa2.png</url>
      <title>DEV Community: Codementor</title>
      <link>https://dev.to/codementor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codementor"/>
    <language>en</language>
    <item>
      <title>Hosting virtual events for developers pt.2: Structure, slide decks, and event flow</title>
      <dc:creator>jenniferfu0811</dc:creator>
      <pubDate>Tue, 26 Apr 2022 07:52:28 +0000</pubDate>
      <link>https://dev.to/codementor/hosting-virtual-events-for-developers-pt2-structure-slide-decks-and-event-flow-5d95</link>
      <guid>https://dev.to/codementor/hosting-virtual-events-for-developers-pt2-structure-slide-decks-and-event-flow-5d95</guid>
      <description>&lt;p&gt;In the last two years, virtual events have gained a lot of traction and popularity. By removing the geographical constraints, developer virtual events are more accessible as anyone with access to the internet can attend or host their own events.&lt;/p&gt;

&lt;p&gt;The second part of this three-part blog series will provide you with our recommendations on how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prepare for your talk, &lt;/li&gt;
&lt;li&gt;Create slide decks, and &lt;/li&gt;
&lt;li&gt;Host engaging developer events. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more guidance on finding the right topic, target audience, event title, and event description, &lt;a href="https://www.codementor.io/blog/developer-virtual-events-guide1-dgzxdgnfmf?ref=speaker_blog_2"&gt;check out the first article&lt;/a&gt;. In this post, we'll cover:&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick a focused topic and virtual event format
&lt;/h2&gt;

&lt;p&gt;The best virtual events for developers are well-planned and executed. But before you can think about hosting an event, there’s some groundwork to do. Two crucial aspects of planning out a well-structured talk: picking a focused topic and coming up with a high level structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pick a narrow topic for your developer event
&lt;/h3&gt;

&lt;p&gt;You probably already have some ideas about what you want to talk about for your virtual event. The key is to &lt;strong&gt;decide what angle you want to take&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;For technical developer events, you can talk about tech stacks, libraries, tools, best practices, or even bad practices you’ve seen. Your talks can also be career-focused, where you share about non-technical skills that developers should have to further their career.&lt;/p&gt;

&lt;p&gt;Whether it’s programming-focused or career-related events, there are endless topics you can speak on. The key is to narrow your topic down so you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explain your point of view and/or technical concepts in depth.&lt;/li&gt;
&lt;li&gt;Keep your audience engaged by sticking to the time.&lt;/li&gt;
&lt;li&gt;Allow enough time for the attendees to ask questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When in doubt, a good place to start is with what you know — and what you’re comfortable talking about. As &lt;a href="https://www.codementor.io/events/building-software-from-scratch-d4hc46c6og?ref=speaker_blog_2"&gt;Veerle&lt;/a&gt;, Managing Direct and Head of Data Science at Analytic Health, shared:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you choose a topic that you’re already busy with on a day-to-day basis you will be able to talk practical as well and give meaningful examples (and it requires less time preparing because you already know most of it 😉).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Select a virtual format
&lt;/h3&gt;

&lt;p&gt;Next up is choosing the format that suits your online event. Some common formats for developer virtual events include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Presentations&lt;/li&gt;
&lt;li&gt;Interviews&lt;/li&gt;
&lt;li&gt;Live coding sessions&lt;/li&gt;
&lt;li&gt;Workshops (e.g. debugging, code review, etc.)&lt;/li&gt;
&lt;li&gt;Discussions (e.g. two speakers sharing different sides of a topic)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is linked to topic selection: as you’re narrowing down the focus of your talk, the format of your talk should become clearer as well. &lt;/p&gt;

&lt;p&gt;To keep your audience interested and engaged, here are some common formats and how long online events should be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vbXxsE-c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6c334413-65a1-4462-a6a4-c619d1b587f1/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vbXxsE-c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6c334413-65a1-4462-a6a4-c619d1b587f1/" alt="how long should virtual events be" width="880" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Come up with a high level structure
&lt;/h2&gt;

&lt;p&gt;Now that you’ve picked your event topic and format, you can start forming your event’s high level structure and some details. Make sure the talk includes:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One overarching idea you want to share&lt;/li&gt;
&lt;li&gt;Three to four points to support the main idea&lt;/li&gt;
&lt;li&gt;Real-world examples (for both technical and career-related topics)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Short stories and anecdotes can also help you convey your ideas better. One way to break the ice is to start your online events with a short story that demonstrates how you’ve experienced the problem you’ll address. You can also end with a story that sums up your talk. But remember: if the stories aren’t directly relevant, cut them out!&lt;/p&gt;

&lt;p&gt;To help you get started, we’ll use two examples — one technical and one career-related — to demonstrate the process of developing a high level structure. Feel free to treat the following examples as your event program template or virtual event planner.&lt;/p&gt;

&lt;h3&gt;
  
  
  Virtual events structure example: Technical topic
&lt;/h3&gt;

&lt;p&gt;Let’s say you’re a front-end developer who works with JavaScript. You have come across dependency injection a few times and think that it’s a bad practice. Your point of view might be: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“JavaScript is not a purely class based language and is flexible and dynamic. Dependency injection forces you to use a class in JavaScript when you don’t need to.” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To help your audience understand your point of view and find better alternatives to dependency injection, the 3-4 main sections of your talk could be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define:&lt;/strong&gt; What is dependency injection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use cases/examples:&lt;/strong&gt; What are some examples of dependency injection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Argument:&lt;/strong&gt; Why you shouldn’t use dependency injection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solutions/conclusions:&lt;/strong&gt; What are the alternatives to dependency injection&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Online events structure example: Career-related topic
&lt;/h3&gt;

&lt;p&gt;If you want to tackle a broad topic like “&lt;a href="https://www.codementor.io/blog/improve-programming-skills-d2ymtec4cl?ref=speaker_blog_2"&gt;How to improve your programming skills&lt;/a&gt;,” you have to spend a bit more time deciding on what to focus on. For demonstration purposes, let’s say you want to focus on junior developers, and from what you’ve experienced and seen, you think: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“As junior developers, ramping up our programming skills to fit the company’s needs is crucial. In addition to traditional class-based learning, finding mentors can help us significantly in our learning journey.” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this case, the title of your online event might be be “The fastest way to learn programming as a junior developer.” Once again, you want to provide some basic information before you jump in. You also want to make sure to use real-world examples and pull from your own experience to make your talk more relatable and authentic. Here’s how you might structure this talk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Opinion/examples:&lt;/strong&gt; Why you need to improve your programming skills as a junior developer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Status quo:&lt;/strong&gt; Learning resources for junior developers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience:&lt;/strong&gt; How mentors fast-tracked my learning experience&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conclusion:&lt;/strong&gt; Mix and match learning methods to improve your programming skills&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Regardless of the topic you choose, it’s crucial to flesh out your experience with tangible real-world examples. A clear structure helps your audience to follow along. With 3-4 key points, you should spend no more than 5 minutes on each. If you’re unable to keep it under 5 minutes, cut down on the number of points you address. You can always host multiple online events and turn them into a series.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put together great slide decks for virtual events
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why do you need slide decks for developer online events?
&lt;/h3&gt;

&lt;p&gt;Slide decks are the main content that guides your audience through your online event. They serve multiple purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helps you remember key points&lt;/li&gt;
&lt;li&gt;Provides visual cues for your presentation&lt;/li&gt;
&lt;li&gt;Keeps things concise and on schedule&lt;/li&gt;
&lt;li&gt;Delivers (only the) necessary information &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, developers who attend tech conferences and talks often ask for copies of speakers’ slide decks before or after the presentation. As the presenter, you can decide if you want to share your slide decks. We'll walk through how to create a slide deck for developer online events in this section.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to organize your slides
&lt;/h3&gt;

&lt;p&gt;If you’re a veteran speaker or have attended a lot of developer conferences and online events, you're probably already familiar with creating engaging slide decks. But if you’re not sure how to organize your slides, here’s a general guideline for how your slides can be organized:&lt;/p&gt;

&lt;h4&gt;
  
  
  Introduction slides
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;1st slide: Title of your talk &lt;/li&gt;
&lt;li&gt;2nd slide: Short self-introduction&lt;/li&gt;
&lt;li&gt;3rd slide: Agenda of the event&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Main section slides
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;~3 slides for each main section &lt;/li&gt;
&lt;li&gt;First slide: Title page for each section of your talk&lt;/li&gt;
&lt;li&gt;The other 2~3 slides: 

&lt;ul&gt;
&lt;li&gt;Questions, statements, or definitions&lt;/li&gt;
&lt;li&gt;Technical concepts or supporting stats to build up your case&lt;/li&gt;
&lt;li&gt;Sample code with the important parts highlighted&lt;/li&gt;
&lt;li&gt;Memes, gifs, data visualizations, and illustrations that convey your point&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Wrap up slides
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;~1-2 slides&lt;/li&gt;
&lt;li&gt;Bullet point summary of what was covered in the talk&lt;/li&gt;
&lt;li&gt;A list of resources for your audience&lt;/li&gt;
&lt;li&gt;A meme or gif to close up the talk (if relevant)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s a short list of some do’s and don’ts for building a great slide deck:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tEZKF8Gs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fc54ad11-190d-4abe-a58c-53ae37707b02/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tEZKF8Gs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fc54ad11-190d-4abe-a58c-53ae37707b02/" alt="Do's and Don'ts for slide decks" width="880" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can always find slide deck templates to help you spend less time on design and more on delivering quality content for your online events!&lt;/p&gt;

&lt;h2&gt;
  
  
  Create engaging online events experience
&lt;/h2&gt;

&lt;p&gt;Now that you’re finished with all the prep work, it’s time to host your online event! Here are some tips for every step of your online event to help you succeed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before the virtual event starts
&lt;/h3&gt;

&lt;p&gt;For your audience to be able to follow, see, and hear you throughout the entire duration of your event, make sure your environment is optimized for hosting online events:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your Internet connection is stable&lt;/li&gt;
&lt;li&gt;Your camera and mic work, and set at a suitable distance/angle&lt;/li&gt;
&lt;li&gt;You’re at a spot that’s well-lit and quiet &lt;/li&gt;
&lt;li&gt;Your background isn’t distracting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before your online event officially starts, join the virtual event meeting room to test out the software to make sure everything runs smoothly. If possible, ask a friend to join you virtually to double check the video and sound quality. Additionally, feel free to share your slides with your audience ahead of time so they can familiarize themselves with your talk and come up with questions before the event. &lt;/p&gt;

&lt;h3&gt;
  
  
  Starting your online event
&lt;/h3&gt;

&lt;p&gt;Before you officially start your talk, you might want to give the attendees 2-3 minutes to join. About half of the audience will join either early or on-time, while the other half will join within 3-5 minutes of the official start time. While you’re waiting for other attendees to join, here are some things you can do to keep your audience engaged:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Play some background music to lighten up the mood&lt;/li&gt;
&lt;li&gt;Let your audience know you’ll start the event in 2-3 minutes&lt;/li&gt;
&lt;li&gt;Ask the attendees a question or two verbally and in the chat, some examples include:

&lt;ul&gt;
&lt;li&gt;Where is everyone joining from?&lt;/li&gt;
&lt;li&gt;What do you hope to learn from this event? &lt;/li&gt;
&lt;li&gt;What is the biggest challenge you’re currently facing at work?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Explain how you’ll run the event and Q&amp;amp;A to your attendees&lt;/li&gt;
&lt;li&gt;Post important information and announcements in chat (e.g. code of conduct, Q&amp;amp;A format, GitHub repo, links, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you’re ready to start, turn off your background music and let the crowd know the online event will be starting soon.&lt;/p&gt;

&lt;h3&gt;
  
  
  During your virtual event
&lt;/h3&gt;

&lt;p&gt;For the most part, you’ll be focused on presenting and speaking. But since you’ll also be answering questions and hosting the event, there are some additional things you want to keep in mind. &lt;/p&gt;

&lt;h4&gt;
  
  
  For presenting:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Be careful not to speak too fast&lt;/li&gt;
&lt;li&gt;Make sure you’re engaged and excited&lt;/li&gt;
&lt;li&gt;Avoid mic static but make sure your audience can hear you&lt;/li&gt;
&lt;li&gt;Try not to read off of your screen &lt;/li&gt;
&lt;li&gt;Speak to your audience like you would at in-person events&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  For hosting:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Admit attendees if your virtual meeting room is not public&lt;/li&gt;
&lt;li&gt;Keep an eye on the chat for incoming comments and questions&lt;/li&gt;
&lt;li&gt;Default your attendees to mute if you don’t want intrusions during your talk&lt;/li&gt;
&lt;li&gt;Use your phone’s timer to pace yourself&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  For Q&amp;amp;A:
&lt;/h4&gt;

&lt;p&gt;If you’d like all questions to be answered at the end of the talk, remind your audience that you’ll address the questions at the end and ask them to add their questions to chat if they’d like to. If you want your virtual event to be more interactive, pause at the end of each section to ask the attendees if they have any questions.&lt;/p&gt;

&lt;p&gt;Regardless of the format you choose, when it’s time for the last question, remember to let the event attendees know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ending the online event
&lt;/h3&gt;

&lt;p&gt;After you’ve answered the last question, you can naturally segue into the closing part of the virtual event. &lt;/p&gt;

&lt;p&gt;Thank the audience for joining and send them important links in the chat (e.g. social media, GitHub repos, future online events, etc.). If there are any unanswered questions, remind the attendee to post their questions in the event page comment section. Before you officially end the meeting, make sure to let the crowd know that the event is over. Here are some friendly phrases you can use to end the talk: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;That’s all for today, thanks for joining me and feel free to comment on the event page with any questions! &lt;/li&gt;
&lt;li&gt;That’s it for our event today, feel free to message me on Twitter if you have any questions!&lt;/li&gt;
&lt;li&gt;That’s a wrap for today! Thanks for joining and see you soon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once attendees start leaving the virtual meeting room, you can end the meeting for all. There are some other follow ups to do after you finish your online events, but for now, take a break, go on a jog, or celebrate a bit for successfully hosting a great online event!&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up &amp;amp; next steps
&lt;/h2&gt;

&lt;p&gt;We’ve just walked you through preparing for and hosting a developer online event. By narrowing down your topic and setting the high-level structure, you’re able to focus your talk so it conveys your knowledge and sharing in the most effective way. You can also share the event recordings so other developers can continue to learn and be inspired by the event.&lt;/p&gt;

&lt;p&gt;In the next and last part of this three-part series, we’ll share more about promoting your online events and engaging with your audience after the event. If you’re not sure how you can promote your events to the right developers, the last blog post will provide you with some tips and walk you through how Codementor Events will help with that. &lt;/p&gt;

&lt;p&gt;If you’re ready to share your experience with other developers, create events and &lt;a href="https://www.codementor.io/events/create/about-the-event?ref=speaker_blog_2"&gt;become a Codementor Events speaker now&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>speaking</category>
    </item>
    <item>
      <title>Hosting virtual events for developers pt.1: Audience, topic, event title, &amp; event description</title>
      <dc:creator>jenniferfu0811</dc:creator>
      <pubDate>Tue, 11 Jan 2022 03:59:22 +0000</pubDate>
      <link>https://dev.to/codementor/hosting-virtual-events-for-developers-pt1-audience-topic-event-title-event-description-3cic</link>
      <guid>https://dev.to/codementor/hosting-virtual-events-for-developers-pt1-audience-topic-event-title-event-description-3cic</guid>
      <description>&lt;p&gt;Most developers have attended at least a few tech events or virtual conferences. Some of you may have sat in your seats and thought to yourself “I have the expertise to talk about this as well.” With the rise of virtual events, you can share your knowledge and experience more easily with more developers.&lt;/p&gt;

&lt;p&gt;Before you decide where to host the virtual events, make sure the platform has your target audience. For instance, &lt;a href="https://www.codementor.io/events?ref=speaker_blog_1"&gt;Codementor Events&lt;/a&gt; has a vibrant developer community with 100K+ developers. If you’re looking for virtual events platform with developer audiences, this platform is suitable.&lt;/p&gt;

&lt;p&gt;Before we dive into the details of planning your virtual event, let’s start by talking about why you may want to speak at virtual events. We’ll then walk through deciding on the right topic for the right audience and how you can make your event title and descriptions relatable and attention-grabbing. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why should I speak at developer virtual events?
&lt;/h2&gt;

&lt;p&gt;Similar to writing blog posts or contributing to open source, speaking at online events is a way for you to share knowledge. Not only are developer virtual events great for knowledge sharing, they’re also great for community building and personal growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  Own and reinforce your knowledge
&lt;/h3&gt;

&lt;p&gt;Regardless of seniority and years of experience, every developer has something unique to offer. Whether it’s how you found a job after finishing a coding bootcamp or how your team uses microservices for back- and front-end, you’ll have unique perspectives, knowledge, and tips to share. The best way for you to validate what you know is to teach it to someone else. Preparing and speaking at virtual events give you the opportunity to articulate and solidify your knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practice sharing your experience and knowledge with others
&lt;/h3&gt;

&lt;p&gt;Some dev teams have regular sharings, where every developer is encouraged to share something new they’ve learned. However, not every developer has built-in communities to do so. The process of prepping, speaking, and getting feedback at your own virtual events gives you the opportunity to refine your knowledge and practice sharing concisely and effectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Help others learn from your experience via virtual events
&lt;/h3&gt;

&lt;p&gt;No matter where you are in your programming journey, there are developers who are either in the same place as you or want to be where you are. Sharing what you know about technical tools, libraries, languages, and best practices can help other developers ramp up their technical skills exponentially. &lt;br&gt;
Sharing your career progression, blockers, and resources can help others grow in their careers and remove feelings of anxiety and uncertainty. Regardless of the nature of your virtual event topic, as long as you know who can benefit from your online event, there are no irrelevant experiences.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build your personal brand and network
&lt;/h3&gt;

&lt;p&gt;If you’re interested in broadening your network and building a more prominent online presence, hosting virtual events on reputable platforms can go a long way. You’re likely to gain a dozen or more LinkedIn, Twitter, and GitHub connections with other like-minded developers who have resources to share, common interests, or want to learn from you.&lt;/p&gt;

&lt;p&gt;Developer virtual events are one of the most accessible ways for developers to connect, learn, and share knowledge and experience. To maximize the benefits of virtual events for both you and your virtual attendees, identifying the right audience, topic, event title, and event descriptions is crucial. We’ll address each of these aspects in the following sections.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I choose the right topic for my virtual events?
&lt;/h2&gt;

&lt;p&gt;While all experiences are valuable, your experience may speak to some more than others. As such, it’s important to identify the kinds of developer you think would benefit from your virtual events sharing the most. By narrowing down on your target audience, virtual event ideas, and cadence, you’ll be able to share your knowledge with the right group of developers.&lt;/p&gt;

&lt;p&gt;To help you narrow in on developers who will learn from your talk, here are some ways you can think about different groups of developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Career stage:&lt;/strong&gt; aspiring, junior, mid-level, senior developers, tech leads, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Types of developer:&lt;/strong&gt; front-end, back-end, full stack, DevOps, Android, iOS, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Industries &amp;amp; products:&lt;/strong&gt; B2B, B2C, fintech, e-commerce, healthcare, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s say you want to take the technical route and share about Node.js. Front-end, back-end, and full stack developers can all benefit from this topic. With that said, it's too ambitious and ineffective to try to capture front-end, back-end, and full stack developers’ pain points in one talk. &lt;/p&gt;

&lt;p&gt;We'll choose back-end developers as the focus for this topic. Here are some potential event topics that are focused:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7 Steps to learn Node.js as a beginner&lt;/li&gt;
&lt;li&gt;Live coding: Build a chat app using Node.js&lt;/li&gt;
&lt;li&gt;Scaling enterprise software with Node.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first topic can be helpful for aspiring and junior developers. The second and third topics can apply to junior, mid-level, or senior developers based on how you frame your talk. If you have more than one idea, try framing them into a series of talks rather than cramming it all into one. In the next section, we’ll talk about the steps to writing a clear and informative event title for event planning.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a good event title look like?
&lt;/h2&gt;

&lt;p&gt;Depending on the nature of your topic, the title of your virtual events can vary widely. For instance, if you want to host a technical talk, your virtual event title should include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the key technologies,&lt;/li&gt;
&lt;li&gt;tech concepts, &lt;/li&gt;
&lt;li&gt;or tech stacks 
you’ll share about. On the other hand, if you’re planning a more career-related talk, your title should address the issues, pain points, or challenges you’ll speak to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ll use a career-focused topic to illustrate how you might go from a general topic to a specific title for your talk. &lt;/p&gt;

&lt;p&gt;Let’s say you’re a tech lead and want to share insights on how to be a good tech lead. With “tech lead” as the central theme, here are a few virtual events titles that captures different facets of being a tech lead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Effectively managing a 15+ people developer team&lt;/li&gt;
&lt;li&gt;How to interview and find the right developers for your team&lt;/li&gt;
&lt;li&gt;Personal time management for tech leads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While all three topics are relevant to tech leads and aspiring tech leads, focusing your talk on one specific topic will allow you to dig deeper into each pain point and deliver precise advice to your audience at virtual events.&lt;/p&gt;

&lt;p&gt;Regardless of the topic you choose, here are some tips on coming up with a relevant and eye-catching virtual event title when you're doing event planning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clearly state the tech stacks (for technical events)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Highlight the problems you'll provide solutions for&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide the concepts, tools, or solutions you’ll be sharing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Concisely summarize what the audience can expect&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google for title inspirations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that you’ve caught the attention of your audiences’ eyes with the right event title, the next thing is to write a compelling event description to encourage attendees to join your virtual event.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to write an event description for developer virtual events
&lt;/h2&gt;

&lt;p&gt;Not many virtual event platforms provide structures for writing event descriptions. We've created the following structure to help you attract attendees effectively. To make your event description more scannable and enticing to potential event attendees, here’s the structure we suggest:&lt;/p&gt;

&lt;h4&gt;
  
  
  About the talk:
&lt;/h4&gt;

&lt;p&gt;The purpose of this section is to connect with potential virtual attendees by highlighting the problems they’re faced with and the solutions you’ll offer. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Present the problem you’ll address with a short anecdote in the first sentence.&lt;/li&gt;
&lt;li&gt;Use another 1-2 sentences to expand on the pain points, how you can help your audience tackle them, and who would benefit from the event.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  This talk will cover
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use 3-4 bullet points to list out the agenda of your talk.&lt;/li&gt;
&lt;li&gt;Be specific about what each section will address&lt;/li&gt;
&lt;li&gt;Highlight unique formats you'll use for your online event (e.g. live coding, code review, debugging, workshop)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  About the speaker
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Include your current role and company for your headline&lt;/li&gt;
&lt;li&gt;Highlight relevant work experience or other projects in your bio (e.g. open source advocate, career counselor, lecturer, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From deciding your virtual events topic and target audience, to coming up with your event title and event description, &lt;em&gt;the goal is to attract developers who would benefit from your knowledge and experience.&lt;/em&gt; The three different sections attract event attendees through stories and pain points, clear content of the talk, and the experience and passion you can bring them. &lt;/p&gt;

&lt;p&gt;In the next section, we'll walk through two event description examples to help concretize event description writing more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event description examples for inspirations
&lt;/h2&gt;

&lt;p&gt;To help you write the description for your talk, here are two virtual event description examples: &lt;/p&gt;

&lt;h3&gt;
  
  
  Tech talk event description example
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gQBXP0xr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/db2eb1b7-2a47-42f5-a3b9-a2a803590da6/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gQBXP0xr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/db2eb1b7-2a47-42f5-a3b9-a2a803590da6/" alt="Codementor Events React and Typescript" width="880" height="590"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: &lt;a href="https://www.codementor.io/events/react-with-typescript-ddzznxuno4?ref=speaker_blog1"&gt;Codementor Events - Best Virtual Events for Developers&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sylvana’s virtual event description is a great example for a tech talk because it speaks to the challenges of adopting TypeScript as a React developer, flesh out the benefits of using TypeScript, and offers live coding as a solution to help React developers pick up TypeScript faster. Furthermore, the speaker’s bio makes her relatable and trustworthy. &lt;/p&gt;

&lt;p&gt;Get some inspiration from Sylvana's event website &lt;a href="https://www.codementor.io/events/react-with-typescript-ddzznxuno4?ref=speaker_blog1"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Career talk virtual event description example
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f8RP8aen--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6cd146d7-2e64-4f8f-9d47-6132d0878188/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f8RP8aen--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6cd146d7-2e64-4f8f-9d47-6132d0878188/" alt="Codementor Events Imposter Syndrome" width="880" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Source: &lt;a href="https://www.codementor.io/events/overcome-imposter-syndrome-in-tech-da7rzauj6a?ref=speaker_blog1"&gt;Codementor Events - Best Virtual Events for Developers&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Rahul’s virtual event description is also a great example, especially for a career related talk. The “About the talk” section features anecdotes that speak to the challenges of imposter syndrome and ends with an encouragement. “The talk will cover” clearly presents what the audiences can expect. Rahul’s speaker bio also shows both his professional background and passion for helping people succeed in their careers. &lt;/p&gt;

&lt;p&gt;Combined, the event description is effective, short, and sweet. Visit the &lt;a href="https://www.codementor.io/events/overcome-imposter-syndrome-in-tech-da7rzauj6a?ref=speaker_blog1"&gt;event website&lt;/a&gt; to check out Rahul's event description.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: What’s next?
&lt;/h2&gt;

&lt;p&gt;There are many benefits to speaking at a developer virtual events, but the primary goal is to make programming knowledge more accessible to all. If you’ve never spoken at developer virtual conferences or virtual events before, the thought of public speaking may be a little daunting. However, with this blog series and some practice, you’ll be able to share your experience confidently and host successful online events in no time.&lt;/p&gt;

&lt;p&gt;If you’re ready to share your experience with others, and speak at an event virtually, &lt;a href="https://www.codementor.io/events?ref=speaker_blog_1_dev"&gt;become a Codementor Events speaker now&lt;/a&gt;! If you’re not quite ready yet, we’ll walk you through preparing for your talk and hosting successful virtual events in the next part of this three-part series.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/events?ref=speaker_blog_1_dev"&gt;Submit your virtual event ideas to Codementor Events →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>career</category>
      <category>motivation</category>
      <category>speaking</category>
    </item>
    <item>
      <title>A Step-by-step Tutorial for Building a Temperature Converter Website</title>
      <dc:creator>Christine Shu</dc:creator>
      <pubDate>Wed, 22 Sep 2021 08:50:02 +0000</pubDate>
      <link>https://dev.to/codementor/a-step-by-step-tutorial-for-building-a-temperature-converter-website-1e33</link>
      <guid>https://dev.to/codementor/a-step-by-step-tutorial-for-building-a-temperature-converter-website-1e33</guid>
      <description>&lt;p&gt;Building coding projects is one of the best ways to learn coding and build your portfolio. However, sometimes a simple project spec may not be enough to help you build your project. This tutorial will walk you through how to build a &lt;a href="https://www.codementor.io/projects/web/temperature-converter-website-atx32dy7mf?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;Temperature converter website&lt;/a&gt;, one of the most popular projects on &lt;a href="https://www.codementor.io/projects?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;DevProjects&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You’ll build a simple tool to convert between different temperature units. To follow along, check out the &lt;a href="https://www.codementor.io/projects?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;project spec on DevProjects&lt;/a&gt;!🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;While Kelvin is the SI Unit of temperature, people generally prefer Fahrenheit or Celsius unit type to measure temperature. We're going to build a temperature converter that will convert Fahrenheit, Celsius, and Kelvin units to each other, using the most popular CSS framework called &lt;a href="https://getbootstrap.com/docs/4.6/getting-started/introduction/" rel="noopener noreferrer"&gt;Bootstrap 4.6&lt;/a&gt; and JavaScript library - &lt;a href="https://jquery.com/" rel="noopener noreferrer"&gt;jQuery&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Here is the live demo of &lt;a href="https://karan-kmr.github.io/temperature-converter/" rel="noopener noreferrer"&gt;Temperature converter website&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we will create a temperature converter and walk through how the website works. We will deploy this project on GitHub using GitHub pages, a hosting service by GitHub that allows you to publish static websites online directly from repositories. The tutorial will guide you through the step-by-step process of setting up the GitHub repositories before publishing the website. The suggested text editor is VScode, but you can choose any other text editor you like.&lt;/p&gt;

&lt;p&gt;⭐ &lt;strong&gt;Why&lt;/strong&gt; &lt;strong&gt;Bootstrap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We are using this library because of its variety of components. Additionally, the bootstrap grid system is based on Flex, which provides us with full responsive support for any website. You can read more about it on its official website.&lt;/p&gt;

&lt;p&gt;⭐ &lt;strong&gt;Why&lt;/strong&gt; &lt;strong&gt;jQuery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While other powerful libraries and frameworks have emerged, jQuery is very beginner friendly and is the best library for practicing and getting started in JavaScript libraries.&lt;/p&gt;

&lt;p&gt;jQuery is a small, fast, and feature-rich library. It saves developers a lot of time by completing complicated tasks with just a few lines of code.&lt;/p&gt;

&lt;p&gt;⭐ &lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VSCode or any other text editor&lt;/li&gt;
&lt;li&gt;Any browser of your choice&lt;/li&gt;
&lt;li&gt;Basics knowledge of jQuery and Bootstrap&lt;/li&gt;
&lt;li&gt;A GitHub Account for deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/projects/web/temperature-converter-website-atx32dy7mf?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;Recreate this project on DevProjects. Try it now!&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the project environment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new folder named Temperature Converter and open the folder in VScode. Initially, our workspace will look like this:&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%2Fucarecdn.com%2F1a975794-634b-4e84-b03a-e42e7897d594%2F" 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%2Fucarecdn.com%2F1a975794-634b-4e84-b03a-e42e7897d594%2F" alt="image1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hover the mouse on the sidebar to find the icon for creating new files or folders&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%2Fucarecdn.com%2Fc36c9f8d-07bf-4cf5-9cea-9c442b81f59b%2F" 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%2Fucarecdn.com%2Fc36c9f8d-07bf-4cf5-9cea-9c442b81f59b%2F" alt="image2.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a sub-folder named assets and the following files: index.html, style.css, and script.js.&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%2Fucarecdn.com%2F54828960-0022-4f60-8f67-0b54f2ac01e9%2F" 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%2Fucarecdn.com%2F54828960-0022-4f60-8f67-0b54f2ac01e9%2F" alt="fileDirectory.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Assets&lt;/strong&gt;&lt;br&gt;
In this folder, we'll store all icons and any other media used in our project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Index.html&lt;/strong&gt;&lt;br&gt;
To create the structure of the website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Style.css&lt;/strong&gt;&lt;br&gt;
To add custom CSS styling in our project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Script.js&lt;/strong&gt;&lt;br&gt;
This is like the brain of our project, In which we write JavaScript code to make our website work.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the index.html type doc then press enter, A boilerplate will appear as shown below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2F8c866a09-7ceb-4816-82aa-d1d338b9ab99%2F" 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%2Fucarecdn.com%2F8c866a09-7ceb-4816-82aa-d1d338b9ab99%2F" alt="image3.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the index.html type doc then press enter, A boilerplate will appear as shown below:&lt;/p&gt;

&lt;p&gt;a. Set up Bootstrap 4.6 CSS&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%2Fucarecdn.com%2F1b50054e-8df3-4cb1-b5fd-8214a7c577fa%2F" 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%2Fucarecdn.com%2F1b50054e-8df3-4cb1-b5fd-8214a7c577fa%2F" alt="image4.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Visit Official Bootstrap 4.6.0 Documentation and copy the CDN link of the CSS and JS Bundle. Alternatively, you can also use this Boilerplate in your index.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html lang="en"&amp;gt;
   &amp;lt;head&amp;gt;
      &amp;lt;meta charset="UTF-8"&amp;gt;
      &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
      &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
      &amp;lt;title&amp;gt;Tempreature Unit Converter&amp;lt;/title&amp;gt;
      &amp;lt;!-- ---------------Bootstrap 4.6-------------------------------------- --&amp;gt;
      &amp;lt;link rel="stylesheet"
         href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"
         integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l"
         crossorigin="anonymous"&amp;gt;
      &amp;lt;!-- ---------------Custom CSS-------------------------------------- --&amp;gt;
      &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
   &amp;lt;/head&amp;gt;
   &amp;lt;body class="d-flex align-items-center"&amp;gt;



      &amp;lt;!-- All body content will come here --&amp;gt;




      &amp;lt;!-- ---------------jQery-------------------------------------- --&amp;gt;
      &amp;lt;script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
         integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
         crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;
      &amp;lt;script
         src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"
         integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns"
         crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;
      &amp;lt;!-- ---------------Custom JS-------------------------------------- --&amp;gt;
      &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
   &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.codementor.io/projects/web/temperature-converter-website-atx32dy7mf?utm_source=devto&amp;amp;utm_medium=tempconvertblog" rel="noopener noreferrer"&gt;Why not build this project yourself? Build this project for free.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Start Building
&lt;/h2&gt;

&lt;p&gt;The project will be divided into 5 steps:&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%2Fucarecdn.com%2F275da153-8dcc-4767-ade3-b88f100caa20%2F" 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%2Fucarecdn.com%2F275da153-8dcc-4767-ade3-b88f100caa20%2F" alt="steps.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 0 : Create HTML structure with Bootstrap classes
&lt;/h3&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%2Fucarecdn.com%2Fa7ca8c5b-c4d6-4028-a317-89f9a956673e%2F" 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%2Fucarecdn.com%2Fa7ca8c5b-c4d6-4028-a317-89f9a956673e%2F" alt="image5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the container, then make our card-group. The card-group will contain both input-card and result-card. The structure code will look something like this:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="row"&amp;gt;
    &amp;lt;div class="card-group col-12 col-md-10 offset-md-1 my-md-auto"&amp;gt;
      &amp;lt;!-- Input and Result Section will come here--&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Add the input &amp;amp; result card section with custom CSS class &lt;code&gt;inputSection&lt;/code&gt; to enter input values, and &lt;code&gt;resultSection&lt;/code&gt; to display the result value.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card inputSection col-12 col-md-6"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;form&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"row px-3"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col-12 col-md-11 px-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-title d-block"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Enter Temperature&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"degreeInput"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-sm-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Degree&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"number"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"inputDegree"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"inputDegree"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter Degree"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group-append"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;select&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"selectInputDegreeType"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"C"&lt;/span&gt; &lt;span class="na"&gt;selected&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;deg;&lt;/span&gt;C&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"F"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;deg;&lt;/span&gt;F&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"K"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;K&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"selectConversionType"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-sm-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Convert In&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group d-inline-block"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group-append"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;select&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"selectConversionType"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"F"&lt;/span&gt; &lt;span class="na"&gt;selected&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Fahrenheit (&lt;span class="ni"&gt;&amp;amp;deg;&lt;/span&gt;F) &lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"C"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Celcius (&lt;span class="ni"&gt;&amp;amp;deg;&lt;/span&gt;C)&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"K"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Kelvin (K)&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"convertBtn
                                btn btn-lg
                                col-12 col-md-6
                                offset-md-3
                                mt-4
                                rounded-pill
                                d-flex
                                justify-content-center
                                align-items-center
                                text-white"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Convert&lt;span class="ni"&gt;&amp;amp;emsp;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mt-1"&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"15px"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"15px"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 21.367 20.826"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Icon_awesome-arrow-right"&lt;/span&gt; &lt;span class="na"&gt;data-name=&lt;/span&gt;&lt;span class="s"&gt;"Icon awesome-arrow-right"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M9.085,4.042l1.059-1.059a1.14,1.14,0,0,1,1.617,0l9.271,9.266a1.14,1.14,0,0,1,0,1.617L11.76,23.137a1.14,1.14,0,0,1-1.617,0L9.085,22.078A1.146,1.146,0,0,1,9.1,20.443l5.747-5.475H1.145A1.142,1.142,0,0,1,0,13.823V12.3a1.142,1.142,0,0,1,1.145-1.145H14.85L9.1,5.678A1.138,1.138,0,0,1,9.085,4.042Z"&lt;/span&gt; &lt;span class="na"&gt;transform=&lt;/span&gt;&lt;span class="s"&gt;"translate(0 -2.647)"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"#fff"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card resultSection col-12 col-md-6"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-body d-flex justify-content-center
                align-items-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"resultValueSection"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"convertedDegree"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;32&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"degree"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;deg;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"convertedUnit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;F&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;By finishing the two steps above, we’ve completed the structure part.. Your output will look something like this:&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%2Fucarecdn.com%2Fff80e28b-3d97-4aae-879f-7a757a6d346f%2F" 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%2Fucarecdn.com%2Fff80e28b-3d97-4aae-879f-7a757a6d346f%2F" alt="demo1.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Doesn’t look like our final design? Don’t worry. In the next step, we use custom CSS to style and design our website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Useful references&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/4.6/layout/overview/" rel="noopener noreferrer"&gt;Bootstrap Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/4.6/components/card/" rel="noopener noreferrer"&gt;Bootstrap Cards&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/4.6/components/input-group/" rel="noopener noreferrer"&gt;Bootstrap Input-Groups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://getbootstrap.com/docs/4.6/components/forms/" rel="noopener noreferrer"&gt;Bootstrap Forms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Step 1: Add custom CSS styling
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use the &lt;a href="https://www.notion.so/472681e481af54f417febc5fc8bbee65" rel="noopener noreferrer"&gt;reference code&lt;/a&gt; to add styling or add your own custom styles.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your result will look something like this: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On small screens or mobile:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2Fd84004e0-0e56-4b1b-86d6-47bd124f3358%2F" 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%2Fucarecdn.com%2Fd84004e0-0e56-4b1b-86d6-47bd124f3358%2F" alt="image6.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On medium to large screen or PC:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2Ff7f9db4f-1970-421e-a8b4-4adb5c99dda8%2F" 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%2Fucarecdn.com%2Ff7f9db4f-1970-421e-a8b4-4adb5c99dda8%2F" alt="image7.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we've completed all our styling work at this stage, simply add JS functionality and then the project is ready to deploy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/projects/web/temperature-converter-website-atx32dy7mf?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;You can build this project yourself! Start the project now.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Create convert functions for all three units
&lt;/h3&gt;

&lt;p&gt;It's time to create the functions that will convert our input degree to the desired unit. First, let's understand how this works.&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%2Fucarecdn.com%2Fe9796b80-270f-47b0-9780-e4c27d7f3ca2%2F" 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%2Fucarecdn.com%2Fe9796b80-270f-47b0-9780-e4c27d7f3ca2%2F" alt="Diagram.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our function will take two arguments: &lt;code&gt;input temperature value&lt;/code&gt; and &lt;code&gt;output temperature unit type&lt;/code&gt;. The function will check the output unit type, apply the formula according to the &lt;code&gt;output temperature unit type&lt;/code&gt;, and return the converted value.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fahrenheit Converter ( °F  ⇒&lt;/strong&gt; °C or K &lt;strong&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This function will only convert the Fahrenheit temperature value into Celsius or Kelvin. So whenever the user enters a °F value, we have to call this function. The reference code is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Fahrenheit Converter&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversionDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;conversionDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;F&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;K&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;459.67&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Celsius&lt;/strong&gt; &lt;strong&gt;Converter ( °C  ⇒&lt;/strong&gt; °F or K &lt;strong&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This function will only convert the Celsius temperature value into Fahrenheit or Kelvin. So whenever the user enters a °C value, we have to call this function. The reference code is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Celcius Converter&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;cTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversionDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;conversionDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;F&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;K&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegreeValue&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;273.15&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Kelvin&lt;/strong&gt; &lt;strong&gt;Converter ( K  ⇒&lt;/strong&gt; °F or °C &lt;strong&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This function will only convert Kelvin temperature value into Fahrenheit or Celsius. When a user enters a K value, we have to call this function. The reference code is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Kelvin Converter

function kTo(inputDegreeValue, conversionDegreeType) {

let temperature = '';

switch (conversionDegreeType) {
    case 'K':
        temperature = inputDegreeValue;
        break;
    case 'F':
        temperature = eval((inputDegreeValue - 273.15) * (9 / 5) + 32);
        break;
    case 'C':
        temperature = eval((inputDegreeValue - 273.15));
        break;

}
return temperature;
}
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/search/mentors?q=javascript?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;Got stuck on the project? Find a Javascript expert here!&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Receive user input and send output on webpage
&lt;/h3&gt;

&lt;p&gt;This is where DOM comes in. Whenever user click submit button, the output should appear in the results section. We'll do this by creating a function, &lt;code&gt;convertInputDegree()&lt;/code&gt;. This function will take the user inputs, check the type of input degree unit, and call the function we created in step 2.&lt;/p&gt;

&lt;p&gt;If the user has entered a Celsius degree unit and wants to convert it into Kelvin, the function will take the &lt;code&gt;input degree value&lt;/code&gt; and &lt;code&gt;input degree unit&lt;/code&gt; and call the &lt;code&gt;cTo()&lt;/code&gt; function. Then the &lt;code&gt;cTo()&lt;/code&gt; function will check the &lt;code&gt;output unit type&lt;/code&gt; and returns the appropriate result. The result will be stored in a variable &lt;code&gt;resultValue&lt;/code&gt; and the value will be pushed into the result section.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;As we want the &lt;code&gt;input value&lt;/code&gt; when user submit the form but default behavior of form after submit button is clicked to take the input values from user level to server level and page will be redirect to the current URL by appending the input values as query string parameters and value of the input field will revert back to &lt;strong&gt;0&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;That's why on form submission we are calling &lt;code&gt;convertInputDegree()&lt;/code&gt;  instead of it's default action.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// On Form submission prevent the default action and call the function to update the result&lt;/span&gt;

&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;form&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// to prevent the default action&lt;/span&gt;
    &lt;span class="nf"&gt;convertInputDegree&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create &lt;code&gt;convertInputDegree()&lt;/code&gt; function to update results.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;convertInputDegree&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;inputDegree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#inputDegree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;val&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;selectInputDegreeType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#selectInputDegreeType&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;val&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;conversionType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#selectConversionType&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;val&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;resultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectInputDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;C&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;resultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;cTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversionType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;F&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;resultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversionType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;K&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;resultValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;kTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversionType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// To prevent NaN&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegree&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#convertedDegree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// To update the Degree Unit&lt;/span&gt;
    &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#convertedUnit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;conversionType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// To update the Degree Value&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;conversionType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;selectInputDegreeType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#convertedDegree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputDegree&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#convertedDegree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resultValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/search/mentors?q=javascript?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;Got questions? Find a Javascript expert to help you.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: &lt;strong&gt;Update results in real-time&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We’re almost finished building our temperature converter! However, there’s one but if the users have to click the submit button again and again, it will provide a bad user experience. We can fix this by updating the output value in real-time. To do this, we can call the function &lt;code&gt;convertInputDegree()&lt;/code&gt; when users select a different input or output unit. The code should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Realtime Update&lt;/span&gt;
&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#inputDegree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;convertInputDegree&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#selectInputDegreeType&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;change&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;convertInputDegree&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#selectConversionType&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;change&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;convertInputDegree&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;Once we've completed all of the above steps, this is what the final preview will look like:&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%2Fucarecdn.com%2F891c854f-e22b-4dd9-9d9f-98b66a9e217e%2F" 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%2Fucarecdn.com%2F891c854f-e22b-4dd9-9d9f-98b66a9e217e%2F" alt="result.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/projects/web/temperature-converter-website-atx32dy7mf?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;Want to build this project? Start building now!&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Time to deploy
&lt;/h2&gt;

&lt;p&gt;The last thing to do is to deploy the website using GitHub pages. In order to use GitHub pages, we have to make a GitHub repository for this project first.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. &lt;strong&gt;Create a GitHub repository&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open your browser and go to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;https://github.com/&lt;/a&gt; and make sure you're logged In. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the &lt;code&gt;+&lt;/code&gt; icon on the navbar in the top right corner:&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%2Fucarecdn.com%2Fa9609733-47e2-4c60-9bea-06314902c7b9%2F" 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%2Fucarecdn.com%2Fa9609733-47e2-4c60-9bea-06314902c7b9%2F" alt="deploy1.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on &lt;code&gt;New repository&lt;/code&gt; in the drop-down box:&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%2Fucarecdn.com%2F65b7653d-4af0-4133-b528-4cfd7175b3e6%2F" 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%2Fucarecdn.com%2F65b7653d-4af0-4133-b528-4cfd7175b3e6%2F" alt="deploy2.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the name of the repository, keep everything default, and click &lt;code&gt;Create repository&lt;/code&gt; on the new page:&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%2Fucarecdn.com%2Fe3cf09b3-d6d3-4fb4-9c4d-21eeca557bbd%2F" 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%2Fucarecdn.com%2Fe3cf09b3-d6d3-4fb4-9c4d-21eeca557bbd%2F" alt="deploy3.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Our repository has been created. Copy the highlighted line to VSCode:&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%2Fucarecdn.com%2F8567e0a0-0da0-4675-bab7-f741bc51d473%2F" 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%2Fucarecdn.com%2F8567e0a0-0da0-4675-bab7-f741bc51d473%2F" alt="deploy4.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  2. &lt;strong&gt;Initialize Git in your project&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open a new terminal in VSCode and type this command. This command will:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git branch &lt;span class="nt"&gt;-M&lt;/span&gt; master
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Your message"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Sync our online GitHub repository with local repository&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin https://github.com/karan-kmr/Temperature-unit-converter.git
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Command to push or send your files to the online repository:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Refresh the GitHub repository page:&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%2Fucarecdn.com%2F0bba6f62-0fa3-4e0e-b2f3-a683400c2e29%2F" 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%2Fucarecdn.com%2F0bba6f62-0fa3-4e0e-b2f3-a683400c2e29%2F" alt="deploy5.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All of our project files have been pushed to our GitHub repo. &lt;/p&gt;

&lt;p&gt;There are only two more steps to making our website live! 💪🏼&lt;/p&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Setup GitHub Pages&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here are the steps to setup GitHub pages for your project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;code&gt;Settings&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Scroll down and click on &lt;code&gt;pages&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change branch from &lt;code&gt;none&lt;/code&gt; to &lt;code&gt;master&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;code&gt;Save&lt;/code&gt; button&lt;/li&gt;
&lt;li&gt;Our site is live 🎉&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the steps above aren't clear enough, here's a video to help you out:&lt;/p&gt;

&lt;p&gt;@&lt;a href="https://youtu.be/bK5s0HhiORI" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="https://www.codementor.io/project-solutions/cq6kpyhvu9?ref=tempconvertblog" rel="noopener noreferrer"&gt;Project Demo&lt;/a&gt; and &lt;a href="https://github.com/karan-kmr/temperature-converter" rel="noopener noreferrer"&gt;Source Code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recap
&lt;/h2&gt;

&lt;p&gt;Here are some of the things we created in this tutorial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A full structure using Bootstrap classes.&lt;/li&gt;
&lt;li&gt;A fully responsive website.&lt;/li&gt;
&lt;li&gt;A temperature converter that allows users to cover from Fahrenheit, Celsius, and Kelvin to each other.&lt;/li&gt;
&lt;li&gt;A website that updated the output in real time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Congratulations! 🎉 You've successfully created a temperature converter website.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/projects?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=tempconvert" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2F82725990-3199-485a-a2d1-3b85aed0479d%2F" alt="alpaca.gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>JavaScript Splice: What is JavaScript Splice and What Can It Do?</title>
      <dc:creator>jenniferfu0811</dc:creator>
      <pubDate>Tue, 03 Aug 2021 05:18:39 +0000</pubDate>
      <link>https://dev.to/codementor/javascript-splice-what-is-javascript-splice-and-what-can-it-do-1fan</link>
      <guid>https://dev.to/codementor/javascript-splice-what-is-javascript-splice-and-what-can-it-do-1fan</guid>
      <description>&lt;p&gt;Imagine that you have a list of restaurants that you want to try out, and after finally getting dinner at one of them, you don’t just want to cross the restaurant off your list, but you want to remove it completely. &lt;/p&gt;

&lt;p&gt;So you remove the restaurant that you’ve tried, and now your original list only has the restaurants you’ve yet to try. Right here, we’ve described one of the things JavaScript splice can do. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is the JavaScript splice method and what can it do?
&lt;/h2&gt;

&lt;p&gt;Okay, let’s back up a little bit. We’ve described what JavaScript splice can do, but what is it exactly? &lt;/p&gt;

&lt;p&gt;The JavaScript splice() method is a built-in method for JavaScript array functions. Splice modifies the original array by removing, replacing, or adding elements. The return value is a new array containing the deleted elements. If no elements are removed, an empty array is returned. The basic syntax for JavaScript splice is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array.splice(start, removeCount, newItem, newItem, newItem, ...)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to remove elements from an array with JavaScript splice
&lt;/h2&gt;

&lt;p&gt;To simply remove an element from an array using JavaScript splice, you would need to know the index number of the element you would like to remove. &lt;/p&gt;

&lt;p&gt;Going back to the example we brought up at the beginning of this tutorial. Say our restaurant bucket list consisted of A, B, C, and D, this would be the original array. The restaurant that we tried would be D. To remove D, we would need to know its index number. Since the array index starts at 0, the index would be (X-1). In this case, the index number would be 3. &lt;/p&gt;

&lt;p&gt;Now, we can use the JavaScript slice method to remove the restaurant we’ve already visited from the original array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const restaurants = [“A”, “B”, “C”, “D”]

console.log(restaurants.splice(3, 1)) // output: [“D”]
console.log(restaurants) // output: [“A”, “B”, “C”]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we can see that the original array has been spliced into two: the original array with the remaining elements, and the return value is an array with the removed element(s).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To learn more about how to use JavaScript splice to remove elements from an array, check out &lt;a href="https://www.codementor.io/blog/javascript-array-alukt4k2bm"&gt;this blog post&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to add elements to an array with JavaScript splice
&lt;/h2&gt;

&lt;p&gt;You can add new elements to an array using JavaScript splice as well. Keeping the full splice syntax in mind, you can add new elements by defining the number of elements you’d like to remove as “0” and before declaring the new elements. &lt;/p&gt;

&lt;p&gt;For example, let’s add E to our array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const restaurants = [“A”, “B”, “C”, “D”]

console.log(restaurants.splice(3, 0,”E”)) // output: []
console.log(restaurants) // output: [“A”, “B”, “C”, “E”, “D”]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This also works if you’d like to both remove and add elements to your array. For example, let’s remove D from the above array and add F and G in D’s location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const restaurants = [“A”, “B”, “C”, “D”]

console.log(restaurants.splice(3, 0,”E”)) // output: [“D”]
console.log(restaurants) // output: ["A", "B", "C", "F", "G"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Splice vs Slice: What is the difference between the two JavaScript methods?
&lt;/h2&gt;

&lt;p&gt;One confusion that many JavaScript developers might have is splice vs slice: are they the same? If not, what is the difference? They sound awfully similar! &lt;/p&gt;

&lt;p&gt;While both splice and slice are built-in JavaScript methods and sound very similar, they actually play different roles. Both JavaScript splice and slice can be used to manipulate items in an array.&lt;/p&gt;

&lt;p&gt;However, as mentioned above, the JavaScript splice method directly modifies the original array, and, if there are any, returns an array of the removed elements. On the other hand, the JavaScript slice method does not modify the original array, but returns a new array that is a “section” of the original array. You can define the “start” and “end” of the selection that you want the slice method to return. &lt;/p&gt;

&lt;p&gt;After reading this article, you should have a basic understanding of how to use JavaScript splice. While it looks simple, don’t underestimate all the magic that the splice method can do. If you want to learn more about what you can do with splice, &lt;a href="https://www.codementor.io/javascript-experts?ref=blog"&gt;find a mentor&lt;/a&gt; to help you master JavaScript step by step!  &lt;/p&gt;

&lt;h3&gt;
  
  
  Related links:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice"&gt;JavaScript Splice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice"&gt;JavaScript Slice&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/javascript-experts?ref=blog"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IPp-IkxW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/3ee2b453-533f-4f0b-b37e-4be97348757e/" alt="JavaScript Splice JavaScript Help JavaScript Mentor.png"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to Create An Array in Python and other things you need to know about Python Array</title>
      <dc:creator>jenniferfu0811</dc:creator>
      <pubDate>Thu, 29 Jul 2021 03:40:50 +0000</pubDate>
      <link>https://dev.to/codementor/how-to-create-an-array-in-python-and-other-things-you-need-to-know-about-python-array-2c3j</link>
      <guid>https://dev.to/codementor/how-to-create-an-array-in-python-and-other-things-you-need-to-know-about-python-array-2c3j</guid>
      <description>&lt;p&gt;Arrays are a powerful and useful module. In Python, there are two ways you can create an array: using the Python Standard Library or the NymPy package.&lt;/p&gt;

&lt;p&gt;If you’re just starting out or would simply like to create an array with simple data types, the array module from the Python standard library would suffice. However, as Python is being widely used for data science, num.py array can often be seen as the de facto standard as it’s more flexible and robust.&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll focus on using the array module in the Python standard library. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Python array and what can they do?
&lt;/h2&gt;

&lt;p&gt;Python arrays are data structures that can store multiple items of the same type, for example, you can have an array of strings. When you’re working with multiple items of the same data type, arrays make it easy to store, organize, remove elements, and manipulate the values. &lt;/p&gt;

&lt;p&gt;This can sound confusing if you’re just starting out with Python arrays. So here’s another way to think about it: say that you’re organizing your bookshelf and have a list of book titles. You might want to store this list in a place you can easily access should you ever want to organize the titles, remove, or retrieve certain information. In Python, this list of titles would be stored in an array. &lt;/p&gt;

&lt;p&gt;A common confusion you might encounter is the difference between Python array vs list. The key difference is the types of values that the two can store. While arrays can only store items of the same data type, lists can store a variation of different data types. Taking the bookshelf example from above, if your bookshelf also contains decorative items, such as potted plants, your list of bookshelf items would need to be stored in a Python list.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create an array in Python
&lt;/h2&gt;

&lt;p&gt;Now that you know what an array is, the next step is to create a Python array. Let’s start with a simple example: to create an array in Python, you’ll need two parameters: data type and value list. Data type is the type of value that you want to store. Continuing the previous book list example, the data type here would be books, while the values would be the book titles. &lt;/p&gt;

&lt;p&gt;Your basic syntax would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(data type,value list)`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the bookshelf example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince]) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How do you access an element in a Python array?
&lt;/h2&gt;

&lt;p&gt;Each element in the array has an index number, starting with 0. This allows you to access an element in an array. The basic syntax will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array_name[index value]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the previous example, say you want to access the second element in the array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince]) 
a[1]=Game of Thrones
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How can you know a Python array length?
&lt;/h2&gt;

&lt;p&gt;By understanding how the index number works, you can also figure out the Python array length. As the index number starts from 0, the Python array length will be 1 more than the last index number. Another way is to use the &lt;code&gt;len()&lt;/code&gt; function to figure out the Python array length:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(books, [Harry Potter, Game of Thrones, Narnia, The Hobbit, The Little Prince])
len(a)=5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to remove an element from a Python array?
&lt;/h2&gt;

&lt;p&gt;There are quite a few ways to remove elements from a Python array. &lt;/p&gt;

&lt;p&gt;If you would like to delete an element based on their index number, you can use Python's &lt;code&gt;del&lt;/code&gt; statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(books, [harry potter, game of thrones, narnia, the hobbit, the little prince])
del books[2]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, you are deleting the third element from the Python array, “Narnia”. To use this method, you need to know the index number of the element you’d like to remove.&lt;/p&gt;

&lt;p&gt;But what if you’re not sure where the element you’d like to remove is? In this case, you can use Python’s &lt;code&gt;remove()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a=array(books, [harry potter, game of thrones, narnia, the hobbit, the little prince])
del books[harry potter]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using the &lt;code&gt;remove()&lt;/code&gt; method, you’ll be able to locate and remove a specific element without needing to know its index number. &lt;/p&gt;

&lt;p&gt;If you want to learn more about what you can do with Python arrays, you can check out &lt;a href="https://www.edureka.co/blog/arrays-in-python/" rel="noopener noreferrer"&gt;this tutorial&lt;/a&gt; or &lt;a href="https://www.codementor.io/python-experts?ref=blog" rel="noopener noreferrer"&gt;find a senior developer&lt;/a&gt; to help you master Python step by step! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codementor.io/python-experts?ref=blog" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2F607354aa-a030-432a-8537-8223c621224f%2F" alt="Python Array Python Help Python tutor.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We covered the basics of Python arrays in this article, but this is just the tip of the iceberg. Once you’re familiar with the array module from the Python standard library, you can expand to learn more about using arrays with the NumPy package, which is often seen as the standard array function in Python and in data science nowadays. &lt;/p&gt;

&lt;p&gt;More resources on Python arrays: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/python-convert-array-ordinary-list-items/" rel="noopener noreferrer"&gt;Convert a Python array to list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.programiz.com/python-programming/array#:~:text=Removing%20Python%20Array%20Elements,array%20using%20Python's%20del%20statement.&amp;amp;text=We%20can%20use%20the%20remove,item%20at%20the%20given%20index." rel="noopener noreferrer"&gt;Remove element from array in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/python-program-to-find-sum-of-array/" rel="noopener noreferrer"&gt;Find sum of array in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://problemsolvingwithpython.com/05-NumPy-and-Arrays/05.06-Array-Slicing/" rel="noopener noreferrer"&gt;How to slice an array in Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>JavaScript Tutorial: Removing A Specific Element From An Array </title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Mon, 22 Feb 2021 04:50:22 +0000</pubDate>
      <link>https://dev.to/codementor/javascript-tutorial-removing-a-specific-element-from-an-array-1i73</link>
      <guid>https://dev.to/codementor/javascript-tutorial-removing-a-specific-element-from-an-array-1i73</guid>
      <description>&lt;p&gt;Have you ever been stuck trying to remove a specific item from an array? Imagine this: you are working on a shopping cart delete feature where you need to delete an item that the user doesn't want anymore. How would you go about using JavaScript's native array methods to remove that product ID from your shopping cart array? &lt;/p&gt;

&lt;p&gt;In this tutorial, we are going to look at how to remove a specific item from an array using JavaScript's native array methods: splice and filter.&lt;/p&gt;

&lt;p&gt;Watch the tutorial &lt;a href="http://www.youtube.com/watch?v=P69ItyngM-0"&gt;here&lt;/a&gt; or click on the image below to get started.&lt;br&gt;
&lt;a href="http://www.youtube.com/watch?v=P69ItyngM-0"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---yNFwcmW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fd968ed7-f894-4576-bbca-741e1def5a18/" alt="javascript video tutorial remove element from array"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Method 1: Splice Method
&lt;/h2&gt;

&lt;p&gt;First off, what does the &lt;code&gt;splice&lt;/code&gt; method do?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Splice&lt;/code&gt; changes the contents of the array by removing, replacing, or adding new elements. The return value of the splice method is a new array containing the deleted elements.&lt;/p&gt;

&lt;p&gt;Let's take a look at what that means.&lt;/p&gt;
&lt;h3&gt;
  
  
  Splice mutates the original code
&lt;/h3&gt;

&lt;p&gt;Below is our array filled with fruits and a unicorn. To remove an item using splice, the first parameter is the index of the item we want to remove. The unicorn is in index 2. The second parameter determines how many items you want to delete, which will be 1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ["🥝", "🍓", "🦄", "🍊", "🍋"];

console.log(fruits.splice(2, 1)) // outputs: ["🦄"]

console.log(fruits); // output: ["🥝", "🍓", "🍊", "🍋"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how the output of the splice function returns the unicorn in an array, whereas &lt;code&gt;fruits&lt;/code&gt; array has changed to a unicorn-free fruit salad. &lt;/p&gt;

&lt;p&gt;Something to be extra careful about is &lt;strong&gt;when using splice, the original array is mutated&lt;/strong&gt;, meaning you are changing the original array.&lt;/p&gt;

&lt;h3&gt;
  
  
  But what if we don't want to mutate the original array?
&lt;/h3&gt;

&lt;p&gt;Let's look back at the &lt;code&gt;fruits&lt;/code&gt; array again. We don't know where the unicorn is. Here, we will be using the &lt;strong&gt;arrow function syntax in ES6&lt;/strong&gt;. We're going to copy the array, find the index, and splice it!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ["🥝", "🍓", "🦄", "🍊", "🍋", "🦄"];
const removeItem = (arr, item) =&amp;gt; {
  let newArray = [...arr];
  const index = newArray.findIndex((item) =&amp;gt; item === "🦄");
    if (index !== -1) {
     newArray.splice(index, 1);
      return newArray;
    }
};

console.log(removeItem(fruits, "🦄")); // output: ["🥝", "🍓", "🍊", "🍋", "🦄"]

console.log(fruits); // output: ["🥝", "🍓", "🦄", "🍊", "🍋", "🦄"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will create a function that takes an array and item as parameters. &lt;/p&gt;

&lt;p&gt;First, to copy the array, we will use the spread operator. This way we won't mutate the data. &lt;/p&gt;

&lt;p&gt;Next, we will use the &lt;code&gt;findIndex&lt;/code&gt; method. This will find the &lt;strong&gt;first&lt;/strong&gt; element that satisfies the condition function. But if it returns -1, then it means there wasn't the element that fit the condition. &lt;/p&gt;

&lt;p&gt;To use the &lt;code&gt;findIndex&lt;/code&gt; method, we will type in the condition we want it to satisfy. &lt;/p&gt;

&lt;p&gt;Finally, to make sure we found the unicorn, we will check that the variable &lt;code&gt;index&lt;/code&gt; does not equal to -1, before splicing it to remove the item. &lt;/p&gt;

&lt;p&gt;Recall how the &lt;code&gt;splice&lt;/code&gt; method's first parameter is the index you want to change, and the second parameter is how many elements you want to remove in the array. Finally, We will need to return the variable &lt;code&gt;newArray&lt;/code&gt; to be able to get the output. &lt;/p&gt;

&lt;p&gt;So here we see that the output for the &lt;code&gt;removeItem&lt;/code&gt; function is an array of just fruits, and the original &lt;code&gt;fruits&lt;/code&gt; array remains unchanged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You might've noticed there was more than one unicorn in the above code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because &lt;code&gt;findIndex&lt;/code&gt; will only return the first element that satisfies the condition, we are still left with another unicorn.&lt;/p&gt;

&lt;p&gt;So if you need to handle duplicates, there's a more straightforward way we'll show you in the next method. &lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Filter Method
&lt;/h2&gt;

&lt;p&gt;Unlike &lt;code&gt;splice&lt;/code&gt; which mutates the data, &lt;code&gt;filter&lt;/code&gt; creates &lt;strong&gt;a new array with elements that fit the condition&lt;/strong&gt;. We can also handle duplicates this way, as it checks against every single element in the array.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;filter&lt;/code&gt; method is very similar to &lt;code&gt;findIndex&lt;/code&gt;, in that the first parameter is a conditional function.&lt;/p&gt;

&lt;p&gt;When we output &lt;code&gt;newArray&lt;/code&gt;, notice how both of the unicorns are removed, and when we &lt;code&gt;console.log(fruits)&lt;/code&gt; again, it's still the original array .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ["🥝", "🍓", "🦄", "🍊", "🍋", "🦄"];
const newArray = fruits.filter((item) =&amp;gt; item !== "🦄");

console.log(newArray); // output: ["🥝", "🍓", "🍊", "🍋"]
console.log(fruits); // output: ["🥝", "🍓", "🦄", "🍊", "🍋", "🦄"];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Removing Duplicates
&lt;/h3&gt;

&lt;p&gt;Filter can directly handle duplicates, while splice needs extra help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Mutation
&lt;/h3&gt;

&lt;p&gt;We need to be aware of the data mutation in these methods, for instance, &lt;code&gt;splice&lt;/code&gt; changes the original array, while &lt;code&gt;filter&lt;/code&gt; creates a brand new array.&lt;/p&gt;

&lt;p&gt;There are many ways to remove a specific item in an array. Splice and filter are some of the common ways using native JavaScripts array methods. &lt;/p&gt;

&lt;p&gt;We also shared the video tutorial on our Youtube channel &lt;a href="http://www.youtube.com/watch?v=P69ItyngM-0"&gt;here&lt;/a&gt;! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn JavaScript by building projects on &lt;a href="https://www.codementor.io/javascript-projects"&gt;DevProjects&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Introducing DevProjects - Learn Programming by Building Projects</title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Fri, 18 Dec 2020 10:23:50 +0000</pubDate>
      <link>https://dev.to/codementor/introducing-devprojects-learn-programming-by-building-projects-282k</link>
      <guid>https://dev.to/codementor/introducing-devprojects-learn-programming-by-building-projects-282k</guid>
      <description>&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%2Fi%2Fzy3bwjnisqxgmk61qlb0.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%2Fi%2Fzy3bwjnisqxgmk61qlb0.png" alt="DevProjects by Codementor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What are the best Python projects for beginners?”&lt;br&gt;&lt;br&gt;
“Where can I find JavaScript projects?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Chances are, if you’re learning programming, you’ve googled a variation of the above questions at one point or another. Through Codementor, we heard that a lot of our users did too. We asked ourselves: does it really have to be this hard? &lt;/p&gt;

&lt;p&gt;So we had many brainstorm sessions fueled by caffeine and sugar, and reached out to some mentors and users for feedback. We had one goal: to create a simple tool that anyone learning programming would find helpful.&lt;/p&gt;

&lt;p&gt;After much discussion, we understood two things. First, one of the hardest things about learning programming is transitioning from theory to real world code; and two: it’s more interesting to learn programming with actual projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter &lt;a href="https://www.codementor.io/projects?utm_campaign=alpaca01&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;DevProjects&lt;/a&gt;
&lt;/h3&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%2Fi%2Fgt65ogs59eizx83ln2kx.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%2Fi%2Fgt65ogs59eizx83ln2kx.png" alt="DevProjects by Codementor"&gt;&lt;/a&gt;&lt;br&gt;
Or, as our team affectionately calls it, Project Alpaca (because alpacas are social and inquisitive animals).&lt;/p&gt;

&lt;p&gt;We intentionally designed &lt;a href="https://www.codementor.io/projects?utm_campaign=alpaca01&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;DevProjects&lt;/a&gt; to help you seamlessly transition from “hello world” to real world programming. We also aimed to make this process easy, interesting, interactive, and best of all, fun.&lt;/p&gt;

&lt;p&gt;DevProjects is a community where everyone learning programming has free and easy access to projects for learners. Users can learn through discussing the project with peers and mentors, as well as sharing and receiving feedback on their code. &lt;/p&gt;

&lt;h3&gt;
  
  
  What projects are on DevProjects?
&lt;/h3&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%2Fi%2F1pxnpoqccdavvwn56zni.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%2Fi%2F1pxnpoqccdavvwn56zni.png" alt="DevProjects by Codementor- project-based learn programming"&gt;&lt;/a&gt;&lt;br&gt;
DevProjects has a growing collection of curated projects for web development, mobile apps, and automation/tools. Project difficulties range from very beginner to the more advanced. &lt;/p&gt;

&lt;p&gt;We worked with mentors and senior developers to design projects that would help you bridge the gap between theory and practice. Not only is each project specifically constructed to address problems you might face when applying your skills in the real world, the projects provide context and are limited in scope. This gives you a sense of how developers work with a product team or as a freelancer. &lt;/p&gt;

&lt;h3&gt;
  
  
  Other than the curated projects, why should I use DevProjects?
&lt;/h3&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%2Fi%2F2en1w20brozrrb6m69hr.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%2Fi%2F2en1w20brozrrb6m69hr.png" alt="DevProjects by Codementor - learn programming by building projects"&gt;&lt;/a&gt;&lt;br&gt;
Learning programming is hard enough, especially when you’re stuck with a project and don’t know where to start untangling the mess.&lt;/p&gt;

&lt;p&gt;But there’s no need to do it alone.&lt;/p&gt;

&lt;p&gt;DevProjects is designed to be an open and interactive community. Users are encouraged to discuss the best way to approach a project with peers and mentors, and learn how to see a project from different perspectives. You can also share your code, receive feedback, as well as get code reviews and pointers on how to improve. &lt;/p&gt;

&lt;p&gt;We designed &lt;a href="https://www.codementor.io/projects?utm_campaign=alpaca02&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;DevProjects&lt;/a&gt; for you and others that are learning programming. Since learning programming is already a difficult task in itself, we wanted to help shrink the gap between theory and real world application. We hope that DevProjects will help you bridge that gap, and pave the way to your programming journey success. &lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://www.codementor.io/projects?utm_campaign=alpaca02&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;DevProjects&lt;/a&gt; if you haven’t already, and we’d love to hear what you think! &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>codenewbie</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Learning Django Through Problem-Solving: How A Lawyer Built His Side Project</title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Wed, 02 Sep 2020 09:20:18 +0000</pubDate>
      <link>https://dev.to/codementor/learning-django-through-problem-solving-how-a-lawyer-built-his-side-project-4b1l</link>
      <guid>https://dev.to/codementor/learning-django-through-problem-solving-how-a-lawyer-built-his-side-project-4b1l</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“I’m not looking to be a programmer. I just want to build State of K, but at this point, I’ve probably already learned every topic in Django.” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ingram, a full-time lawyer and creator of &lt;a href="http://stateofk.com/"&gt;State of K&lt;/a&gt;, the Q-and-A website where users can answer their own questions based on academic studies, started his programming journey with a very clear goal and a very vague idea of how. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rht82shP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/82eb70ff-07f3-478a-9af8-ece5f08ffa29/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rht82shP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/82eb70ff-07f3-478a-9af8-ece5f08ffa29/" alt="StateofK.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“For many years, I had the idea of a site that I wanted to exist,” Ingram explained, “There are certain types of questions — empirical questions — where the best available answer comes from published studies, rather than someone’s opinion. But there are too many obstacles to understanding what those studies say. I wanted to solve that problem.” &lt;/p&gt;

&lt;p&gt;Under normal circumstances, someone with barely any programming knowledge would choose to hire an expert developer to build their product. “I would liken it to a work of art,” Ingram explained, “You can’t commission an artist if you don’t know yet what you want the drawing to look like.” He went on to share that as he didn’t have a clear image of how the question-answer website would work, he wanted the freedom to be able to play around with the code. And as he had no idea what he would ask the developer to do, Ingram figured it would be easier to control the budget by building it himself. &lt;/p&gt;

&lt;p&gt;So only equipped with the basic HTML and CSS learned at the turn of the century, he tried creating a website mockup by making a table with HTML “Because that’s what people did in 2001.” It got the job done, but he also quickly realized that his knowledge was outdated, and certainly not enough to bring the idea he had in his head to life.&lt;/p&gt;

&lt;p&gt;After lots of research, Ingram theorized a “very complicated way” to build the website and set out to find a mentor or senior developer that could give him feedback. “The first person I met on &lt;a href="http://www.codementor.io/?utm_source=devto&amp;amp;utm_campaign=outreach"&gt;Codementor&lt;/a&gt; told me my implementation plan was totally wrong,” he laughed. Luckily, it wasn’t all in vain as the mentor pointed him in the right direction: to learn Django. &lt;/p&gt;

&lt;p&gt;And so he did. But as a full-time lawyer with limited free time, Ingram needed a way to learn code that could fit into his busy schedule. But traditional teaching methods weren’t a good fit: “With bootcamps, you need to be physically on site or adhere to their teaching schedule.” Instead, he started teaching himself by buying a book, watching Youtube videos, and  purchasing several Udemy courses. &lt;/p&gt;

&lt;p&gt;After a while, he realized he was making decisions that would have a butterfly effect on future decisions. He figured he could either continue puzzling together advice from YouTube videos, or work with a mentor that knew what they were doing and could help him make better decisions. &lt;/p&gt;

&lt;p&gt;He chose the latter. &lt;/p&gt;

&lt;p&gt;Ingram chatted with a couple of mentors and eventually found &lt;a href="https://www.codementor.io/@jessamynsmith?utm_source=devto&amp;amp;utm_campaign=outreach"&gt;Jessamyn&lt;/a&gt;, a mentor he’s been consistently working with for years now. They started out working together a couple of times a week before increasing it to multiple times a week as his project (and budget) increased. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One surprising takeaway was how helpful working with a mentor was for learning the most basic things. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;“It was like my 10th session, when Jessamyn asked off-handedly where I was saving my code,” he shared. And like most non-technical people, Ingram saved the project on his laptop. In that session, he learned about Git, how to use it, and how a programmer would actually run a project. “Of course, there are YouTube videos on how to use Git, but if you don’t know that it exists, you wouldn’t know to search for it in the first place.” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SHwq2ek0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/4eb41a34-5f68-4aa2-96f7-7bb2d5926852/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SHwq2ek0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/4eb41a34-5f68-4aa2-96f7-7bb2d5926852/" alt="State of K quote-Codementor.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“I’m not interested in becoming a developer. I’m just interested in building a specific project,” he emphasized when we talked about his learning journey. With traditional learning models, the foundation building, while critical, did not fit into Ingram’s schedule. “The problem with the foundation learning model for me is that I don’t understand why the content will be useful until many months later by which time I’ve forgotten the lesson and have to relearn it. ” &lt;/p&gt;

&lt;p&gt;He uses a goal-oriented approach when learning. “I usually know what I want to create,” Ingram said about his learning process. He spends time going through online resources and documentation — “the free official documentation for Python and Django have been the most useful” — before coming up with an implementation plan he shares with the mentor. “I try to do as much as I can on my own, and get Jessamyn’s approval early on,” he shared, “It’s an iterative process. Usually, if I’ve put enough thought into it beforehand, the concept works out the first time, but sometimes considerations that I never even thought of pop up once I start implementing."&lt;/p&gt;

&lt;p&gt;However, with a demanding full-time job, there are days when he tries to shortcut the learning process: “It’s usually after I’ve pulled a couple of all nighters at work, or I reasonably believe that I won’t encounter a specific issue again.” During these sessions, he’ll learn by watching the mentor code and ask questions as she goes, which is much less demanding. “But I have to say, in almost every case, I end up encountering the problem again and have to spend more money and time to master what she did,” he said, “It usually pays to just pay attention and learn it properly the first time.” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3ErrjxzC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6c465708-4022-4c74-b1a2-7f3ee79ef76b/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3ErrjxzC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6c465708-4022-4c74-b1a2-7f3ee79ef76b/" alt="Codementor Learn Django.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s been four years since Ingram started on his programming journey, and State of K is steadily growing its user base. While his learning process can be described as “problem solving”, at this point, he’s “probably already learned every topic in the Django library and could apply that knowledge to other projects.” This has been echoed by his mentor, Jessamyn: “Ingram showed incredible growth as a developer over the several years I was actively mentoring him. He went from a novice to being able to develop quite complex features.”&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Have I learned Django more slowly than someone else? Definitely. But I've also done it while working a full-time job, which I think is also pretty great."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;This post was originally published on &lt;a href="https://www.codementor.io/blog/django-lawyer-a5j3og2tox?utm_source=devto&amp;amp;utm_campaign=outreach"&gt;Codementor&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>learnprogramming</category>
      <category>django</category>
      <category>selftaught</category>
      <category>developer</category>
    </item>
    <item>
      <title>[Dev Journey] He's Using His National Athlete Experience to Build A Language Learning App </title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Wed, 12 Aug 2020 03:42:29 +0000</pubDate>
      <link>https://dev.to/codementor/dev-journey-he-s-using-his-national-athlete-experience-to-build-a-language-learning-app-2dgi</link>
      <guid>https://dev.to/codementor/dev-journey-he-s-using-his-national-athlete-experience-to-build-a-language-learning-app-2dgi</guid>
      <description>&lt;p&gt;&lt;em&gt;In this series, we're shining the spotlight on members of the &lt;a href="https://www.codementor.io?utm_source=devto"&gt;Codementor&lt;/a&gt; community. They share their journey to becoming a developer — the highs, the lows, and the inbetweens. This story was written by Mitchell Gould, a national athlete turned tech entrepreneur.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I was 10 years old, my father came into my room and asked "how would you like to climb Kilimanjaro?" I, of course, jumped at the idea, not having the faintest idea what a Kilimanjaro was or where it was located. My father never mentioned the topic again. But the seed was planted and if you keep reading, you will find out how IT enabled me to conquer that mountain.&lt;/p&gt;

&lt;p&gt;I have been asked to write about how my varied background in a multitude of careers has helped me at being an entrepreneur. But after developing an aversion to labels at a very young age, I don't really think of  myself as an entrepreneur. &lt;/p&gt;

&lt;p&gt;My family moved from New York to Toronto when I was very young. I wanted to fit in, so I decided I would become a hockey player. This was Canada after all. But as luck would have it, my mother watched a hockey match shortly before I asked. And jaded by the blood and violence of the game, she, in classic mother fashion, replied with four words: over my dead body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fBV6DoTd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fe473565-a4dc-4cc0-bfe9-9a180fe0284f/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fBV6DoTd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/fe473565-a4dc-4cc0-bfe9-9a180fe0284f/" alt="Mitchell Gould Codementor story 1.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead, I was enrolled in figure skating and conned into believing that all great hockey players took figure skating lessons. When the kids at school found out, I was teased, ridiculed, and frequently beaten. I learned that I had to hide risky labels if I wanted to be safe. By ignoring the labels, I found myself focusing on the skills and practices associated with them.&lt;/p&gt;

&lt;p&gt;This rejection of labels has had the positive side effect of helping me to be less judgmental of myself and others. I also believe it has freed me to pursue a multitude of careers in completely unrelated fields such as (in no particular order): &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;international competitor on Canada's National Figure Skating Team &lt;/li&gt;
&lt;li&gt;brain researcher associated with the  Canadian Aerospace Medical Research Unit &lt;/li&gt;
&lt;li&gt;a Cordon Bleu certified chef at the renowned Olive and Gourmando Cafe&lt;/li&gt;
&lt;li&gt;write and produce movies, one of which won the National Drama Prize &lt;/li&gt;
&lt;li&gt;CELTA certified teacher at 3 universities in Chiang Mai, Thailand &lt;/li&gt;
&lt;li&gt;graduate from the Information Technology Institute and build my own IT projects&lt;/li&gt;
&lt;li&gt;buddhist monk in Cambodia as part of a project to restart Buddhism in rural communities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I find most fascinating is how each of these careers surprised me with challenges to develop myself, gain new skills I never would have imagined, and how these skills translated from one career to the other.&lt;/p&gt;

&lt;p&gt;For example, as a chef, you would expect to spend your time cooking things like Veloutés, Cassoulet, or Confit de canard. But I actually spent a great deal of my time solving problems. Like the time our food supplier missed our delivery, and I had to source and balance five boxes of portobello mushrooms while riding a bike in a Canadian snowstorm. Or when the water was accidentally left running in the espresso machine overnight and we had to deal with the espresso flood the next morning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FgvDKRkw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6b2e9d7a-3959-4f3a-ae0b-65175d3b624d/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FgvDKRkw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/6b2e9d7a-3959-4f3a-ae0b-65175d3b624d/" alt="Mitchell Gould Codementor ProvenWord.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a skater, I practiced how to throw my weight into the air to achieve enough momentum to complete 2.5 rotations and land safely. I had to overcome fear and have complete trust in myself. This turned into a life philosophy. I never would have predicted that doing a double axle would help me to confidently launch myself into so many different careers and projects. &lt;/p&gt;

&lt;p&gt;My current project, code named 'ProvenWord', is a direct consequence of teaching English in Thailand for 3 years. I witnessed firsthand, the difficulty of learning to write in English, something I took for granted as a native English speaker. I partnered with a friend who has over 20 years of proofreading experience, to develop an application that helps non-native English learners improve their writing. &lt;/p&gt;

&lt;p&gt;In competitive ice skating judges would immediately evaluate your performance and hold up a score from 0 to 10. I found that this kind of direct and immediate feedback to be very powerful (and,  at times, painful). ProvenWord draws significantly from this experience. Our system instantly  evaluates a client's writing, categorizes their errors (e.g. verb, punctuation, capitalization etc.), and presents the results in a visually stunning graphical interface. Clients gain a clear picture of where they need to focus to improve their writing are are provided with interactive learning tools designed for each error category. &lt;/p&gt;

&lt;p&gt;Of all the careers, jobs, and projects that I have been a part of, ProvenWord has &lt;em&gt;proven&lt;/em&gt; to be the most challenging. We literally had no money when we started this project. My skills in IT were quite limited and/or outdated. The scope of the project kept growing and went well beyond my pay grade. But this sounded like an awesome challenge to me, so I decided to up my IT abilities, and for that I needed help. A lot of help. &lt;/p&gt;

&lt;p&gt;It took me quite a while to find the resources, learning platforms, and coding legends I wanted to learn from. I'm also a very slow learner, so I found myself taking many courses on the same topic from different teachers, exposing me to an array of coding styles and ideologies. &lt;/p&gt;

&lt;p&gt;While courses and resources gave me a solid foundation, nothing was as powerful or effective as working with a mentor. I have to give a shout out to the people at &lt;a href="https://www.codementor.io?utm_source=devto"&gt;Codementor&lt;/a&gt; for building this platform with access to so many incredible developers. That's not to say I found the right mentors the first time. It took me a few sessions until I connected with mentors with a good balance of patience, pedagogy, and expertise that resonated with me.  &lt;/p&gt;

&lt;p&gt;I initially worked with mentors to fix specific bugs, but more often than not, the mentor would point out the larger problem that needed to be fixed. Mentoring sessions went from 'bug fixes' to developing high level strategies and best practices that would take my coding skills to a whole new level. I learned how to take a step back to think about the problem, how the structure could be adjusted, and more importantly, I learned how to solve the problem when it came around next time. I remember there was one time I had to scrap my entire code after a mentoring session. Rather than band-aiding the existing code, my mentor asked what I was trying to achieve. He then took a step back and taught me how to look at all the other ways of writing better code with the same function. I finished that mentoring session feeling like Keanu Reaves in The Matrix, like I was plugged in and getting an upgrade. I was excited, fired up, and motivated  to go back to work and apply this new found knowledge. &lt;/p&gt;

&lt;p&gt;That's the feeling I get after every fruitful mentoring session. Finding the right mentor allowed me to up my game and skillset. They opened my mind and taught me things I didn't even request in the initial communication. Working with the right mentor can be highly motivating, but that doesn't mean I didn't prepare beforehand. I learned that to get the most out of mentoring, I needed to be clear about what I wanted from each session. This forced me to think deeply about each problem and document it precisely. Sometimes this preparation was enough for me to solve the problem myself. Other times, the document with code samples, pseudo code, and other information helped my mentor prepare for our session, and would be able to more efficiently, come up with a strategy or solution. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0XhGr8mW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/7baea065-b22c-4d9a-a0a8-5ea4643815d9/" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0XhGr8mW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ucarecdn.com/7baea065-b22c-4d9a-a0a8-5ea4643815d9/" alt="Mitchell Gould Codementor Kilimanjaro.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now back to the Kilimanjaro story.&lt;/p&gt;

&lt;p&gt;I was attending the Information Technology Institute in Ottawa, Canada when I met Yvonne. She was a refuge from Rwanda and a truly brilliant woman. We quickly became close friends and helped each other get through the grueling course load.&lt;/p&gt;

&lt;p&gt;We graduated just after the 2000 dotcom bubble burst and there were no jobs for freshly graduated IT students. With no choice and nothing to lose, we setup shop in a room of my Montreal apartment and built websites, designed business cards, fliers, and did whatever we could to get by.&lt;/p&gt;

&lt;p&gt;One day Yvonne walked into the office and told me she was going to Nairobi, Kenya to see her family. A quick Google search showed me where Nairobi was: 4 hours north of Arusha, Tanzania - the staging city for climbing Kilimanjaro. Taking this as a sign from the universe, I contacted my friend, Adam, who was then working somewhere in Nigeria. Coincidentally he wanted to quit his job and was up for an adventure. So I booked a flight and fulfilled my childhood dream, only without my dad (he was proud of me anyway).&lt;/p&gt;

</description>
      <category>developer</category>
      <category>career</category>
      <category>motivation</category>
      <category>learning</category>
    </item>
    <item>
      <title>Remote Career Summit 2020 (June 25th)</title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Mon, 22 Jun 2020 05:35:40 +0000</pubDate>
      <link>https://dev.to/codementor/remote-career-summit-2020-june-25th-339j</link>
      <guid>https://dev.to/codementor/remote-career-summit-2020-june-25th-339j</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VxUtRglP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k95lj6g4tlb7owvnlzjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VxUtRglP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k95lj6g4tlb7owvnlzjg.png" alt="Remote Career Summit 2020"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We're holding the &lt;a href="https://bit.ly/3fNTrf4"&gt;Remote Career Summit 2020&lt;/a&gt; on June 25!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Don't miss this opportunity to hear from the leading companies in remote work, attend workshops, and possibly even find you next remote role at the career expo.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It's free to attend (&lt;a href="https://bit.ly/2YQzrlm"&gt;sign up here&lt;/a&gt;). Check out the information below.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We’re still adding new information and speakers — watch this space!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Here at Arc, we love remote work — our day job is helping expert remote developers find great projects and organizations, after all. So when the COVID-19 pandemic forced a lot of people and companies to suddenly &lt;em&gt;go remote&lt;/em&gt;, and the economic outlook began to look a bit shaky, we wondered how we could help. Could we help people “do remote better” &lt;em&gt;and&lt;/em&gt; help people connect with job opportunities?&lt;/p&gt;

&lt;p&gt;The answer we stumbled upon over a few team video chats was this: holding the world’s biggest virtual Remote Career Summit. This day-long event is part remote work conference, part virtual job fair.&lt;/p&gt;

&lt;p&gt;We’re collaborating with some of the world’s top remote work experts and companies to bring you this unique opportunity to launch — or grow — your remote career. The best bit: there are still more talks to be announced 🎉&lt;/p&gt;

&lt;p&gt;If this sounds as exciting to you as it does to us, welcome aboard!&lt;/p&gt;

&lt;h2&gt;
  
  
  Two-In-One Event
&lt;/h2&gt;

&lt;p&gt;The Remote Career Summit 2020 is a two-in-one event, comprising a &lt;strong&gt;Career Conference&lt;/strong&gt; and a &lt;strong&gt;Job Fair&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Whether you’re a developer, a designer, or a marketer, there’s something for everyone. We’re collaborating with some of the biggest names in the tech and remote working worlds to bring you insights. You’ll come away with new knowledge about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Landing your first remote job&lt;/li&gt;
&lt;li&gt;Online collaboration best practices, and&lt;/li&gt;
&lt;li&gt;How to stand out as a candidate in the remote hiring process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Intrigued? Check out the details below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Career Conference Speaker Schedule — Main Stage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Arc — State of Remote Jobs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;9:00-9:20am (PT)&lt;/strong&gt;&lt;br&gt;
In this opening keynote, Arc &amp;amp; Codementor Founder/CEO Weiting Liu walks us through the state of remote jobs in 2020, including key stats and insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automattic x Buffer x GitLab — Under the Hood: Working at the World’s Biggest All-Remote Companies
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;9:30-10:30am (PT)&lt;/strong&gt;&lt;br&gt;
Join three of the biggest brands in remote as they have a conversation with Laurel Farrer of Distribute Consulting. You’ll learn what makes these companies tick — and what they look for when hiring. From remote processes to collaboration and cultural fit, don’t miss this opportunity to hear and compare remote expertise.&lt;/p&gt;

&lt;h3&gt;
  
  
  Doist x MURAL x Virtual Work Insider — How to Get Hired for Remote Work
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;10:35-11:15am (PT)&lt;/strong&gt;&lt;br&gt;
From the key skills you need to succeed at remote work and a look into the hiring process of remote companies, to tips on how to capture a recruiter's attention and the number one piece of advice job-seekers need to hear right now... don't miss this chance to hear how to stand out as a candidate.&lt;/p&gt;

&lt;h3&gt;
  
  
  DHH (Basecamp &amp;amp; HEY) &amp;amp; Tammy Bjelland (Workplaceless) — Building a Calm and Ethical Workplace
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;11:30am-12:10pm (PT)&lt;/strong&gt;&lt;br&gt;
This fireside chat promises wide-ranging insights on remote work management, integrating remote work into a previously-colocated company, and why trust and great writing skills help unlock calm productivity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Roundtable — Diversity, Inclusion, and Remote Work
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;12:20-1:10pm (PT)&lt;/strong&gt;&lt;br&gt;
Join speakers from Career Karma, Under Armour, Workfrom, and Cota Capital as they discuss diversity and inclusion, and whether or not embracing remote work is a way to create more inclusive workplaces.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dribbble x Creative Market — Management, Scaling, &amp;amp; Remote Culture: Dribbble’s Balancing Act
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1:15-1:50pm (PT)&lt;/strong&gt;&lt;br&gt;
So your company’s fully-remote. Now what? Learn from the CEOs of Dribbble and Creative Market as they discuss building and scaling remote teams, preserving and refocusing culture, and management dos and don’ts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Roundtable — Nail Your Next Interview: Tips for Job-Seeking Developers
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;2:00-3:00pm (PT)&lt;/strong&gt;&lt;br&gt;
Join speakers from Shopify, Zapier, and Help Scout for this must-listen session on getting hired as a remote developer. Whether it's technical interviewing, remote hiring processes, developer portfolio preparation, or self-improvement tips, it's all here.&lt;/p&gt;

&lt;h3&gt;
  
  
  Roundtable — How Design Teams Successfully Collaborate and Hire Remotely
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;3:10-4:10pm (PT)&lt;/strong&gt;&lt;br&gt;
How do remote design teams make decisions? What tools are they using? How do they hire? Learn the answers to these questions — and more — during this session with speakers from Microsoft, Dialpad, Coinbase, UnitedHealthcare, and Litmus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rand Fishkin (SparkToro) — Get Hired in Marketing... in 2020
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;4:15-4:45pm (PT)&lt;/strong&gt;&lt;br&gt;
What skills do marketers need in 2020? In this data-driven presentation, SparkToro CEO Rand Fishkin breaks down the must-haves and must-knows for current marketing job-seekers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ryan Choi (Y Combinator) — Why Work at a Startup
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;4:50-5:30pm (PT)&lt;/strong&gt;&lt;br&gt;
Thinking about working at a startup? What should you know? How can you assess a startup, and whether it's a good fit for you and your career? Y Combinator's Ryan Choi gives an insider's look into why you should — or shouldn't — work at a startup.&lt;/p&gt;

&lt;h3&gt;
  
  
  Arc — Closing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;5:30-5:40pm (PT)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Talks, Q&amp;amp;As, and Workshops
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fernando Angulo (SEMrush) — Building Your Online Presence as a Marketer
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;12:00-12:30pm (PT)&lt;/strong&gt;&lt;br&gt;
SEO, influencers, and personal branding. How can you tie it all together to build your online presence as a marketer? Join SEMrush's Head of Communications to find out!&lt;/p&gt;

&lt;h3&gt;
  
  
  Caro Griffin (Skillcrush) — How to Land Your First Remote Job in Tech
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;3:30-4:00pm (PT)&lt;/strong&gt;&lt;br&gt;
So you want a remote job. That's great! But... where do you start? Skillcrush's Caro Griffin is here to help, with this presentation on how to find remote jobs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vinayak Ranade (Drafted) — How to Leverage Your Network
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;4:00-4:30pm (PT)&lt;/strong&gt;&lt;br&gt;
Spoiler alert: networking still matters, even for remote jobs. Get actionable tips on how to leverage your network from the CEO of Drafted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtual Job Fair
&lt;/h2&gt;

&lt;p&gt;The virtual Job Fair will be running in parallel to the Career Conference talks, and available at all times.&lt;/p&gt;

&lt;p&gt;At the &lt;strong&gt;Job Fair&lt;/strong&gt;, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discover companies still hiring in the Employer Expo&lt;/li&gt;
&lt;li&gt;Chat with company reps to ask questions and learn more&lt;/li&gt;
&lt;li&gt;Connect with other professionals and grow your network&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Are You Waiting For?
&lt;/h2&gt;

&lt;p&gt;If you haven’t signed up for your free attendee ticket yet, now’s the time! &lt;a href="https://bit.ly/2YQzrlm"&gt;Grab your ticket here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Are you an employer looking to have your brand represented at the job fair? &lt;a href="https://arcdotdev.typeform.com/to/N2o4TS#source=devto"&gt;Click here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let us know in the comments below if you have any questions.&lt;/p&gt;

&lt;p&gt;Look forward to seeing you there!&lt;/p&gt;

</description>
      <category>career</category>
      <category>learning</category>
      <category>remote</category>
      <category>interview</category>
    </item>
    <item>
      <title>10 Performance Optimization Techniques for React Apps</title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Thu, 12 Mar 2020 09:56:03 +0000</pubDate>
      <link>https://dev.to/codementor/10-performance-optimization-techniques-for-react-apps-2f9b</link>
      <guid>https://dev.to/codementor/10-performance-optimization-techniques-for-react-apps-2f9b</guid>
      <description>&lt;p&gt;Internally, React uses several clever techniques to minimize the number of costly DOM operations required to update the UI. While this will lead to a faster user interface without specifically optimizing for performance for many cases, there are ways where you can still speed up your React application. This post will go over some useful techniques you can use to improve your React code. &lt;/p&gt;

&lt;h2&gt;
  
  
  1. Using Immutable Data Structures
&lt;/h2&gt;

&lt;p&gt;Data immutability is not an architecture or design pattern, it’s an opinionated way of writing code. This forces you to think about how you structure your application data flow. In my opinion, data immutability is a practice that revolves around a strict unidirectional data flow.   &lt;/p&gt;

&lt;p&gt;Data immutability, which comes from the functional programming world, can be applied to the design of front-end apps. It can have many benefits, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero side-effects; &lt;/li&gt;
&lt;li&gt;Immutable data objects are simpler to create, test, and use;&lt;/li&gt;
&lt;li&gt;Helps prevent temporal coupling;&lt;/li&gt;
&lt;li&gt;Easier to track changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the React landscape, we use the notion of &lt;code&gt;Component&lt;/code&gt; to maintain the internal state of components, and changes to the state can cause the component to re-render.&lt;/p&gt;

&lt;p&gt;React builds and maintains an internal representation of the rendered UI (Virtual DOM). When a component’s props or state changes, React compares the newly returned element with the previously rendered one. When the two are not equal, React will update the DOM. Therefore, we have to be careful when changing the state. &lt;/p&gt;

&lt;p&gt;Let’s consider a User List Component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="nx"&gt;addNewUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="cm"&gt;/**
        *  OfCourse not correct way to insert
        *  new user in user list
        */&lt;/span&gt;
       &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
           &lt;span class="na"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;robin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email@email.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
       &lt;span class="p"&gt;});&lt;/span&gt;
       &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The concern here is that we are pushing new users onto the variable &lt;code&gt;users&lt;/code&gt;, which is a reference to &lt;code&gt;this.state.users&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip&lt;/strong&gt;: React state should be treated as immutable. We should never mutate &lt;code&gt;this.state&lt;/code&gt; directly, as calling &lt;code&gt;setState()&lt;/code&gt; afterward may replace the mutation you made.&lt;/p&gt;

&lt;p&gt;So what’s wrong with mutating &lt;code&gt;state&lt;/code&gt; directly? Let’s say we overwrite &lt;code&gt;shouldComponentUpdate&lt;/code&gt;  and are checking &lt;code&gt;nextState&lt;/code&gt; against &lt;code&gt;this.state&lt;/code&gt; to make sure that we only re-render components when changes happen in the state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nx"&gt;shouldComponentUpdate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nextProps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nextState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;nextState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even if changes happen in the user's array, React won’t re-render the UI as it’s the same reference. &lt;/p&gt;

&lt;p&gt;The easiest way to avoid this kind of problem is to avoid mutating props or state. So the&lt;br&gt;
&lt;code&gt;addNewUser&lt;/code&gt;  method could be rewritten using &lt;code&gt;concat&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="nx"&gt;addNewUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
         &lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
           &lt;span class="na"&gt;timeStamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
           &lt;span class="na"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;robin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email@email.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
         &lt;span class="p"&gt;})&lt;/span&gt;
       &lt;span class="p"&gt;}));&lt;/span&gt;
   &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For handling changes to state or props in React components, we can consider the following immutable approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For arrays: use &lt;code&gt;[].concat&lt;/code&gt; or es6 &lt;code&gt;[ ...params]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;For objects: use &lt;code&gt;Object.assign({}, ...)&lt;/code&gt; or es6 &lt;code&gt;{...params}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two methods go a long way when introducing immutability to your code base.&lt;/p&gt;

&lt;p&gt;But it’s better to use an optimized library which provides a set of immutable data structures. Here are some of the libraries you can use: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://github.com/kolodny/immutability-helper"&gt;Immutability Helper&lt;/a&gt;: This is a good library when it’s comes to mutating a data copy without changing the source.&lt;/li&gt;
&lt;li&gt; &lt;a href="https://facebook.github.io/immutable-js/"&gt;Immutable.js&lt;/a&gt;: This is my favorite library as it provides a lot of persistent immutable data structures, including: &lt;a href="https://facebook.github.io/immutable-js/docs/#/List"&gt;List&lt;/a&gt;, &lt;a href="https://facebook.github.io/immutable-js/docs/#/Stack"&gt;Stack&lt;/a&gt;, &lt;a href="https://facebook.github.io/immutable-js/docs/#/Map"&gt;Map&lt;/a&gt;, &lt;a href="https://facebook.github.io/immutable-js/docs/#/OrderedMap"&gt;OrderedMap&lt;/a&gt;, &lt;a href="https://facebook.github.io/immutable-js/docs/#/Set"&gt;Set&lt;/a&gt;, &lt;a href="https://facebook.github.io/immutable-js/docs/#/OrderedSet"&gt;OrderedSet&lt;/a&gt;, and &lt;a href="https://facebook.github.io/immutable-js/docs/#/Record"&gt;Record&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/rtfeldman/seamless-immutable"&gt;Seamless-immutable&lt;/a&gt;: A library for immutable JavaScript data structures that are backward-compatible with normal arrays and objects.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/aweary/react-copy-write"&gt;React-copy-write&lt;/a&gt;: An immutable React state management library with a simple mutable API, memoized selectors, and structural sharing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt;  React &lt;code&gt;setState&lt;/code&gt; method is asynchronous. This means that rather than immediately mutating &lt;code&gt;this.state&lt;/code&gt;, &lt;code&gt;setState()&lt;/code&gt; creates a pending state transition. If you access &lt;code&gt;this.state&lt;/code&gt; after calling this method, it would potentially return the existing value. To prevent this, use the callback function of &lt;code&gt;setState&lt;/code&gt; to run code after the call is completed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Resources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://swizec.com/blog/immutable-data/swizec/7613"&gt;Do you really need immutable data?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/dailyjs/the-state-of-immutability-169d2cd11310"&gt;The State of Immutability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://reactkungfu.com/2015/08/pros-and-cons-of-using-immutability-with-react-js/"&gt;Pros and Cons of using immutability with React.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.freecodecamp.org/handling-state-in-react-four-immutable-approaches-to-consider-d1f5c00249d5"&gt;Handling State in React: Four Immutable Approaches to Consider&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The original post, &lt;strong&gt;21 Performance Optimization Techniques for React Apps&lt;/strong&gt;, is published on the &lt;a href="https://www.codementor.io/blog/react-optimization-5wiwjnf9hj?utm_campaign=mkt-outreach&amp;amp;&amp;amp;utm_source=devto&amp;amp;utm_term=react-opt"&gt;Codementor Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Function/Stateless Components and React.PureComponent
&lt;/h2&gt;

&lt;p&gt;In React, function components and &lt;code&gt;PureComponent&lt;/code&gt; provide two different ways of optimizing React apps at the component level.&lt;/p&gt;

&lt;p&gt;Function components prevent constructing class instances while reducing the overall bundle size as it minifies better than classes. &lt;/p&gt;

&lt;p&gt;On the other hand, in order to optimize UI updates, we can consider converting function components to a &lt;code&gt;PureComponent&lt;/code&gt; class (or a class with a custom &lt;code&gt;shouldComponentUpdate&lt;/code&gt; method). However, if the component doesn’t use state and other life cycle methods, the initial render time is a bit more complicated when compared to function components with potentially faster updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should we use &lt;code&gt;React.PureComponent&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;React.PureComponent&lt;/code&gt; does a shallow comparison on state change. This means it compares values when looking at primitive data types, and compares references for objects. Due to this, we must make sure two criteria are met when using &lt;code&gt;React.PureComponent&lt;/code&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Component State/Props is an immutable object;&lt;/li&gt;
&lt;li&gt;State/Props should not have a multi-level nested object. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; All child components of &lt;code&gt;React.PureComponent&lt;/code&gt; should also be a Pure or functional component.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Multiple Chunk Files
&lt;/h2&gt;

&lt;p&gt;Your application always begins with a few components. You start adding new features and dependencies, and before you know it, you end up with a huge production file.&lt;/p&gt;

&lt;p&gt;You can consider having two separate files by separating your vendor, or third-party library code from your application code by taking advantage of &lt;a href="https://webpack.js.org/plugins/commons-chunk-plugin/"&gt;CommonsChunkPlugin&lt;/a&gt; for webpack. You’ll end up with &lt;code&gt;vendor.bundle.js&lt;/code&gt; and &lt;code&gt;app.bundle.js&lt;/code&gt;. By splitting your files, your browser caches less frequently and parallel downloads resources to reduce load time wait.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are using the latest version of webpack, you can also consider &lt;a href="https://webpack.js.org/plugins/split-chunks-plugin/"&gt;SplitChunksPlugin&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4.Using Production Mode Flag in Webpack
&lt;/h2&gt;

&lt;p&gt;If you are using &lt;code&gt;webpack 4&lt;/code&gt; as a module bundler for your app, you can consider setting the mode option to &lt;strong&gt;production&lt;/strong&gt;. This basically tells webpack to use the built-in optimization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;production&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can pass it as a CLI argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;webpack&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;production&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Doing this will limit optimizations, such as minification or removing development-only code, to libraries. It will not expose source code, file paths, and &lt;a href="https://medium.com/webpack/webpack-4-mode-and-optimization-5423a6bc597a"&gt;many more&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.Dependency optimization
&lt;/h2&gt;

&lt;p&gt;When considering optimizing the application bundle size, it’s worth checking how much code you are actually utilizing from dependencies. For example, you could be using &lt;code&gt;Moment.js&lt;/code&gt; which includes localized files for multi-language support. If you don’t need to support multiple languages, then you can consider using &lt;a href="https://www.npmjs.com/package/moment-locales-webpack-plugin"&gt;moment-locales-webpack-plugin&lt;/a&gt; to remove unused locales for your final bundle. &lt;/p&gt;

&lt;p&gt;Another example is &lt;code&gt;loadash&lt;/code&gt;. Let’s say you are only using 20 of the 100+ methods, then having all the extra methods in your final bundle is not optimal. So for this, you can use &lt;a href="https://github.com/lodash/lodash-webpack-plugin"&gt;lodash-webpack-plugin&lt;/a&gt; to remove unused functions.&lt;/p&gt;

&lt;p&gt;Here is an extensive list of &lt;a href="https://github.com/GoogleChromeLabs/webpack-libs-optimizations"&gt;dependencies&lt;/a&gt; which you can optimize.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Use &lt;code&gt;React.Fragments&lt;/code&gt; to Avoid Additional HTML Element Wrappers
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;React.fragments&lt;/code&gt; lets you group a list of children without adding an extra node.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Comments&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PureComponent&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Fragment&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; &lt;span class="nx"&gt;Title&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt; &lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/React.Fragment&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But wait! There is the alternate and more concise syntax using &lt;code&gt;React.fragments&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Comments&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PureComponent&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; &lt;span class="nx"&gt;Title&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt; &lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Avoid Inline Function Definition in the Render Function.
&lt;/h2&gt;

&lt;p&gt;Since functions are objects in JavaScript (&lt;code&gt;{} !== {}&lt;/code&gt;), the inline function will always fail the prop diff when React does a diff check. Also, an arrow function will create a new instance of the function on each render if it's used in a JSX property. This might create a lot of work for the garbage collector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;CommentList&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
        &lt;span class="na"&gt;selectedCommentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;comments&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
               &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;selectedCommentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;commentId&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
               &lt;span class="p"&gt;}}&lt;/span&gt; &lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;           &lt;span class="p"&gt;})&lt;/span&gt; 
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of defining the inline function for props, you can define the arrow function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;CommentList&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
        &lt;span class="na"&gt;selectedCommentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;onCommentClick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;commentId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;selectedCommentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;commentId&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;comments&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
               &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onCommentClick&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; 
                &lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;           &lt;span class="p"&gt;})&lt;/span&gt; 
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Throttling and Debouncing Event Action in JavaScript
&lt;/h2&gt;

&lt;p&gt;Event trigger rate is the number of times an event handler invokes in a given amount of time.&lt;/p&gt;

&lt;p&gt;In general, mouse clicks have lower event trigger rates compare to scrolling and mouseover. Higher event trigger rates can sometimes crash your application, but it can be controlled.&lt;/p&gt;

&lt;p&gt;Let's discuss some of the techniques.&lt;/p&gt;

&lt;p&gt;First, identify the event handler that is doing the expensive work. For example, an XHR request or DOM manipulation that performs UI updates, processes a large amount of data, or perform computation expensive tasks. In these cases, throttling and debouncing techniques can be a savior without making any changes in the event listener.&lt;/p&gt;

&lt;h4&gt;
  
  
  Throttling
&lt;/h4&gt;

&lt;p&gt;In a nutshell, throttling means delaying function execution. So instead of executing the event handler/function immediately, you’ll be adding a few milliseconds of delay when an event is triggered. This can be used when implementing infinite scrolling, for example. Rather than fetching the next result set as the user is scrolling, you can delay the XHR call.&lt;/p&gt;

&lt;p&gt;Another good example of this is Ajax-based instant search. You might not want to hit the server for every key press, so it’s better to throttle until the input field is dormant for a few milliseconds&lt;/p&gt;

&lt;p&gt;Throttling can be implemented a number of ways. You can throttle by the number of events triggered or by the delay event handler being executed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Debouncing
&lt;/h4&gt;

&lt;p&gt;Unlike throttling, debouncing is a technique to prevent the event trigger from being fired too often. If you are using &lt;code&gt;lodash&lt;/code&gt;, you can wrap the function you want to call in &lt;code&gt;lodash’s  debounce function&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here’s a demo code for searching comments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;debouce&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash.debounce&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;SearchComments&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“”&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="nx"&gt;setSearchQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;debounce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;searchQuery&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

   &lt;span class="c1"&gt;// Fire API call or Comments manipulation on client end side&lt;/span&gt;
 &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

 &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Search&lt;/span&gt; &lt;span class="nx"&gt;Comments&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setSearchQuery&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;   &lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are not using &lt;code&gt;lodash&lt;/code&gt;, you can use the minified debounced function to implement it in JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;debounce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;))}&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;clearTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;!&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Reference and Related Articles:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://lodash.com/docs/#debounce"&gt;"Array" Methods&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://eloquentjavascript.net/15_event.html"&gt;Handling Events&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  9. Avoid using Index as Key for map
&lt;/h2&gt;

&lt;p&gt;You often see indexes being used as a key when rendering a list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; 
            &lt;span class="p"&gt;{..&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But using the key as the index can show your app incorrect data as it is being used to identify DOM elements. When you push or remove an item from the list, if the key is the same as before, React assumes that the DOM element represents the same component.&lt;/p&gt;

&lt;p&gt;It's always advisable to use a unique property as a key, or if your data doesn't have any unique attributes, then you can think of using the &lt;code&gt;shortid module&lt;/code&gt; which generates a unique key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;shortid&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shortid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; 
            &lt;span class="p"&gt;{..&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;shortid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, if the data has a unique property, such as an ID, then it's better to use that property.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;comments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Comment&lt;/span&gt; 
            &lt;span class="p"&gt;{..&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;comment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In certain cases, it's completely okay to use the index as the key, but only if below condition holds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The list and items are static&lt;/li&gt;
&lt;li&gt;  The items in the list don't have IDs and the list is never going to be reordered or filtered&lt;/li&gt;
&lt;li&gt;  List is immutable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References and Related Articles:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/facebook/react/issues/1342#issuecomment-39230939"&gt;Consider providing a default key for dynamic children #1342&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://coderwall.com/p/jdybeq/the-importance-of-component-keys-in-react-js"&gt;The importance of component keys in React.js&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://paulgray.net/keys-in-react/"&gt;Why you need keys for collections in React&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  10. Avoiding Props in Initial States
&lt;/h2&gt;

&lt;p&gt;We often need to pass initial data with props to the React component to set the initial state value.&lt;/p&gt;

&lt;p&gt;Let's consider this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;EditPanelComponent&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;isEditMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;applyCoupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; 
                    &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Enter&lt;/span&gt; &lt;span class="na"&gt;Coupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;               &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything looks good in the snippet, right?&lt;/p&gt;

&lt;p&gt;But what happens when &lt;code&gt;props.applyCoupon&lt;/code&gt; changes? Will it be reflected in the state? If the props are changed without the refreshing the component, the new prop value will never be assigned to the state’s &lt;code&gt;applyCoupon&lt;/code&gt;. This is because the constructor function is only called when &lt;code&gt;EditPanelComponent&lt;/code&gt; is first created.&lt;/p&gt;

&lt;p&gt;To quote &lt;strong&gt;React docs&lt;/strong&gt;: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Using props to initialize a state in constructor function often leads to duplication of “source of truth”, i.e. where the real data is. This is because constructor function is only invoked when the component is first created.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Workaround:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Don't initialize state with props which can be changed later. Instead, use props directly in the component.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;EditPanelComponent&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;isEditMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; 
         &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Enter&lt;/span&gt; &lt;span class="na"&gt;Coupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&amp;gt;}&amp;lt;/&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;You can use &lt;code&gt;componentWillReceiveProps&lt;/code&gt; to update the state when props change.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;EditPanelComponent&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;isEditMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;applyCoupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// reset state if the seeded prop is updated&lt;/span&gt;
    &lt;span class="nx"&gt;componentWillReceiveProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nextProps&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nextProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;applyCoupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;nextProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;applyCoupon&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; 
          &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Enter&lt;/span&gt; &lt;span class="na"&gt;Coupon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&amp;gt;}&amp;lt;/&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;References and Related Articles:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/28785106/reactjs-why-is-passing-the-component-initial-state-a-prop-an-anti-pattern"&gt;ReactJS: Why is passing the component initial state a prop an anti-pattern?&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://medium.com/@justintulk/react-anti-patterns-props-in-initial-state-28687846cc2e"&gt;React Anti-Patterns: Props in Initial State&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There are many ways to optimize a React app, for example lazy loading components, using ServiceWorkers to cache application state, considering SSR, avoiding unnecessary renders etc.. That said, before considering optimization, it’s worth understanding how React components work, understanding diffing algorithms, and how rendering works in React. These are all important concepts to take into consideration when optimizing your application.&lt;/p&gt;

&lt;p&gt;I think optimization without measuring is almost premature, which is why I would recommend to benchmark and measure performance first. You can consider profiling and visualizing components with Chrome Timeline. This lets you see which components are unmounted, mounted, updated, and how much time they take relative to each other. It will help you to get started with your performance optimization journey.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For more tips, head over to the &lt;a href="https://www.codementor.io/blog/react-optimization-5wiwjnf9hj?utm_campaign=mkt-outreach&amp;amp;&amp;amp;utm_source=devto&amp;amp;utm_term=react-opt"&gt;Codementor Blog&lt;/a&gt; to read the original post, &lt;strong&gt;21 Performance Optimization Techniques for React Apps&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>3 hours left to win a $75 Amazon giftcard!</title>
      <dc:creator>Codementor</dc:creator>
      <pubDate>Tue, 13 Aug 2019 03:34:05 +0000</pubDate>
      <link>https://dev.to/codementor/3-hours-left-to-win-a-75-amazon-giftcard-37pj</link>
      <guid>https://dev.to/codementor/3-hours-left-to-win-a-75-amazon-giftcard-37pj</guid>
      <description>&lt;p&gt;Share &lt;em&gt;your&lt;/em&gt; experience as a &lt;strong&gt;remote developer or technical leader&lt;/strong&gt; in our  5-minute “State of Remote Developers” survey. The &lt;strong&gt;survey closes in 3 hours&lt;/strong&gt;!! &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;a href="https://codemntr.io/devto-stateofremotedevs"&gt;👉 SURVEY HERE&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Two $75 Amazon giftcards are up for grabs and winners will be contacted by the end of the week. 🎉&lt;/p&gt;

</description>
      <category>survey</category>
      <category>giftcard</category>
      <category>developers</category>
      <category>remote</category>
    </item>
  </channel>
</rss>
