<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Carolina Baptista on Medium]]></title>
        <description><![CDATA[Stories by Carolina Baptista on Medium]]></description>
        <link>https://medium.com/@carolina.baptista?source=rss-6caa0d88abc6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lyEhPUTZ2KwhEpRO9_B2Fw.jpeg</url>
            <title>Stories by Carolina Baptista on Medium</title>
            <link>https://medium.com/@carolina.baptista?source=rss-6caa0d88abc6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 14:13:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@carolina.baptista/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ChatGPT: how powerful is it in aiding the front-end developer?]]></title>
            <link>https://medium.com/mctw-tdw/chatgpt-how-powerful-is-it-in-aiding-the-front-end-developer-4b62e8efdf80?source=rss-6caa0d88abc6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b62e8efdf80</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Carolina Baptista]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 11:07:39 GMT</pubDate>
            <atom:updated>2024-02-22T11:07:39.342Z</atom:updated>
            <content:encoded><![CDATA[<p>AI has been surprising us: in mere seconds, it can do what would take a human being hours, if not days, to complete. Do possibilities become limitless when we combine the knowledge of a front-end developer with AI?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgfLFcAPuVlvSBBHJA0sDA.jpeg" /><figcaption>Source: <a href="https://unsplash.com/pt-br/fotografias/um-computador-portatil-sentado-em-cima-de-uma-mesa-de-madeira-qGGNt_oqs5M">Unsplash, Emilliano Vittoriosi</a></figcaption></figure><h3>Background</h3><p>How many of us have been frustrated by looking at code with an error in it? No matter how hard we try to find it, we are unable to do so or it can take hours (or even days) to find that comma that has been placed in the wrong place: it’s like looking for a needle in a haystack. Often, the code is already too dense or complex for us to show it to someone else and we’re left relying entirely on ourselves. But is all this frustration needed?</p><p>So I put AI to the test, testing its ability as a tool to help the front-end developer build websites, rather than as a tool to build the websites themselves. It is assumed that the developer already has some front-end development experience.</p><p>I used a fictitious website — Foodie. — built with <a href="https://react.dev/">React</a> to test <a href="https://chat.openai.com/">ChatGPT</a>’s (version GPT-3.5 - an AI model from <a href="https://openai.com/">OpenAI</a>) ability to help me with the front-end development.</p><p>Foodie. is a website whose aim is to provide its users with recipes. In addition to recipes entered via an API (<a href="https://developer.edamam.com/edamam-docs-recipe-api">Edamam</a>), users have the option of creating their recipes via a form and filtering them by meal type.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F895790004%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F895790004&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1770693041-84a4cc114b75dd36f32ead155d00d683aab49f88cdb6fc76d9d86572f08b47a1-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="992" frameborder="0" scrolling="no"><a href="https://medium.com/media/e86c1a50e2a9a8daf0307fe1a202aaeb/href">https://medium.com/media/e86c1a50e2a9a8daf0307fe1a202aaeb/href</a></iframe><p>In order to test ChatGPT’s ability to assist the front-end developer, I purposely added errors or hid parts of the website’s code. The aim is to understand whether the AI can detect problems and solve them.</p><p>I’ve created 3 different cases, with the difficulty gradually increasing from case to case.</p><h3>Case 1 | Invoking the wrong function</h3><p>In the first case, I changed the name of a function to one that doesn’t correspond to the correct one. Here, the aim is to see if the AI can detect this error and rewrite the code, changing the function name to the correct one.</p><p>In the <em>CardFilter </em>component, the <em>onChange</em> event appears (when a different dropdown option is selected). Here, the correct function to call when the dropdown value changes is “dropdownChangeHandler”.</p><p>To test this case, I changed the name of the function from “dropdownChangeHandler” to “setAuxCardList”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F895794295%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F895794295&amp;image=http%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1770700344-75766b13ef18e851eca224b8cf9a61a5ffbd350db5e4a90524bb1f9fff58bcaa-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1200" frameborder="0" scrolling="no"><a href="https://medium.com/media/71aa06bc7a217071fb37b03d486c0ecc/href">https://medium.com/media/71aa06bc7a217071fb37b03d486c0ecc/href</a></iframe><p>Within seconds, and with just one prompt (see image below), ChatGPT realized the error and corrected it, providing the correct code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjp1plvWyQBmaQmJBBpmxw.png" /><figcaption>Prompt given to ChatGPT in Case 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVxEvkErt0_SxVUodXC-qg.png" /><figcaption>ChatGPT’s response in Case 1, part I</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*2mIoH5R5q9k312hboojnWA.jpeg" /><figcaption>ChatGPT’s response in Case 1, part II</figcaption></figure><h3>Case 2 | Empty form fields after inserting new recipe</h3><p>In this 2nd case, I used the CardForm component. I asked ChatGPT to generate a few lines of code to clear the content entered by the user in the form after adding a new recipe to the CardContainer, that is, after clicking on the submit button.</p><p>Here, the aim is to see if the AI can understand the code provided and add a few lines.</p><p>Again, in a matter of seconds, ChatGPT was able to respond to the request made, in just one prompt (image below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxhUP1HhHixoamdthChQxQ.png" /><figcaption>Prompt given to ChatGPT in Case 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djcJ9ORwA5xIwkvNZwsnrQ.png" /><figcaption>ChatGPT’s response in Case 2, part I</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WK6fZ07a3LxIv9b2j5pN4g.png" /><figcaption>ChatGPT’s response in Case 2, part II</figcaption></figure><p>By applying the lines generated by ChatGPT, the form worked as previously requested, with all the input fields being cleared after the user clicked on the “Add Recipe” submission button.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F895791146%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=http%3A%2F%2Fvimeo.com%2F895791146&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1770695437-976ead42ecc6bd0f056accfbbff1b464ed9183efc1efc27679405b08db00de64-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="992" frameborder="0" scrolling="no"><a href="https://medium.com/media/16ac9eab23020e2208ea8f082066a2f2/href">https://medium.com/media/16ac9eab23020e2208ea8f082066a2f2/href</a></iframe><h3>ChatGPT’s response to the 2nd prompt of Case 3, part IICase 3 | Connection between components</h3><p>In the 3rd case, I tested a more complex situation. This time, I asked ChatGPT to create the code that would allow the mealType value entered by the user in the form to be added to the meal type filter dropdown.</p><p>As an example, if the API only generates recipes that have the meal type “lunch/dinner” and the user adds a recipe with the meal type “breakfast” via the form, this value needs to be added to the filters dropdown.</p><p>The aim is to find out whether ChatGPT has the ability to connect information between more than one file.</p><p>As shown in the following image, the system must cross-reference information from three components: <em>CardForm</em>, <em>CardContainer,</em> and <em>Card Filter</em>. This is because React works in components, and both C<em>ardForm</em> and <em>CardFilter</em> are child components. Therefore, the information must be passed through the parent component, <em>CardContainer.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*axb6Z8OWLBoevgEuxcqKfA.png" /></figure><p>This case consisted of several prompts. Although I was only testing ChatGPT’s ability to pass <em>mealType</em> by props, I had to ask it to pass all the data entered in the form, since the website needs all the information to create a card with the new recipe data.</p><p>So I asked ChatGPT to pass the values entered in the form (<em>CardForm</em>) to the parent component (<em>CardContainer</em>).</p><p>You can see the initial prompt and the response generated by ChatGPT in the images below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jd6dXjarabK73oNl7dWnYA.png" /><figcaption>1st prompt given to ChatGPT in Case 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ML37u7BsDcBtN8m6MZFvNg.png" /><figcaption>ChatGPT’s response to the 1st prompt of Case 3, part I</figcaption></figure><p>In addition, ChatGPT completed its response by reminding the developer that the parent component (<em>CardContainer</em>) needed to pass the “onSaveNewRecipe” function (generated by ChatGPT) as a property to th<em>e CardForm</em> component, illustrating the steps to follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*bVCcCRmdqeVtlDogA5mUbg.png" /><figcaption>ChatGPT’s response to the 1st prompt of Case 3, part II</figcaption></figure><p>Let’s consider that the front-end developer has some code in <em>CardContainer</em> already, created without using ChatGPT. As shown in the images below, besides having defined two states for storing and updating the list of cards and mealTypes to be used in the <em>Filter</em> component, they have also declared the “addNewRecipe” function, where the data of the new recipes (generated by the form) is added to the list of cards shown on the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*JrFRihXTWCVfOkZmuMVt8Q.jpeg" /><figcaption>Piece of code for the CardContainer component, with 2 states</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*bduzQHD9QwZk27B0E3vVfQ.jpeg" /><figcaption>Piece of code from the CardContainer component, with the “addNewRecipe” function</figcaption></figure><p>Now, the 2nd and final prompt of this case is generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*339ZxNUBCyfZWlhELY7uWA.png" /><figcaption>2nd prompt given to ChatGPT in Case 3</figcaption></figure><p>The aim is for ChatGPT to be able to ensure that the type of meal entered by the user in the form is passed on to the <em>CardFilter</em> component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FsuHCJCFg8xysrnU2Xs4tA.png" /><figcaption>ChatGPT’s response to the 2nd prompt of Case 3, part I</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSUbzRR1L7i9vkp8oOz5Vg.png" /><figcaption>ChatGPT’s response to the 2nd prompt of Case 3, part II</figcaption></figure><p>In addition to the requested code, once again, ChatGPT went beyond the prompt and reminded the developer of the next steps to take, as can be seen in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*r8tJC7skzjKVJvjIxYyqrw.png" /><figcaption>ChatGPT’s response to the 2nd prompt of Case 3, part II</figcaption></figure><h3>Conclusions</h3><p>This test revealed AI’s tendency to go beyond the request made, suggesting next steps or even precautions to adopt in the event of following the response generated. This is one of the advantages of using AI as a tool to aid the work of the front-end developer, preventing possible forgetfulness or future errors in the code.</p><p>We must recognize the importance of how prompts are made to ChatGPT and be aware that the system needs to have access to a comprehensive context to be able to give the most appropriate, accurate, and targeted responses. The prompts must be very specific and contain all the information necessary to generate the most relevant responses.</p><p>In this way, it should be noted that the responses generated by AI can often be limited not by the capacity of the system, but by the inputs generated by the human player.</p><p>Although Foodie. has a relatively simple structure, when we think of more complex websites, where the number of components can exceed hundreds, the use of chatbots such as ChatGPT can present greater challenges, making it difficult to explain the structure of the website to the AI model, and being crucial to use explicit and complete prompts.</p><p>The conclusion is that AI can be an asset as a tool to help the front-end developer, especially in detecting errors in less complex files, thus saving time.</p><h3><strong>References</strong></h3><ul><li><a href="https://react.dev/learn/passing-props-to-a-component">Passing Props to a Component - React</a></li><li><a href="https://www.forbes.com/sites/moorinsights/2023/07/27/the-power-of-the-prompt-unleashing-ais-full-potential-for-work-productivity/">The Power Of The Prompt: Unleashing AI&#39;s Full Potential For Work Productivity</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b62e8efdf80" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mctw-tdw/chatgpt-how-powerful-is-it-in-aiding-the-front-end-developer-4b62e8efdf80">ChatGPT: how powerful is it in aiding the front-end developer?</a> was originally published in <a href="https://medium.com/mctw-tdw">MCTW_TDW</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>