<?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: Ronaiza Cardoso</title>
    <description>The latest articles on DEV Community by Ronaiza Cardoso (@ronaizacardoso).</description>
    <link>https://dev.to/ronaizacardoso</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%2F102322%2Fd6744e08-533e-4bba-99fb-b06551765e5d.jpg</url>
      <title>DEV Community: Ronaiza Cardoso</title>
      <link>https://dev.to/ronaizacardoso</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ronaizacardoso"/>
    <language>en</language>
    <item>
      <title>How reading can make you a better developer</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Mon, 08 Apr 2024 19:30:52 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/how-reading-can-make-you-a-better-developer-42b9</link>
      <guid>https://dev.to/ronaizacardoso/how-reading-can-make-you-a-better-developer-42b9</guid>
      <description>&lt;p&gt;Have you ever had the feeling that everything has already been created by someone else? The world is big, and with the internet, we have the capacity to reach almost every piece of knowledge that has been produced by the human race.&lt;/p&gt;

&lt;p&gt;But this has started a long time before the popularization of the internet; the sharing of information started with books. They were the first, and in my opinion, the most amazing form of technology created before. With books, you get the chance to access the minds of great people, people who dedicated their lives to learning one specific field, and we are fortunate enough that those people were kind enough to share those learnings with us.&lt;/p&gt;

&lt;p&gt;Okay, I wonder that you are thinking something along the lines of: what is the point of all of this? How is this related to programming? Well, it turns out that programming is just a form of writing; while we are writing code, we are just talking to the computer to translate the requirements of our application to the computer.&lt;/p&gt;

&lt;p&gt;So if we are writing things, sure enough, someone has already solved the problem that we are trying to solve, but how could we find this? Again, we are fortunate enough to have one of the major "libraries" of code open to us; we just need to read through it. Reading someone else's code is one of the main forms of learning for me. When I do that, I can understand not only the language that I'm learning/working with, but also how people who dedicated their lives to writing applications think. By reading their code, I can get a shortcut on how to solve the problems that I'm facing in a more efficient way without having to spend hours of my life thinking about that problem.&lt;/p&gt;

&lt;p&gt;But life is not easy, and every approach has its problems, and over the years - I have been using this one for the past seven years, as a developer - I have faced some issues like: sometimes you are not able to frame your problem in a way that was solved before by someone else, and you have to figure this out by yourself. But interestingly enough, I used the principles of learning from others to create my own solution because, in the end, we, as a society, just exist because we are capable of learning from our peers. But while I was figuring things out with the learnings that I accumulated, I faced some anxiety, and those were addressed with exercises, help from friends, and psychotherapy.&lt;/p&gt;

&lt;p&gt;Another issue that I saw people having is not being able to spend the needed time to let things work. The internet brings a lot of good things for us, but also a lot of distractions. And this approach doesn’t work with distractions. To learn by reading, you have to spare time to let things settle inside yourself. If you get distracted by your phone, you will not be able to let your brain do the work that is needed to sink that knowledge in.&lt;/p&gt;

&lt;p&gt;Getting free from distraction and sparing time in the day to learn something is one of the foundations of a good life, a life without so much anxiety and more confidence in your endeavors.&lt;/p&gt;

</description>
      <category>developer</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Unlocking the Power of Application Testing: A Path to Confidence</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Thu, 04 Apr 2024 17:01:35 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/unlocking-the-power-of-application-testing-a-path-to-confidence-2cd7</link>
      <guid>https://dev.to/ronaizacardoso/unlocking-the-power-of-application-testing-a-path-to-confidence-2cd7</guid>
      <description>&lt;p&gt;In the dynamic world of software development, confidence is key. It's the assurance that our applications will not crumble under the weight of change, but rather adapt and evolve without interruptions. However, this confidence cannot be placed upon us; it must be earned through rigorous testing and validation. Let us delve into the essence of application testing and the imperative for developers to fully embrace it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Essence of Testing
&lt;/h2&gt;

&lt;p&gt;At its core, testing is about more than just identifying bugs; it's about instilling confidence in our products. It's about knowing that when we introduce changes, our applications will continue to function as expected. Testing serves as a safeguard, a safety net that ensures our code behaves predictably in various scenarios. By writing tests, we not only validate our code but also validate our confidence in its reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identifying What Matters
&lt;/h2&gt;

&lt;p&gt;In the vast landscape of application testing, it's easy to get lost in the minutiae of implementation details. However, effective testing is not about testing everything; it's about &lt;strong&gt;testing what matters most&lt;/strong&gt;. As developers, we must discern what aspects of our applications are critical to their success and focus our testing efforts accordingly. Whether it's core functionalities or user interactions, prioritizing what truly matters enables us to allocate our resources wisely and ensure maximum test coverage where it counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steering Clear of Pitfalls
&lt;/h2&gt;

&lt;p&gt;One common pitfall in testing is becoming wrapped up in implementation details. While it's tempting to obsess over algorithms and coding styles, such intricacies often distract us from the bigger picture. Good tests are not about testing the nitty-gritty of our code; they're about validating that our applications meet the desired outcomes. By adopting a user-centric approach to testing, we can sidestep the pitfalls of focusing on irrelevant implementation details and instead ensure that our tests align with real-world usage scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Convincing the Skeptics
&lt;/h2&gt;

&lt;p&gt;In a world driven by deadlines and deliverables, convincing stakeholders of the importance of testing can be a daunting task. However, it's essential to convey that testing is not a luxury; it's a necessity. By emphasizing the tangible benefits of testing—such as increased reliability, reduced bug-fixing costs, and improved user satisfaction—we can garner support for our testing goals. Moreover, by demonstrating the tangible value that testing adds to our applications, we can overcome skepticism and foster a culture of quality within our teams.&lt;/p&gt;

&lt;p&gt;Testing is not merely a checkbox on our development checklist; it's a mindset, a philosophy that underpins our approach to software development. By embracing the essence of testing—confidence, focus, and pragmatism, we can unlock the full potential of our applications and ensure their success in an ever-changing landscape. So let us embark on this journey of testing with conviction, knowing that with each test we write, we inch closer to unlocking the true power of our creations.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Maximizando o desempenho com inicialização lenta em React useState</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Wed, 27 Mar 2024 14:41:30 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/maximizando-o-desempenho-com-inicializacao-lenta-em-react-usestate-3jbl</link>
      <guid>https://dev.to/ronaizacardoso/maximizando-o-desempenho-com-inicializacao-lenta-em-react-usestate-3jbl</guid>
      <description>&lt;p&gt;No mundo do desenvolvimento React, otimizar o desempenho é sempre uma prioridade. Uma técnica que pode melhorar significativamente o desempenho em determinados cenários é a lazy initialization no gancho &lt;code&gt;useState&lt;/code&gt;. Vamos explorar como funciona a lazy initialization, seus benefícios e quando a usar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compreendendo a Lazy initialization
&lt;/h2&gt;

&lt;p&gt;A lazy initialization envolve adiar a inicialização de um valor até que seja realmente necessário. No contexto do gancho useState do React, isso significa fornecer uma função como argumento de estado inicial em vez de um valor estático.&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;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;dados&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setDados&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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="c1"&gt;// Execute a inicialização cara aqui&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fetchDataFromLocalStorage&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;Ao passar uma função para &lt;code&gt;useState&lt;/code&gt;, o código de inicialização é executado apenas quando o componente é renderizado pela primeira vez. Isso é particularmente útil em cenários onde o processo de inicialização consome muitos recursos, como buscar dados de um servidor remoto ou ler do armazenamento local.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefícios da lazy initialization
&lt;/h2&gt;

&lt;p&gt;A lazy initialization oferece vários benefícios, incluindo:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Melhoria no Desempenho: Ao atrasar a inicialização do estado até que seja necessário, você pode evitar trabalho desnecessário durante a renderização do componente. Isso pode levar a tempos de renderização inicial mais rápido e uma interface de usuário mais responsiva.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Evitar Valores Obsoletos: Ao usar a lazy initialization, o valor retornado pela função de inicialização está sempre atualizado. Isso ajuda a evitar problemas com dados obsoletos, especialmente em componentes que são frequentemente renderizados novamente.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Funções de Despacho e useState do React
&lt;/h2&gt;

&lt;p&gt;Outro aspecto importante a considerar ao usar lazy initialization em &lt;code&gt;useState&lt;/code&gt; é o comportamento da função de despacho retornada pelo gancho. As funções de despacho no React são projetadas para fornecer acesso ao valor de estado anterior, garantindo que as atualizações sejam baseadas no estado mais recente.&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;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;contagem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setContagem&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Incrementar contagem com base no estado anterior&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incrementar&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="nf"&gt;setContagem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;contagemAnterior&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;contagemAnterior&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;Ao usar a forma de função de &lt;code&gt;setState&lt;/code&gt;, você pode evitar possíveis problemas com valores de estado obsoletos, especialmente em cenários onde as atualizações de estado são assíncronas ou ocorrem rapidamente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Co-localização para Melhor Manutenção
&lt;/h2&gt;

&lt;p&gt;Além de otimizar o desempenho com lazy initialization, também é essencial seguir as melhores práticas para organização de código e manutenção. A co-localização, a prática de manter código e comentários relacionados próximos, pode melhorar significativamente a legibilidade e a manutenção da sua base de código.&lt;/p&gt;

&lt;p&gt;Ao manter o estado e sua lógica associada perto de onde são usados, você facilita para os desenvolvedores entenderem como diferentes partes da aplicação interagem. Isso pode levar a depurações mais rápidas, refatorações mais fáceis e colaboração mais suave entre os membros da equipe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Aprendendo com o Epic React e Desenvolvedores Especialistas
&lt;/h2&gt;

&lt;p&gt;Todas essas valiosas informações sobre lazy initialization e organização de código foram obtidas no curso Epic React, um recurso abrangente para dominar o desenvolvimento React. Ao aplicar esses padrões em projetos do mundo real e aprender com a experiência de desenvolvedores experientes, você pode garantir que suas aplicações React sejam não apenas eficientes, mas também mantidas e escaláveis.&lt;/p&gt;

&lt;p&gt;Além disso, muitos desses padrões e melhores práticas foram documentados e endossados por especialistas na comunidade React. Ao seguir convenções estabelecidas e aproveitar a sabedoria coletiva da comunidade, você pode construir aplicações React robustas, eficientes e prazerosas de trabalhar.&lt;/p&gt;

&lt;p&gt;Espero que tenha achado este artigo útil! Lembre-se do poder da lazy initialization e da co-localização. Incorporar essas práticas garante aplicações eficientes, fáceis de manter e escaláveis.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>performance</category>
    </item>
    <item>
      <title>Maximizing Performance with Lazy Initialization in React useState</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Wed, 27 Mar 2024 14:36:12 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/maximizing-performance-with-lazy-initialization-in-react-usestate-3n5m</link>
      <guid>https://dev.to/ronaizacardoso/maximizing-performance-with-lazy-initialization-in-react-usestate-3n5m</guid>
      <description>&lt;p&gt;In the world of React development, optimizing performance is always a top priority. One technique that can significantly improve performance in certain scenarios is lazy initialization in the useState hook. Let's delve into how lazy initialization works, its benefits, and when to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Lazy Initialization
&lt;/h2&gt;

&lt;p&gt;Lazy initialization involves deferring the initialization of a value until it is actually needed. In the context of React's useState hook, this means providing a function as the initial state argument instead of a static value.&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;const&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;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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="c1"&gt;// Perform expensive initialization here&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fetchDataFromLocalStorage&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;By passing a function to useState, the initialization code is only executed when the component is rendered for the first time. This is particularly useful in scenarios where the initialization process is resource-intensive, such as fetching data from a remote server or reading from local storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Lazy Initialization
&lt;/h2&gt;

&lt;p&gt;Lazy initialization offers several benefits, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Improved Performance: By delaying the initialization of state until it's needed, you can avoid unnecessary work during component rendering. This can lead to faster initial render times and a more responsive user interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoiding Stale Values: When using lazy initialization, the value returned by the initialization function is always up-to-date. This helps prevent issues with stale or outdated data, especially in components that are re-rendered frequently.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Dispatch Functions and React useState
&lt;/h2&gt;

&lt;p&gt;Another important aspect to consider when using lazy initialization in useState is the behavior of the dispatch function returned by the hook. Dispatch functions in React are designed to provide access to the previous state value, ensuring that updates are based on the latest 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="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Increment count based on previous state&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;increment&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="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prevCount&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;prevCount&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;By using the function form of setState, you can avoid potential issues with stale state values, especially in scenarios where state updates are asynchronous or occur in rapid succession.&lt;/p&gt;

&lt;h2&gt;
  
  
  Co-location for Improved Maintainability
&lt;/h2&gt;

&lt;p&gt;In addition to optimizing performance with lazy initialization, it's also essential to follow best practices for code organization and maintainability. Co-location, the practice of keeping related code and comments close together, can greatly improve the readability and maintainability of your codebase.&lt;/p&gt;

&lt;p&gt;By keeping state and its associated logic close to where it's used, you make it easier for developers to understand how different parts of the application interact. This can lead to faster debugging, easier refactoring, and smoother collaboration among team members.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning from Epic React and Expert Developers
&lt;/h2&gt;

&lt;p&gt;All of these valuable insights into lazy initialization and code organization were gleaned from the Epic React course, a comprehensive resource for mastering React development. By applying these patterns in real-world projects and learning from the expertise of seasoned developers, you can ensure that your React applications are not only performant but also maintainable and scalable.&lt;/p&gt;

&lt;p&gt;Additionally, many of these patterns and best practices have been documented and endorsed by experts in the React community. By following established conventions and leveraging the collective wisdom of the community, you can build React applications that are robust, efficient, and a joy to work with.&lt;/p&gt;

&lt;p&gt;I hope you found this article helpful! Remember the power of lazy initialization and co-location. Incorporating these practices ensures efficient, maintainable, and scalable applications.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>performance</category>
    </item>
    <item>
      <title>Um simples truque para otimizar as re-renderizações no React</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Tue, 26 Mar 2024 19:26:51 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/um-simples-truque-para-otimizar-as-re-renderizacoes-no-react-bo0</link>
      <guid>https://dev.to/ronaizacardoso/um-simples-truque-para-otimizar-as-re-renderizacoes-no-react-bo0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is a translation of the original post&lt;br&gt;
&lt;a href="https://kentcdodds.com/blog/optimize-react-re-renders" rel="noopener noreferrer"&gt;One simple trick to optimize React re-renders&lt;/a&gt; by&lt;br&gt;
&lt;a href="https://kentcdodds.com/" rel="noopener noreferrer"&gt;Kent C. Dodds&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Eu estava preparando um post para o blog sobre um assunto relacionado a re-renderizações no React quando me deparei com essa pequena jóia de conhecimento do React que acredito que você vai gostar muito:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1143200604065431552-997" src="https://platform.twitter.com/embed/Tweet.html?id=1143200604065431552"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1143200604065431552-997');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1143200604065431552&amp;amp;theme=dark"
  }



  &lt;/p&gt;

&lt;p&gt;Após ler esse post no blog, &lt;a href="https://twitter.com/BrooksLybrand" rel="noopener noreferrer"&gt;Brooks Lybrand&lt;/a&gt; implementou esse truque e esse foi o resultado:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1149800755404185609-671" src="https://platform.twitter.com/embed/Tweet.html?id=1149800755404185609"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1149800755404185609-671');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1149800755404185609&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Animado? Vamos desvendar com um exemplo simples e fictício e então discutir sobre qual aplicação prática isso tem para você em seus aplicativos do dia a dia.&lt;/p&gt;

&lt;h3&gt;
  
  
  Um exemplo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// brinque com isso no codesandbox: https://codesandbox.io/s/react-codesandbox-g9mt5

import * as React from 'react'
import ReactDOM from 'react-dom'

function Logger(props) {
  console.log(`${props.label} renderizado`)
  return null // o que é retornado aqui é irrelevante...
}

function Counter() {
  const [count, setCount] = React.useState(0)
  const increment = () =&amp;gt; setCount(c =&amp;gt; c + 1)
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button onClick={increment}&amp;gt;O contador está em {count}&amp;lt;/button&amp;gt;
      &amp;lt;Logger label="contador" /&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}

ReactDOM.render(&amp;lt;Counter /&amp;gt;, document.getElementById('root'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quando isso é executado, "contador renderizado" será registrado no console inicialmente e toda vez que o contador for incrementado, "contador renderizado" será registrado no console. Isso acontece porque quando o botão é clicado, o estado muda e o React precisa obter os novos elementos React para renderizar com base nessa mudança de estado. Quando ele obtém esses novos elementos, ele os renderiza e os aplica ao DOM.&lt;/p&gt;

&lt;p&gt;Aqui está onde as coisas ficam interessantes. Considere o fato de que  nunca muda entre as renderizações. É estático e, portanto, poderia ser extraído. Vamos tentar isso só por diversão (não estou recomendando que você faça isso, espere mais tarde na postagem do blog por recomendações práticas).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// brinque com isso no codesandbox: https://codesandbox.io/s/react-codesandbox-o9e9f

import * as React from 'react'
import ReactDOM from 'react-dom'

function Logger(props) {
  console.log(`${props.label} renderizado`)
  return null // o que é retornado aqui é irrelevante...
}

function Counter(props) {
  const [count, setCount] = React.useState(0)
  const increment = () =&amp;gt; setCount(c =&amp;gt; c + 1)
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button onClick={increment}&amp;gt;O contador está em {count}&amp;lt;/button&amp;gt;
      {props.logger}
    &amp;lt;/div&amp;gt;
  )
}

ReactDOM.render(
  &amp;lt;Counter logger={&amp;lt;Logger label="contador" /&amp;gt;} /&amp;gt;,
  document.getElementById('root'),
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Você percebeu a mudança? Sim! Temos o registro inicial, mas então não recebemos novos registros quando clicamos no botão! O QUÊ!?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Se você quiser pular todos os detalhes técnicos profundos e ir direto para "o que&lt;br&gt;
  isso significa para mim", vá em frente e vá direto para lá agora&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  O que está acontecendo?
&lt;/h3&gt;

&lt;p&gt;Então, o que está causando essa diferença? Bem, tem a ver com os elementos do React. Por que você não dá uma pausa rápida e lê minha postagem no blog &lt;a href="https://kentcdodds.com/blog/what-is-jsx" rel="noopener noreferrer"&gt;"O que é JSX?"&lt;/a&gt; para ter um rápido lembrete sobre os elementos do React e sua relação com o JSX.&lt;/p&gt;

&lt;p&gt;Quando o React chama a função do contador, ele recebe algo que se parece um pouco com isso:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// algumas coisas removidas para clareza
const elementoDoContador = {
  type: 'div',
  props: {
    children: [
      {
        type: 'button',
        props: {
          onClick: increment, // este é o manipulador de clique
          children: 'O contador está em 0',
        },
      },
      {
        type: Logger, // esta é a nossa função de componente de registro
        props: {
          label: 'contador',
        },
      },
    ],
  },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esses são chamados de objetos descritores de IU. Eles descrevem a IU que o React deve criar no DOM (ou via componentes nativos para react native). Vamos clicar no botão e dar uma olhada nas mudanças:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const elementoDoContador = {
  type: 'div',
  props: {
    children: [
      {
        type: 'button',
        props: {
          onClick: increment,
          children: 'O contador está em 1',
        },
      },
      {
        type: Logger,
        props: {
          label: 'contador',
        },
      },
    ],
  },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Até onde podemos ver, as únicas mudanças são as props onClick e children do elemento button. No entanto, todo o conteúdo é completamente novo! Desde os primórdios do uso do React, você está criando esses objetos totalmente novos em cada renderização. (Felizmente, até os navegadores móveis são bastante rápidos nisso, então isso nunca foi um problema de desempenho significativo).&lt;/p&gt;

&lt;p&gt;Pode ser mais fácil investigar as partes deste conjunto de elementos do React que são iguais entre as renderizações, então aqui estão as coisas que NÃO mudaram entre essas duas renderizações:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const elementoDoContador = {
  type: 'div',
  props: {
    children: [
      {
        type: 'button',
        props: {
          onClick: increment,
          children: 'O contador está em 1',
        },
      },
      {
        type: Logger,
        props: {
          label: 'contador',
        },
      },
    ],
  },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Todos os tipos de elementos são iguais (isso é típico), e a propriedade label para o elemento Logger não mudou. No entanto, o objeto de props em si muda a cada renderização, mesmo que as propriedades desse objeto sejam iguais ao objeto de props anterior.&lt;/p&gt;

&lt;p&gt;Ok, aqui está o ponto crucial. Porque o objeto de props do Logger mudou, o React precisa reexecutar a função do Logger para garantir que não receba nenhum novo JSX com base no novo objeto de props (além dos efeitos que podem precisar ser executados com base na mudança de props). Mas e se pudéssemos evitar que as props mudassem entre as renderizações? Se as props não mudarem, o React sabe que nossos efeitos não precisam ser reexecutados e nosso JSX não deve mudar (porque o React depende do fato de que nossos métodos de renderização devem ser idempotentes). É exatamente isso que o React é codificado para fazer bem aqui e tem sido assim desde o início do React!&lt;/p&gt;

&lt;p&gt;Ok, mas o problema é que o React cria um novo objeto de props toda vez que criamos um elemento do React, então como garantir que o objeto de props não mude entre as renderizações? Espero que agora você entenda por que o segundo exemplo acima não estava re-renderizando o Logger. Se criarmos o elemento JSX uma vez e reutilizarmos o mesmo, obteremos o mesmo JSX todas as vezes!&lt;/p&gt;

&lt;h3&gt;
  
  
  Vamos juntar tudo novamente
&lt;/h3&gt;

&lt;p&gt;Aqui está o segundo exemplo novamente (para que você não precise rolar para cima):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// brinque com isso no codesandbox: https://codesandbox.io/s/react-codesandbox-o9e9f

import * as React from 'react'
import ReactDOM from 'react-dom'

function Logger(props) {
  console.log(`${props.label} renderizado`)
  return null // o que é retornado aqui é irrelevante...
}

function Counter(props) {
  const [count, setCount] = React.useState(0)
  const increment = () =&amp;gt; setCount(c =&amp;gt; c + 1)
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button onClick={increment}&amp;gt;O contador está em {count}&amp;lt;/button&amp;gt;
      {props.logger}
    &amp;lt;/div&amp;gt;
  )
}

ReactDOM.render(
  &amp;lt;Counter logger={&amp;lt;Logger label="counter" /&amp;gt;} /&amp;gt;,
  document.getElementById('root'),
)

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

&lt;/div&gt;



&lt;p&gt;Então vamos verificar as coisas que são iguais entre as renderizações:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const counterElement = {
  type: 'div',
  props: {
    children: [
      {
        type: 'button',
        props: {
          onClick: increment,
          children: 'O contador está em 1',
        },
      },
      {
        type: Logger,
        props: {
          label: 'counter',
        },
      },
    ],
  },
}

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

&lt;/div&gt;



&lt;p&gt;Como o elemento Logger está completamente inalterado (e, portanto, as props também estão inalteradas), o React pode automaticamente fornecer essa otimização para nós e não se preocupar em re-renderizar o elemento Logger, pois ele não deveria precisar ser re-renderizado de qualquer maneira. Isso é basicamente como o React.memo, exceto que, em vez de verificar cada uma das props individualmente, o React verifica o objeto de props holisticamente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Então, o que isso significa para mim?
&lt;/h2&gt;

&lt;p&gt;Em resumo, se você estiver enfrentando problemas de desempenho, tente isso:&lt;/p&gt;

&lt;p&gt;1 - "Eleve" o componente caro para um pai onde ele será renderizado com menos frequência.&lt;br&gt;
2 - Em seguida, passe o componente caro como uma propriedade.&lt;br&gt;
Você pode descobrir que fazer isso resolve seu problema de desempenho sem precisar espalhar o React.memo por todo o seu código como um grande band-aid intrusivo 🤕😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Criar um exemplo prático de um aplicativo lento em React é complicado porque geralmente requer a construção de um aplicativo completo, mas eu tenho um exemplo de aplicativo criado artificialmente que tem uma versão antes/depois para você conferir e brincar &lt;a href="https://codesandbox.io/s/react-codesandbox-qtdob" rel="noopener noreferrer"&gt;aqui&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚠️
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Uma coisa que eu quero adicionar é que, mesmo que seja melhor usar a versão mais rápida deste código, ele ainda tem um desempenho muito ruim quando é renderizado inicialmente e teria um desempenho muito ruim se precisasse realmente fazer outra renderização completa (ou quando você atualiza as linhas/colunas). Isso é um problema de desempenho que provavelmente deveria ser tratado por seus próprios méritos (independente de quão necessárias são as re-renderizações). Além disso, por favor, lembre-se de que o CodeSandbox usa a versão de desenvolvimento do React, que oferece uma experiência de desenvolvimento muito boa, mas tem um desempenho MUITO mais lento do que a versão de produção do React.
&lt;/h2&gt;

&lt;p&gt;⚠️&lt;/p&gt;

&lt;p&gt;E isso não é apenas algo útil no nível superior do seu aplicativo. Isso pode ser aplicado em qualquer lugar do seu aplicativo onde faça sentido. O que eu gosto nisso é que "&lt;a href="https://twitter.com/dan_abramov/status/1143201204094341120" rel="noopener noreferrer"&gt;É natural para composição e atua como uma oportunidade de otimização.&lt;/a&gt;" (foi o Dan quem disse). Então, faço isso naturalmente e obtenho os benefícios de desempenho de graça. E é isso que sempre amei no React. O React é escrito de forma que aplicativos React idiomáticos sejam rápidos por padrão, e então o React fornece ajudantes de otimização para você usar como saídas de emergência.&lt;/p&gt;

&lt;p&gt;Boa sorte!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Clean Architecture—The introduction</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Wed, 22 Feb 2023 23:35:11 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/clean-architecture-the-introduction-574c</link>
      <guid>https://dev.to/ronaizacardoso/clean-architecture-the-introduction-574c</guid>
      <description>&lt;p&gt;Clean Architecture aims to separate the business rules or domain of an application from external resources like databases and frameworks. However, according to Rodrigo Branas, a more suitable name for it could be Clean Design, as architecture imposes constraints such as language and paradigm, while design involves defining responsibilities and their distribution.&lt;/p&gt;

&lt;p&gt;Douglas Martin stresses that design is an unavoidable aspect of any project, and the only alternative to good design is bad design, not a complete absence of it. Even if someone not consciously attempts to design something, it will still be designed in some form, whether the result is a good or poor design. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reinventing the wheel (or almost)
&lt;/h3&gt;

&lt;p&gt;Rodrigo Branas explains that Clean Architecture does not invent anything new with its core principles. Instead, it builds upon concepts that were already introduced in Ivar Jacobson's software architecture books from the 1990s, specifically the use-case driven approach. The book isn't about reinventing the wheel, but rather refining and adapting existing concepts. &lt;/p&gt;

&lt;p&gt;Ivar Jacobson's book introduced several key concepts that are still relevant today, such as the Entity-Boundary-Control (EBC) pattern. It involves separating the entity (the object representation), the boundary (the external consumer), and the control (the coordinator) to create a more modular and flexible architecture. By using this pattern, developers can create software systems that are easier to maintain and modify over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core principles
&lt;/h3&gt;

&lt;p&gt;According to Robert Martin, the core of your application is not centered around the database or any framework being used, but rather the use cases of your application. Achieving this requires the isolation of business rules, the definition of layers and responsibilities, and careful control of flow and dependencies within the application. By prioritizing these aspects, developers can ensure that the use cases of the application remain at the center of the development process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping this up
&lt;/h3&gt;

&lt;p&gt;This was just an introduction, providing background information on the book and its history. In a subsequent post, I plan to delve into the key concepts presented in the Clean Code Architecture course by Rodrigo Branas, including enterprise and application business rules, interface adapters, and frameworks and drivers. These concepts are going to be a big part of what we do as developers on a day-to-day basis.``&lt;/p&gt;

</description>
    </item>
    <item>
      <title>BEM - Block__Element–Modifier.</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Sun, 20 Sep 2020 11:20:40 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/bem-blockelement-modifier-4k1j</link>
      <guid>https://dev.to/ronaizacardoso/bem-blockelement-modifier-4k1j</guid>
      <description>&lt;p&gt;BEM is a modular solution for writing CSS to large projects. Since BEM is just a conjunct of concepts about how to naming the class, we can only see the real benefit of using it in large codebases.&lt;/p&gt;

&lt;p&gt;The goal is to create extendable and reusable interface components. This methodology helps maintain a large codebase organization and avoid the nightmare of change one CSS in one specific area and breaking the other.&lt;/p&gt;

&lt;p&gt;Looking through the concept of each  letter:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Block:&lt;/strong&gt; An entity that is meaningful on its own, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;.card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Element:&lt;/strong&gt; A part of a block that has no standalone meaning and is semantically tied to its block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;.card__picture
.card__title
.card__descriptiom
.card__button
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Modifier:&lt;/strong&gt; A flag on a block or element. Used to change appearance or behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;.card__button--active
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Summary of great content about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/" rel="noopener noreferrer"&gt;https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.bem.info/" rel="noopener noreferrer"&gt;https://en.bem.info/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>bem</category>
    </item>
    <item>
      <title>Ionic vs React Native: Pros and cons</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Thu, 25 Jun 2020 11:34:34 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/ionic-vs-react-native-pros-and-cons-2f13</link>
      <guid>https://dev.to/ronaizacardoso/ionic-vs-react-native-pros-and-cons-2f13</guid>
      <description>&lt;p&gt;If you're thinking about &lt;a href="https://www.imaginarycloud.com/services/app-development" rel="noopener noreferrer"&gt;building a mobile app&lt;/a&gt;, this article is for you. I mean, almost everyone has a smartphone these days. Can you name a better way to engage with your users and make their lives easier? &lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://www.gartner.com/en/documents/3751863/market-guide-for-mobile-application-testing-services" rel="noopener noreferrer"&gt;a study&lt;/a&gt; conducted by Gartner, 70% of all enterprise software interactions are expected to occur on mobile devices by 2022.&lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;the mobile ecosystem is complex&lt;/strong&gt;. In order to have an app published on Play Store or App Store, you may need to have two different development teams: one for Android and another for iOS, which can lead to a cost increase. &lt;/p&gt;

&lt;p&gt;To address this struggle, &lt;strong&gt;cross-platform tools&lt;/strong&gt; started to pop up. In this article, we're going to compare &lt;strong&gt;Ionic&lt;/strong&gt; and &lt;strong&gt;React Native&lt;/strong&gt;, which are the most relevant libraries. But first, let me introduce you to the cross-platform world.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Native Apps vs Cross-platform mobile apps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Today, there are plenty of ways of having a &lt;strong&gt;mobile application&lt;/strong&gt; as a final product. The most popular solution is building it as &lt;strong&gt;native&lt;/strong&gt;, by using the native language of each platform. The alternative is to choose a &lt;strong&gt;cross-platform tool&lt;/strong&gt; that I will mention later on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using native code leads to superior performance&lt;/strong&gt;, but has the downside of having two teams to handling the product: one for the Android ecosystem and another for iOS.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cross-platform libraries rely on standard web tools like HTML, CSS, and &lt;strong&gt;JavaScript&lt;/strong&gt;, providing native experiences by accessing the native features. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The hybrid path has the advantage of &lt;strong&gt;increasing the speed of mobile development&lt;/strong&gt;, by having just one project for both platforms and offering &lt;strong&gt;UX consistency&lt;/strong&gt; across channels. After this short introduction, let's go further in detail about the two most used tools to &lt;strong&gt;build cross-platform mobile applications&lt;/strong&gt;: &lt;strong&gt;Ionic and React Native&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Ionic vs React Native: Which one is more popular?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Both have a wide community around them, with a strong adoption by big companies and mobile applications used by a very large number of customers. This is what we can perceive from &lt;a href="https://www.npmtrends.com" rel="noopener noreferrer"&gt;&lt;strong&gt;npmtrends&lt;/strong&gt;&lt;/a&gt; data: &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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Fionic_vs_react-native_data.png" 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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Fionic_vs_react-native_data.png" alt="Ionic vc React Native npm download" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As seen in the graphic above, &lt;strong&gt;Ionic&lt;/strong&gt; had way more downloads than &lt;strong&gt;React Native&lt;/strong&gt; in 2017. This occurred because &lt;strong&gt;Ionic&lt;/strong&gt; is older than &lt;strong&gt;React Native&lt;/strong&gt;. At that time, it was more mature, ready to be used in mobile development, with less bugs and more stable. After 2019, Facebook put more effort into making &lt;strong&gt;React Native&lt;/strong&gt; a stable library, by updating it frequently, using it in their own products, and presenting showcases about the results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ionic&lt;/strong&gt; also &lt;a href="https://ionicframework.com/customers" rel="noopener noreferrer"&gt;has plenty&lt;/a&gt; of apps that were released to both Play Store (Android) and App Store (iOS). The Untappd App is one of the examples.&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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Fapp-untappd.png" 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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Fapp-untappd.png" alt="Untappd app, built with Ionic" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While with &lt;strong&gt;React Native&lt;/strong&gt;, we can check the &lt;a href="https://www.youtube.com/watch?v=g3jwd0kAIDU" rel="noopener noreferrer"&gt;Marketplace&lt;/a&gt; feature, that is part of Facebook app.&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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Freact-facebook-marketplace.jpg" 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%2Fwww.imaginarycloud.com%2Fblog%2Fcontent%2Fimages%2F2020%2F05%2Freact-facebook-marketplace.jpg" alt="Facebook Marketplace with React Native" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is better: Ionic or React Native?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Both of them have different characteristics and different ecosystems. Let’s talk about each of them individually to better understand how &lt;strong&gt;Ionic&lt;/strong&gt; and &lt;strong&gt;React Native&lt;/strong&gt; work and its pros and cons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ionic - A Hybrid Framework
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Ionic: what is it?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Ionic Framework&lt;/strong&gt; is an open-source UI toolkit for building mobile and &lt;strong&gt;Progressive Web Apps (PWAs)&lt;/strong&gt; apps using web technologies like HTML, CSS, and &lt;strong&gt;JavaScript&lt;/strong&gt;. It provides mobile-optimized web technology-based components as well as native APIs using &lt;a href="https://capacitor.ionicframework.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Capacitor&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://ionicframework.com/docs/native/community" rel="noopener noreferrer"&gt;&lt;strong&gt;Ionic Native&lt;/strong&gt;&lt;/a&gt;. It was created in 2013, by the Drifty Co. The original version was released in 2013, built on top of Angularjs and &lt;a href="https://cordova.apache.org/y" rel="noopener noreferrer"&gt;&lt;strong&gt;Apache Cordova&lt;/strong&gt;&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://ionicframework.com/blog/announcing-ionic-react/" rel="noopener noreferrer"&gt;In 2019 they launched&lt;/a&gt; a version with support for multiple front-ends, including React.js. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Today you can &lt;strong&gt;build an Hybrid mobile application&lt;/strong&gt; in Ionic with Angular, React.js, Vuejs, or even with just plain JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now let’s take a look at its advantages:&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Has a good documentation, since it's a company specialized in building tools that help companies and developers to make mobile applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These tools are well understood by web developers since it uses webview to render the application (letting the developers use day-to-day technologies like HTML, CSS, and &lt;strong&gt;JavaScript&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes it easy to port the code into a &lt;strong&gt;Progressive Web App (PWA)&lt;/strong&gt;, since all the code is built to run in a web browser. &lt;strong&gt;Ionic&lt;/strong&gt; just requires a &lt;a href="https://ionicframework.com/blog/announcing-ionic-react/" rel="noopener noreferrer"&gt;few extra&lt;/a&gt; steps to be able to have one &lt;strong&gt;PWA&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although it has benefits, we can also encounter some challenges in the way, like the ones listed below:&lt;/p&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Since the organization behind the framework makes a living from it, besides the &lt;em&gt;fremium&lt;/em&gt; features, there are also premium ones that you can only use if you pay an extra cost.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ionic&lt;/strong&gt; is built on top of the “web browser”. The application code can't easily access the native functionalities.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  React Native - Learn once, write anywhere.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;React Native: what is it?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With &lt;strong&gt;React Native&lt;/strong&gt;, developers can build mobile applications for Android and iOS platforms using &lt;strong&gt;JavaScript&lt;/strong&gt;, but they can also implement features with native code. It enables cross-platform builds by providing platform-agnostic native components that map into the platforms’ native UI building blocks. It was created in 2015 by Facebook and it is used in many of its products, as for example, the &lt;a href="https://www.youtube.com/watch?v=NCAY0HIfrwc&amp;amp;feature=emb_title" rel="noopener noreferrer"&gt;marketplace&lt;/a&gt; section of Facebook's application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Developers can also build &lt;a href="https://reactnative.dev/docs/building-for-tv" rel="noopener noreferrer"&gt;TV applications&lt;/a&gt; with  &lt;strong&gt;React Native&lt;/strong&gt;. This means that with a few extra steps, it is possible to deliver applications for the &lt;strong&gt;Apple TV&lt;/strong&gt; and &lt;strong&gt;Android TV&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, lets dive into some benefits of &lt;strong&gt;React Native&lt;/strong&gt;:&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Massive community around the &lt;strong&gt;ecosystem&lt;/strong&gt;. Right now, there are impressive numbers on &lt;strong&gt;GitHub&lt;/strong&gt; repo &lt;a href="https://github.com/facebook/react-native" rel="noopener noreferrer"&gt;facebook/react-native&lt;/a&gt;. This means that it's very likely for developers to find answers to issues or problems they're facing. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ability of being integrated into existing &lt;a href="https://reactnative.dev/docs/integration-with-existing-apps" rel="noopener noreferrer"&gt;native apps&lt;/a&gt;, like showed in this &lt;a href="https://www.youtube.com/watch?v=NCAY0HIfrwc" rel="noopener noreferrer"&gt; presentation&lt;/a&gt;. Besides that, it's also possible to build &lt;a href="https://reactnative.dev/docs/native-modules-setup" rel="noopener noreferrer"&gt;native modules&lt;/a&gt;, making your mobile application's look and feel as smooth as a native application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React Native&lt;/strong&gt; is translated to &lt;strong&gt;native code&lt;/strong&gt;, with the benefit of achieving &lt;a href="https://reactnative.dev/docs/performance" rel="noopener noreferrer"&gt;60 frames per second&lt;/a&gt;. This gives the user the impression of a native app - not slow at all!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It allows developers to deliver applications for Apple TV and Android TV, with only a few extra steps.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now let's take a look at the issues we've encountered as below:&lt;/p&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Since there's a big private company behind it, new tools are released according to their own needs. However, the community is free to extend the desired features, to achieve what is necessary for both Android and iOS native technologies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React Native&lt;/strong&gt; is still beta. Yes, you read it right. Although it was created five years ago, the Facebook team still didn’t have the confidence to bump a "production" release of it. It may sound like: "be aware of the possible risks". &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This often leads to breaking changes in tools and dependencies between versions. But hey, Gmail was almost 5 years in beta and it worked pretty well.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is the difference between React Native and Ionic?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Both allow developers to build mobile applications that can run on different platforms and use JavaScript as the principal language. However, &lt;strong&gt;Ionic's&lt;/strong&gt; approach is more "web-like". This means that the application runs on a web browser wrapped in an SDK, to access the native functionalities. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React Native&lt;/strong&gt; uses three bridges, &lt;strong&gt;UI Thread&lt;/strong&gt;, &lt;strong&gt;Layout Thread&lt;/strong&gt;, and &lt;strong&gt;Javascript Virtual Machine&lt;/strong&gt;, to trade information by sending messages to each one.&lt;/p&gt;

&lt;p&gt;It uses the JavaScript language to map the native capabilities. This allows developers to build &lt;strong&gt;mobile applications&lt;/strong&gt; that are then translated into &lt;strong&gt;native code&lt;/strong&gt;. On the other hand, the &lt;strong&gt;Ionic Framework&lt;/strong&gt; uses web technologies (HTML, CSS, and JavaScript) to build the applications. It is possible to use &lt;strong&gt;Ionic Native&lt;/strong&gt; and/or &lt;strong&gt;Capacitator&lt;/strong&gt;  to connect JavaScript and &lt;strong&gt;native abilities&lt;/strong&gt; like accessing the user location, Bluetooth, camera, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ionic&lt;/strong&gt; and &lt;strong&gt;React Native&lt;/strong&gt; also have a different technology stack. With &lt;strong&gt;Ionic&lt;/strong&gt;, developers are building one application on top of the browser, and have the ability to use all the &lt;strong&gt;npm packages&lt;/strong&gt; available to &lt;strong&gt;React.js&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React Native&lt;/strong&gt; has a more restricted stack since the code is translated to native code. Despite this, the &lt;strong&gt;React Native&lt;/strong&gt; community is very large, with lots of ready to use libraries that help the &lt;strong&gt;mobile application&lt;/strong&gt; development.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;When to use Ionic or React Native?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Since &lt;strong&gt;Ionic&lt;/strong&gt; works with web technologies (HTML, CSS, and JavaScript) it fits well in a team that has no background in the native world. &lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Ionic&lt;/strong&gt;, you will have the capability to make great mobile applications, accessing native features like GPS, maps, or audio. These features are ready to be deployed into both Play Store and App Store, with the same effort and expertise that will require to build a web site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React Native&lt;/strong&gt; is easily addressed by developers with prior iOS or Android development knowledge. The learning curve for a &lt;strong&gt;React&lt;/strong&gt; developer to understand and debug a &lt;strong&gt;React Native&lt;/strong&gt; application is higher than with &lt;strong&gt;Ionic&lt;/strong&gt;. However, &lt;strong&gt;React Native&lt;/strong&gt; stands with the golden triumph of accessing the native functionalities of the mobile devices, allowing your &lt;strong&gt;mobile application&lt;/strong&gt; to deliver a more native look and feel.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Found this article useful? You might like these ones too!&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.imaginarycloud.com/blog/how-to-configure-eslint-prettier-in-react/" rel="noopener noreferrer"&gt;How To Configure Eslint And Prettier In React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.imaginarycloud.com/blog/angular-vs-react/" rel="noopener noreferrer"&gt;Angular Vs React: A Comparison Of Both Frameworks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.imaginarycloud.com/blog/5-common-errors-found-in-a-react-native-app-using-expo/" rel="noopener noreferrer"&gt;5 Common Errors Found in a React Native APP (Using EXPO)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ionic</category>
      <category>reactnative</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Demystifying React Hooks vs Redux</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Tue, 09 Jun 2020 11:37:16 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/demystifying-react-hooks-vs-redux-38eg</link>
      <guid>https://dev.to/ronaizacardoso/demystifying-react-hooks-vs-redux-38eg</guid>
      <description>&lt;p&gt;What is the difference between Redux and React Hooks? &lt;a href="https://www.imaginarycloud.com/blog/react-hooks-vs-redux/" rel="noopener noreferrer"&gt;In this article&lt;/a&gt;, you'll find a walkthrough into these features and how they fit in each use-case.&lt;/p&gt;

</description>
      <category>redux</category>
      <category>reacthooks</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>5 Common Errors Found In A React Native App (Using Expo)</title>
      <dc:creator>Ronaiza Cardoso</dc:creator>
      <pubDate>Thu, 07 May 2020 16:59:22 +0000</pubDate>
      <link>https://dev.to/ronaizacardoso/5-common-errors-found-in-a-react-native-app-using-expo-4hj0</link>
      <guid>https://dev.to/ronaizacardoso/5-common-errors-found-in-a-react-native-app-using-expo-4hj0</guid>
      <description>&lt;p&gt;When creating a mobile app with React Native, you can use Expo to streamline some complexities. In this &lt;a href="https://www.imaginarycloud.com/blog/5-common-errors-found-in-a-react-native-app-using-expo/"&gt;article&lt;/a&gt;, I talk about the most common errors and how to solve them.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>expo</category>
      <category>react</category>
    </item>
  </channel>
</rss>
