<?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>Forem: Yamilka Henriquez Cosme</title>
    <description>The latest articles on Forem by Yamilka Henriquez Cosme (@yamilkahc).</description>
    <link>https://forem.com/yamilkahc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1055752%2F1720d8e9-5743-4630-abf4-89037e2aca50.png</url>
      <title>Forem: Yamilka Henriquez Cosme</title>
      <link>https://forem.com/yamilkahc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yamilkahc"/>
    <language>en</language>
    <item>
      <title>🐻 Zustand the JavaScript state handling library</title>
      <dc:creator>Yamilka Henriquez Cosme</dc:creator>
      <pubDate>Sat, 20 May 2023 20:14:46 +0000</pubDate>
      <link>https://forem.com/yamilkahc/zustand-271n</link>
      <guid>https://forem.com/yamilkahc/zustand-271n</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;By Yamilka Cosme&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Zustand is a library for managing states in React applications. Zustand is based on the Context API (yes, Zustand uses Context API to share data), allowing you to easily share and update state between application components. You can create a new store in Zustand using the createStore function. This function takes an object as an argument, which includes the initial state and the functions that update the store. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why zusntand?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced Boilerplate&lt;/strong&gt;, Zustand.js eliminates much of the boilerplate code required by Redux, allowing you to write more concise and readable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in React Integration&lt;/strong&gt;, Zustand.js is built with React in mind and seamlessly integrates with React's Context API, eliminating the need for additional libraries or boilerplate code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TypeScript Support&lt;/strong&gt;, Zustand.js provides excellent TypeScript support out of the box, making it easier to catch errors and enforce type safety in your application.&lt;br&gt;
&lt;/p&gt;&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;create&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;zustand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useMe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kd"&gt;set&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="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&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="na"&gt;lastName&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="na"&gt;updateMe&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;set&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coconut&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coconut&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="na"&gt;clearMe&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;set&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&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="na"&gt;lastName&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="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;
  
  
  &lt;strong&gt;Accessing the Store&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To access the store, first import the hook we generated (in this case, &lt;strong&gt;&lt;em&gt;useMe&lt;/em&gt;&lt;/strong&gt;), and access the state through the function &lt;em&gt;((state)⇒ state)&lt;/em&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;useMe&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;./useMe.store.ts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Home&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dataUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useMe &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="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&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;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;UserName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;dataUser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;}&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="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Home&lt;/span&gt;

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

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;Updating the state with the SET function&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To update the values we have in the store, we need to add functions that will perform this task. The functions can receive several props, one of them being set, which allows us to update the store. In this case, we have the function &lt;strong&gt;&lt;em&gt;updateMe&lt;/em&gt;&lt;/strong&gt; to update the &lt;strong&gt;&lt;em&gt;firstName&lt;/em&gt;&lt;/strong&gt; and &lt;em&gt;&lt;strong&gt;lastName&lt;/strong&gt;&lt;/em&gt;, and the function &lt;strong&gt;&lt;em&gt;clearMe&lt;/em&gt;&lt;/strong&gt; to reset the initial values in the store. The set property has a certain characteristic where we are not required to send the entire object every time, as long as it is linear.&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;create&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;zustand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useMe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kd"&gt;set&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="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&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="na"&gt;lastName&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="na"&gt;updateMe&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;set&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coco&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coco&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}})),&lt;/span&gt;
    &lt;span class="na"&gt;clearMe&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;set&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&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="na"&gt;lastName&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="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;
  
  
  &lt;strong&gt;Retrieving data from the store using the GET function within the same store&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The functions we create in the store are not always about updating data. Sometimes we need to perform actions or operations where we must use the data from the store (in this case, firstName and lastName). For such cases, we have the Get property that retrieves the current values from the store to be used in the 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;import&lt;/span&gt; &lt;span class="nx"&gt;create&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;zustand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useMe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kd"&gt;set&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="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coconut&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;from the&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;updateMe&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;set&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{...&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; coconuts`&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;
  
  
  &lt;strong&gt;&lt;em&gt;Accessing the store with shallow&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you are retrieving multiple data from the store, there may be a situation where one thing gets updated (e.g., firstName) while the others (e.g., lastName) remain the same. In this case, the application might mistakenly think that lastName has also changed because Zustand compares the entire object during the comparison process, rather than each individual element.&lt;/p&gt;

&lt;p&gt;For such cases, we have the '&lt;em&gt;&lt;strong&gt;shallow&lt;/strong&gt;&lt;/em&gt;' property. This instructs Zustand to perform a shallow comparison instead of a strict one when the state is updated. In other words, it compares each value of the previous object with each property of the current object, rather than comparing the entire previous object with the new one. This is a crucial aspect of how Zustand introduces performance improvements in global state management.&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;useMe&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;./useMe.store.ts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Home&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="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useMe&lt;/span&gt;&lt;span class="p"&gt;(&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;firstName&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;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lastName&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;lastName&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="nx"&gt;shallow&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;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;UserName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;dataUser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;dataUser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;}&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="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Home&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Did you like my post? 🤗 If so, react with ❤️ and comment below.&lt;/p&gt;

&lt;p&gt;YamiYami says bye bye. 👋&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>frontend</category>
      <category>zustand</category>
    </item>
    <item>
      <title>5 uses of ChatGPT for programmers</title>
      <dc:creator>Yamilka Henriquez Cosme</dc:creator>
      <pubDate>Wed, 03 May 2023 19:08:17 +0000</pubDate>
      <link>https://forem.com/yamilkahc/5chatgpt-578o</link>
      <guid>https://forem.com/yamilkahc/5chatgpt-578o</guid>
      <description>&lt;p&gt;&lt;strong&gt;By Yamilka Cosme&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do you prefer to read this article in Spanish? Here is the article in its Spanish version, &lt;a href="https://dev.to/yami_yami/5-usos-de-chatgpt-para-programadores-nn7"&gt;chatgptSpanish&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In recent months, we have had a bombardment of new artificial intelligence (AI) tools, which can do everything we ask of them. One of these tools is ChatGPT, which is an artificial language model designed to process and generate natural language in a way similar to how a human does. It is capable of learning from large amounts of data and generating responses to questions or texts autonomously, making it useful in a variety of applications, such as chatbots, virtual assistants, and recommendation systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mx3gaaf9d48oxzz2mzd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mx3gaaf9d48oxzz2mzd.gif" alt="Panic gif" width="220" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Panic&lt;/strong&gt; is what everyone felt when they started using these tools, and they returned working code. But, we had seen this before, remember GitHub Copilot? The same thing happened when it was released, and we are all still here. Yes, when GitHub Copilot came out, many programmers used it in their day-to-day work, and that is what we should do with ChatGPT as well.&lt;/p&gt;

&lt;p&gt;Next, I will give you 5 use cases of ChatGPT in the daily life of a programmer. And if you know more ways to use it, I invite you to write in the comments, 'In what cases have you used it?', and we can all learn. So let's get started.&lt;/p&gt;

&lt;p&gt;1- &lt;strong&gt;Website translation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have ever worked with website translations using Reacti18n, you know that this can be a headache. When translating a website, you need to have an object (key:value), where the value should be all the texts in a language X, then you must create another object that is identical, but the values should be in language Y. This is better expressed with the following example:&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="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome to my company&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;text1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Services&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Our&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;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="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bienvenido a  mi compañia&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;text1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Inicio&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Servicios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Nosotros&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;In the real world, the object will not be so small, it could easily have hundreds of lines that would need to be translated into the required languages on the website. But with ChatGPT, this is as easy as telling it,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Take this object and keep the keys as they are, and translate all the values to language X.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that's it, you can have the translation object in the languages you want.&lt;/p&gt;

&lt;p&gt;2- &lt;strong&gt;Creation of specific functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In programming, there is this concept of (utils/helpers) that are pieces of code that perform a specific function and that we can call wherever necessary in our program. An example of this would be a function that formats a number for you or returns the ISO of a currency. We can easily do this with ChatGPT, using the right words to return a well-made function (in most cases).&lt;/p&gt;

&lt;p&gt;3- &lt;strong&gt;Test creation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just as you describe the step-by-step process for your tests, you can also tell ChatGPT step-by-step what you want it to do and tell it what test technology you want to use. An example of this is the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Give me a test written in Cypress where you do the following: First, you go to the website and fill out the form with the email and password fields. Then you click the submit button. Finally, you search for a text that says "successful login".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4- &lt;strong&gt;Generate HTML/CSS template&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From creating a card to a menu, ChatGPT can create elements in HTML and CSS for you. If you want to add CSS styles, you need to be as specific as possible so that the result is as close as possible to what you want. But where ChatGPT really shines is in generating email templates.&lt;/p&gt;

&lt;p&gt;5- &lt;strong&gt;Resolution of specific questions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In our daily life as programmers, we always come across different libraries, technologies, and ways of doing things. In these cases, we add new knowledge to what we already had, and we can become confused. We were using Context for data globalization, but now we use Redux, and then we moved to Zustand. What is the difference between all these technologies? When should I use one or the other? These are common questions that we ask ourselves, and ChatGPT can explain them to us as we want and as many times as we want, even with examples and all.&lt;/p&gt;

&lt;p&gt;Did you like my post? 🤗 If so, react with ❤️ and comment below.&lt;/p&gt;

&lt;p&gt;YamiYami says bye bye. 👋&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5 uses of ChatGPT for programmers</title>
      <dc:creator>Yamilka Henriquez Cosme</dc:creator>
      <pubDate>Wed, 03 May 2023 18:51:48 +0000</pubDate>
      <link>https://forem.com/yamilkahc/5-uses-of-chatgpt-for-programmers-2pco</link>
      <guid>https://forem.com/yamilkahc/5-uses-of-chatgpt-for-programmers-2pco</guid>
      <description>&lt;p&gt;In recent months, we have had a bombardment of new artificial intelligence (AI) tools, which can do everything we ask of them. One of these tools is ChatGPT, which is an artificial language model designed to process and generate natural language in a way similar to how a human does. It is capable of learning from large amounts of data and generating responses to questions or texts autonomously, making it useful in a variety of applications, such as chatbots, virtual assistants, and recommendation systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mx3gaaf9d48oxzz2mzd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mx3gaaf9d48oxzz2mzd.gif" alt="Panic gif" width="220" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Panic&lt;/strong&gt; is what everyone felt when they started using these tools, and they returned working code. But, we had seen this before, remember GitHub Copilot? The same thing happened when it was released, and we are all still here. Yes, when GitHub Copilot came out, many programmers used it in their day-to-day work, and that is what we should do with ChatGPT as well.&lt;/p&gt;

&lt;p&gt;Next, I will give you 5 use cases of ChatGPT in the daily life of a programmer. And if you know more ways to use it, I invite you to write in the comments, 'In what cases have you used it?', and we can all learn. So let's get started.&lt;/p&gt;

&lt;p&gt;1- &lt;strong&gt;Website translation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have ever worked with website translations using Reacti18n, you know that this can be a headache. When translating a website, you need to have an object (key:value), where the value should be all the texts in a language X, then you must create another object that is identical, but the values should be in language Y. This is better expressed with the following example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
title: "Welcome to my company",
text1: "Home", 
text2: "Services", 
text3: "Our"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
title: "Bienvenido a  mi compañia",
text1: "Inicio", 
text2: "Servicios", 
text3: "Nosotros"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the real world, the object will not be so small, it could easily have hundreds of lines that would need to be translated into the required languages on the website. But with ChatGPT, this is as easy as telling it,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Take this object and keep the keys as they are, and translate all the values to language X.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that's it, you can have the translation object in the languages you want.&lt;/p&gt;

&lt;p&gt;2- &lt;strong&gt;Creation of specific functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In programming, there is this concept of (utils/helpers) that are pieces of code that perform a specific function and that we can call wherever necessary in our program. An example of this would be a function that formats a number for you or returns the ISO of a currency. We can easily do this with ChatGPT, using the right words to return a well-made function (in most cases).&lt;/p&gt;

&lt;p&gt;3- &lt;strong&gt;Test creation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just as you describe the step-by-step process for your tests, you can also tell ChatGPT step-by-step what you want it to do and tell it what test technology you want to use. An example of this is the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Give me a test written in Cypress where you do the following: First, you go to the website and fill out the form with the email and password fields. Then you click the submit button. Finally, you search for a text that says "successful login".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4- &lt;strong&gt;Generate HTML/CSS template&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From creating a card to a menu, ChatGPT can create elements in HTML and CSS for you. If you want to add CSS styles, you need to be as specific as possible so that the result is as close as possible to what you want. But where ChatGPT really shines is in generating email templates.&lt;/p&gt;

&lt;p&gt;5- &lt;strong&gt;Resolution of specific questions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In our daily life as programmers, we always come across different libraries, technologies, and ways of doing things. In these cases, we add new knowledge to what we already had, and we can become confused. We were using Context for data globalization, but now we use Redux, and then we moved to Zustand. What is the difference between all these technologies? When should I use one or the other? These are common questions that we ask ourselves, and ChatGPT can explain them to us as we want and as many times as we want, even with examples and all.&lt;/p&gt;

&lt;p&gt;Did you like my post? 🤗 If so, react with ❤️ and comment below.&lt;/p&gt;

&lt;p&gt;YamiYami says bye bye. 👋&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5 usos de ChatGPT para programadores</title>
      <dc:creator>Yamilka Henriquez Cosme</dc:creator>
      <pubDate>Tue, 25 Apr 2023 12:57:52 +0000</pubDate>
      <link>https://forem.com/yamilkahc/5-usos-de-chatgpt-para-programadores-nn7</link>
      <guid>https://forem.com/yamilkahc/5-usos-de-chatgpt-para-programadores-nn7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Por Yamilka Cosme&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;¿Prefieres leer este artículo en inglés? Aquí está el artículo en su versión en inglés &lt;a href="https://dev.to/yami_yami/5chatgpt-578o"&gt;chatgptEnglish&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;En los últimos meses, hemos tenido un bombardeo de nuevas herramientas de inteligencia artificial (IA), las cuales hacen todo lo que le pidamos. Una de ellas es ChatGPT, este es un modelo de lenguaje artificial diseñado para procesar y generar lenguaje natural de manera similar a como lo hace un ser humano. Es capaz de aprender de grandes cantidades de datos y generar respuestas a preguntas o textos de manera autónoma, lo que lo hace útil en una variedad de aplicaciones, como chatbots, asistentes virtuales y sistemas de recomendación.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyiddlsx1hxl0w8t7k5qx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyiddlsx1hxl0w8t7k5qx.gif" alt="Gif panic" width="220" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pánico&lt;/strong&gt;, es lo que todo el mundo sintió cuando empezaron a utilizar estas herramientas, y estas devolvían código que funcionaba. Pero, esto ya lo habíamos visto antes, ¿se acuerdan de GitHub Copilot?, lo mismo sucedió cuando salió, y todos seguimos aquí. Si, cuando GitHub Copilot salió, lo que hicieron muchos programadores fue usarlo en su día a día de trabajo, pues eso es lo mismo que debemos de hacer con ChatGPT.&lt;/p&gt;

&lt;p&gt;A continuación, te daré 5 casos de uso de ChatGPT en el día a día de un programador. Y si conoces más formas de utilizarlo, te invito a que escribas en los comentarios, ¿en qué casos lo has usado?, y así todos aprendemos. Entonces empezamos.&lt;/p&gt;

&lt;p&gt;1- &lt;strong&gt;Traducción de sitios web&lt;/strong&gt;&lt;br&gt;
Si en algún momento has trabajado con traducciones de sitios web con Reacti18n, sabrás que esto es un dolor de cabeza. Cuando traduces un sitio web debes de tener un objeto (key:value), en donde el value debe ser todos los textos en un idioma &lt;strong&gt;x&lt;/strong&gt;, luego debes de crear otro objeto igual cuyos value deben de estar en un idioma &lt;strong&gt;y&lt;/strong&gt;. Esto se vera mejor expresada con el siguiente ejemplo:&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="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome to my company&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;text1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Services&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Our&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;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="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bienvenido a  mi compañia&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;text1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Inicio&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Servicios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="nx"&gt;text3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Nosotros&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;En el mundo real el objeto no será así de pequeño, este podría fácilmente tener cientos de líneas, las cuales habría que traducir cada una en los idiomas requeridos en el sitio web. Pero con ChatGPT esto es tan sencillo como decirle,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Toma este objeto y mantén los keys tan cuál como están y tradúceme todos los valúes a x idioma&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Y listo podrás tener el objeto de traducción en los idiomas que quieras.&lt;/p&gt;

&lt;p&gt;2- &lt;strong&gt;Creación de funciones específicas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;En la programación existe este concepto de (utils/helpers) que son trozos de código que realizan una función específica y que la podemos llamar en donde sea necesaria en nuestro programa. Un ejemplo de esto sería una función que te formatee un número o que te devuelva la ISO de una currency. Esto lo podemos hacer fácilmente con ChatGPT que haciendo uso de las palabras correctas puede retornarnos una función bien hecha &lt;em&gt;(en la mayoría de los casos)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;3- &lt;strong&gt;Creación de pruebas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Al igual que describes el paso a paso para hacer tus pruebas, de igual forma puedes decirle a ChatGPT paso a paso que quieres que haga y decirle en que tecnología de test lo quieres. Un ejemplo de esto es el siguiente.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Dame una test escrito en cypress donde hagas los siguentes, primero entras al sitio web y llenas el formulario con los campos correo y contraseña. Luego le das click al boton de submit. Por ultimo buscas un texto que diga "inicio de session exitoso"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4- &lt;strong&gt;Generar template HTML/CSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Desde crear un card hasta un menú, ChatGPT puede crearte elementos en HTML y CSS. En el caso de que quieras agregar estilos CSS, debes de ser lo más especifico posible para que el resultado se acerque en lo más posible. Pero él lo que ChatGPT brilla más es en la generación de email template.&lt;/p&gt;

&lt;p&gt;5- &lt;strong&gt;Resolución de dudas puntuales&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;En nuestro día a día como programador siempre nos encontramos con diferentes librerías, tecnológicas y formas de hacer las cosas. En estos casos agregamos nuevo conocimiento al que ya teníamos y podemos entrar en confusión. Estábamos usando Context para la globalización de la data, pero ahora usamos Redux, pero luego pasamos a Zustand. ¿Cuál es la diferencia entre todas estas tecnologías? ¿Cuándo debería utilizar una u la otra?. Estas suelen ser preguntas comunes que nos hacemos y que ChatGPT puede explicarnos como queramos y cuantas veces queramos, incluso con ejemplos y todo.&lt;/p&gt;

&lt;p&gt;¿Te gusto mi post?🤗, si es así, reacciona ❤️ y comenta en la parte de abajo. &lt;/p&gt;

&lt;p&gt;YamiYami says bye bye👋&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>programming</category>
      <category>ai</category>
      <category>reacti18n</category>
    </item>
  </channel>
</rss>
