<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alcides Bezerra on Medium]]></title>
        <description><![CDATA[Stories by Alcides Bezerra on Medium]]></description>
        <link>https://medium.com/@alcides.bsilvaneto?source=rss-b57291858c4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fKfsWuG0g_CVDxVm.jpg</url>
            <title>Stories by Alcides Bezerra on Medium</title>
            <link>https://medium.com/@alcides.bsilvaneto?source=rss-b57291858c4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 23:47:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alcides.bsilvaneto/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Built and Published a React Native Animated Pagination Dots Component in 5 Minutes (with AI)]]></title>
            <link>https://medium.com/@alcides.bsilvaneto/how-i-built-and-published-a-react-native-animated-pagination-dots-component-in-5-minutes-with-ai-4765df54fbfb?source=rss-b57291858c4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4765df54fbfb</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Alcides Bezerra]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 20:32:58 GMT</pubDate>
            <atom:updated>2025-03-23T23:15:02.700Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve always wanted to publish an NPM package — partly to give back to the community, and partly because I’ve often built reusable components and thought, <em>“It’d be great to just yarn add my-component in a future project.”</em> But like many devs, I never seemed to find the time to learn all the steps involved. So this goal sat on my never-ending TODO list… until now.</p><p><strong>The Spark</strong></p><p>While revisiting React Native recently — maybe out of nostalgia for those days of building MVPs from scratch and learning tons in the process — I stumbled upon some beautiful UI designs on the Figma community. That sparked a side project idea: React Native + NestJS, just to stay sharp.</p><p>As I started building, I needed a custom carousel pagination component. Naturally, I thought, <em>“There must be a library for this.”</em> And there are — plenty of them, actually. But none of them quite captured the animated effect I saw in the Figma reference. I wanted it pixel-perfect.</p><p>So I decided to build the component from scratch using the amazing react-native-reanimated. It turned out really well — so well, in fact, that I felt proud enough to consider publishing it as an open-source NPM package.</p><p>Then the mental roadblocks hit me:</p><p>• Set up a new repo</p><p>• Configure package.json</p><p>• Write documentation</p><p>• Add a README</p><p>• Set up NPM publishing…</p><p>Honestly, that was usually where I gave up.</p><p>But this time, I remembered a tool that’s become essential in my workflow: <a href="https://www.warp.dev/">Warp Terminal</a>, specifically its built-in AI features.</p><p><strong>The AI Magic</strong></p><p>Inside the React Native project directory, I simply typed the following natural language prompt:</p><blockquote><strong><em>“I just created a very nice react pagination dots component in this project and was thinking about publishing it to an npm package.”</em></strong></blockquote><p>Warp (powered by the Claude 3.7 Sonnet model) went to work, and here’s what it did — automatically:</p><p>• Scanned my project and detected the React Native structure</p><p>• Located the pagination component based on the filename</p><p>• Noticed that react-native-pagination-dots was already taken on NPM and suggested multiple alternative names</p><p>• Created a base directory (safely within my Projects folder) with a modular and well-structured layout</p><p>• Initialized a Git repo with a proper .gitignore and MIT license</p><p>• Bootstrapped a TypeScript project using up-to-date CLIs instead of just dumping boilerplate</p><p>• Copied over my component from the main project</p><p>• Added JSDoc-style documentation to the props</p><p>• Generated a high-quality README (seriously, it was pretty good!)</p><p>• Set up a publishing script in the package.json</p><p>• Gave me a clear summary of everything it had done and the exact next steps to publish — like logging into NPM, creating a GitHub repo, linking remotes, and pushing.</p><p>What once felt like a multi-hour, error-prone process now took <strong>under five minutes</strong>.</p><p>Here’s the package, in case you’re curious:</p><p>👉 <a href="https://github.com/alcidesbsilvaneto/rn-flexible-dots">github.com/alcidesbsilvaneto/rn-flexible-dots</a></p><p><strong>AI vs. Human: What Really Happened</strong></p><p><strong>🔥 Where AI Shined</strong></p><p>• <strong>Excellent Documentation</strong>: It auto-generated a detailed README, complete with prop tables, usage examples, and badges.</p><p>• <strong>TypeScript Integration</strong>: Added proper interfaces and type definitions.</p><p>• <strong>Accessibility</strong>: Included roles and accessibility labels for better UX.</p><p>• <strong>Code Structure</strong>: Used best practices like useMemo and useCallback for performance.</p><p><strong>🧠 Where Human Expertise Was Crucial</strong></p><p>As a senior React Native developer, here’s where I had to step in:</p><p>1. Fix logical animation bugs the AI couldn’t resolve</p><p>2. Optimize performance using real-world React Native patterns</p><p>3. Validate props and add sensible default values</p><p>4. Handle platform-specific quirks and differences</p><p>5. Refactor the component for long-term maintainability</p><p><strong>🐛 Challenges I Faced</strong></p><p>• <strong>Persistent Errors</strong>: Some logical animation issues kept coming back.</p><p>• <strong>Repeating Mistakes</strong>: The AI made the same mistake even after correction.</p><p>• <strong>Unanticipated Edge Cases</strong>: Required heavy tweaking for real-world usage.</p><p>• <strong>Missing RN-Specific Optimizations</strong>: Things like Animated.FlatList tweaks had to be added manually.</p><p><strong>The Takeaway: Human + AI = 🚀</strong></p><p>This experience was a powerful reminder that <strong>AI is a phenomenal accelerator</strong>, not a replacement. It did in five minutes what would’ve taken me a couple hours on my own — but the final product still needed <strong>human polish</strong> to be truly production-ready.</p><p>We’re entering an era where developers who embrace AI tools will work faster and smarter. The routine tasks — boilerplate, setup, docs — are no longer bottlenecks. That leaves us more time to focus on what really matters: quality, edge cases, UX, and clean, maintainable code.</p><p>The creation of rn-flexible-dots wasn’t just about publishing a component. It was about discovering how AI can supercharge a developer’s workflow <strong>without replacing the craftsmanship</strong> that comes from experience.</p><p>Let me know what you think, and if you try the component, I’d love your feedback!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4765df54fbfb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Runtime enviroments with React + Vite + Heroku pipelines]]></title>
            <link>https://medium.com/@alcides.bsilvaneto/runtime-enviroments-with-react-vite-heroku-pipelines-de11144be4d9?source=rss-b57291858c4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/de11144be4d9</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[vitejs]]></category>
            <dc:creator><![CDATA[Alcides Bezerra]]></dc:creator>
            <pubDate>Thu, 16 Mar 2023 18:47:35 GMT</pubDate>
            <atom:updated>2023-03-16T18:47:35.109Z</atom:updated>
            <content:encoded><![CDATA[<h4>Deploy React enviroment-aware apps using heroku pipelines and Vite</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PC2M5cxckXUwVyJxuHJwzw.png" /><figcaption>Image source: <a href="https://medium.com/@hasniarif/how-to-handle-runtime-environment-variables-with-react-ec809cb07831">https://medium.com/@hasniarif/how-to-handle-runtime-environment-variables-with-react-ec809cb07831</a></figcaption></figure><h4><strong>The problem(s)</strong></h4><p>When you build a react app which makes API requests, most of the time you&#39;re using a base url like &#39;http://localhost:3001/api/v1&#39; in development, some other url in production, and setting it up like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9dbc903c972cfb6f699189ef866f3324/href">https://medium.com/media/9dbc903c972cfb6f699189ef866f3324/href</a></iframe><p>Now you want to implement a more efficient way of delivering your application and find out that heroku pipelines is just what you need to do that, with github integration, automatic deploy, review apps and just a few clicks to setup a &#39;preview &gt; staging &gt; production&#39; pipeline.</p><p>But now you have a problem: Your staging react app should probably use the staging api url, which is probably different from the production one. And at first you should think this is a solution</p><pre>baseURL: process.env.APP_ENV === &quot;staging&quot; ? &quot;https://staging.api.com/v1&quot; : process.env.APP_ENV === &quot;production&quot; ? &quot;https://production.api.com/v1&quot; : &quot;http://localhost:3001/v1&quot;</pre><p>Or even try to define your entire base url in a enviroment variable.</p><pre>baseURL: process.env.API_URL</pre><p>Those codes leads you to a problem, since any <strong>process.env </strong>variable<strong> </strong>is basically replaced by a static value when you build your application, when you deliver this code to the &#39;staging&#39; enviroment it will build, and replace the enviroment variables with the ones you defined in your heroku app (staging in this case), and when you promote your code to production through heroku&#39;s pipeline, your code will not be built again, it will just be &quot;cloned&quot; to the production app, and that brings you instant production deploys, but leaves you with the staging enviroment variables.</p><p><strong>The solution</strong></p><p>If you are using create-react-app or craco, you could just use <a href="https://github.com/mars/heroku-js-runtime-env">this heroku buildpack</a>, follow the instructions and with just a few lines of code, get your problem solved. But you are here because just like me, you joined the Vite&#39;s hype train and couldn&#39;t stand going back to CRA or Craco.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*2qpq2NWeKpYttlWTPMUlyA.gif" /><figcaption>That&#39;s you experiencing vite after years using CRA</figcaption></figure><p>After digging all over the stack-overflow and github for some solution like the buildpack I used to use with CRA, I just realized that I could solve my problem with just few lines of code, although it may not look like a beautiful solution, it worked like a charm to me.</p><p>If you tried to deploy a vite&#39;s react app to heroku, after some research and headaches you know that the best, or even unique option to do so is to serve the static files with an express server, and use the <a href="https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-nodejs">Heroku nodejs buildpack</a>. If you already did this, you will already have your express server file and it will look something like this, except for the commented lines, which will basically setup your enviroment variables, and setup a GET /env endpoint, which will return your enviroment variables according to your heroku app enviroment.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31fb7c2da4b87b62048478353bf3dc3d/href">https://medium.com/media/31fb7c2da4b87b62048478353bf3dc3d/href</a></iframe><p>Heroku will provide the .env file to your application, and those variables are defined in <a href="https://devcenter.heroku.com/articles/config-vars">Heroku&#39;s config variables</a>.</p><p>Now you just have to load those variables in your react app, and there are many ways to do it, but this is the way I&#39;ve done:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/827c89de9e560df5665eb6a55090de0f/href">https://medium.com/media/827c89de9e560df5665eb6a55090de0f/href</a></iframe><p>Pretty simple right?</p><p>Now you have a runtime-enviroment-aware React app, with all the benefits of Vite and Heroku pipelines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de11144be4d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing custom fonts (ttf or otf) on react-native (0.60+) projects.]]></title>
            <link>https://medium.com/@alcides.bsilvaneto/installing-custom-fonts-ttf-or-otf-on-react-native-0-60-projects-e8dafbc0dff3?source=rss-b57291858c4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8dafbc0dff3</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alcides Bezerra]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 18:57:07 GMT</pubDate>
            <atom:updated>2020-09-30T18:57:07.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*coEM-LSsVWqweKeWHYCMHg.jpeg" /></figure><p>I&#39;ve decided to write that article based on my own experience with custom fonts, there are some really great tutorials and solutions over the internet, but I had to group some of those to make it work on my project, mainly because I am using <a href="https://github.com/oblador/react-native-vector-icons">react-native-vector-icons</a>, and faced some conflicts.</p><p>You&#39;re probably here looking for a solution to iOS &#39;unrecognized font family&#39;, right? But let me tell you how to install custom fonts first, then, I hope I can help you with the problems (if you have).</p><h3>Installing custom fonts</h3><p>First, download your font family. In most cases you will download a package with the font variations. I will use Montserrat, and you can find it <a href="https://fonts.google.com/specimen/Montserrat?preview.text=&amp;preview.text_type=custom#standard-styles">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*uxVnsTmHuH7pNwWc205k7Q.png" /><figcaption>You should have something like this</figcaption></figure><p>Then, create a folder on your project called assets, and inside the assets folder, create a folder called fonts, then, put your font files inside the fonts folder. And you should have something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*myr43NXnAeBDNFwHlULqsw.png" /><figcaption>Want those icons on vscode? Install the Material Icon Theme extension.</figcaption></figure><p>Now you have to create a file named <strong>react-native.config.js </strong>on your project root directory with the below content</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06430eb700d4c068e578541acc1a207b/href">https://medium.com/media/06430eb700d4c068e578541acc1a207b/href</a></iframe><h3>Linking your fonts</h3><blockquote>Read it carefully</blockquote><p>In most cases, if you run <em>npx react-native link</em>, you should be ready to use your brand new font. BUT, if you are using react-native-vector-icons, like I am, you may face some problems with iOS compilation, so, I will show you how to manually link the fonts, and It&#39;s pretty easy.</p><h4>Android manual linking</h4><p>To start using your custom fonts on android, you just have to copy your fonts to <em>android/app/src/main/assets/fonts. And that&#39;s it.</em></p><h4>iOS manual linking</h4><p>First, add your fonts to your project by clicking at your project&#39;s name at the left panel, then going to <strong>Build Phases</strong>, and clicking in the + button on the <strong>Copy Bundle Resources.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tAEhtElIcti0IhJuMgRlcw.png" /></figure><p>Then, add your fonts to the <strong>info.plist</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*w_9dQszwxNFked8NOqg8hg.png" /></figure><p>Now you should clean your build (with <strong>Command + shift + K</strong>, or going to Product menu and clicking <strong>Clean build folder</strong>) and run your app.</p><p>And finally you use your new fonts like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4d6083e04a287cc943e15691dbb6203/href">https://medium.com/media/a4d6083e04a287cc943e15691dbb6203/href</a></iframe><h3>Common problems</h3><p>Sometimes your font name is not the same for Android and iOS. In most cases, in android, the font is the same as the file, for example, I had this problem when using SF-Compact font.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cafb0dc7349d822a261cb0618ba0f637/href">https://medium.com/media/cafb0dc7349d822a261cb0618ba0f637/href</a></iframe><p>So, how do you find your font name on iOS? Just add this inside the <strong>didFinishLaunchingWithOptions</strong><em> </em>method on your <strong>AppDelegate.m</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de895c460a0d5c774a4c239adcaad7d0/href">https://medium.com/media/de895c460a0d5c774a4c239adcaad7d0/href</a></iframe><p>Then, when you launch your app with xcode, you will be able to see all the fonts installed on your app, so you just have to use it the way it is listed on your console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*H835QGtsT7fzUw2v70GqYQ.png" /></figure><p>And that&#39;s it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8dafbc0dff3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>