<?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 Alik Rodrigues on Medium]]></title>
        <description><![CDATA[Stories by Alik Rodrigues on Medium]]></description>
        <link>https://medium.com/@alikorodrigues?source=rss-918b6bb041ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VUOPIbjsubph_lv5.jpg</url>
            <title>Stories by Alik Rodrigues on Medium</title>
            <link>https://medium.com/@alikorodrigues?source=rss-918b6bb041ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:30:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alikorodrigues/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[Traveling and Working, a road trip during 56 days on Brazilian Coast]]></title>
            <link>https://medium.com/@alikorodrigues/traveling-and-working-a-road-trip-during-56-days-on-brazilian-coast-3f3bd2a8f3?source=rss-918b6bb041ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f3bd2a8f3</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[nomad]]></category>
            <category><![CDATA[roadtrip]]></category>
            <category><![CDATA[traveling]]></category>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Alik Rodrigues]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 12:18:25 GMT</pubDate>
            <atom:updated>2022-12-04T12:18:25.376Z</atom:updated>
            <content:encoded><![CDATA[<h4>The mystic Brazilian road 101</h4><p>First of all, let me introduce myself a little bit…</p><p>I’m a software developer working remotely about 3 years, I live with my wife and our two dogs I love the nomad life style and I’ve been in another country and working from there so I already had a experience working during a trip and I like it.</p><p>On June me and my wife decided to make a travel to Ilhéus in Bahia state it’s about a 2.466 km using the quickest way from Florianópolis that is where we live, but it will be so easy to us and we choose to go through Brazilian coast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPJna04PGsO5o1GfAF5byA.jpeg" /></figure><h3>1° Day</h3><h4>Florianópolis to Pontal do Sul</h4><p>in the first day we drove about 4 hours 290km in very good road, Arriving in the city we went to find a place to stay during the weekend, using google maps this task was easy and we find a camping front beach and we paid 30BRL each person and we could sleep hearing the ocean sound</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YuZ0dvQfNDTE3Hy6SumN7w.jpeg" /></figure><h4>2° Day<br>Pontal do Sul to Santos</h4><p>it’s Sunday and we already had a Airbnb scheduled in Santos SP and it is a 6 hours driving but cause the traffic we took 8 hours, so we didn’t have much time, because we prefer drive during the day and not drive on night, we go to Santos before lunch. We arrived in our Airbnb almost 6 pm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBghtNPgRxe7akDekIEneA.jpeg" /></figure><h3>3° Day to 7° Day<br>Santos-SP</h3><p>The first business days of the trip and one of the my top view to work that I had worked, my window in front of the desk give me a lot of peace with the ocean and small islands I loved Santos, it’s a big city with big cities problems but still having a pretty beach and the population going to the beach on morning, it’s so nice then me and my wife started to walk every morning on the beach on front our Airbnb.</p><p>Speaking about work, as I mentioned i had a very beautiful view on my window and the internet connection was very good I didn’t have connection problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m9CnCl4kkqKkaUOIBmh6Mw.jpeg" /></figure><h4>7° Day<br>Bertioga - SP</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-3_FsLDzbrAHPGtI5S6ihg.jpeg" /></figure><p>Still on the 7° day we needed to get out of Santos because the check out of Airbnb, it was raining and on night so we decided to go driving about 1 or 2 hours and find a camping to us..</p><p>We found out a very beautiful place, a camping that was on the beach and a very quiet beach. We just stayed for one night, on next morning we went to Ubatuba.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1rs73qhsjzVJfKZNo73ag.jpeg" /></figure><h3>8° Day to 9° Day<br>Ubatuba -SP to Paraty-RJ</h3><p>Ubatuba is a small city but there are +80 beaches even having a small urban area, it’s one of the best places to go surf and a few famous surfers was born there. Unfortunately we didn’t have much to time visit all the beaches and the downtown, Actually</p><p>we arrived without a scheduled local to stay, we went to a 7 campings to find one that allows dogs and we liked, It was a Saturday so we set up a tent and stayed on camping and resting into a rainy night.</p><p>On morning we didn’t lose time and when the rain stopped, we walked to the nearest beach, we passed some time there and we went back to the camping and we stored everything again on the car and before lunch we was driving again in direction to Paraty in Rio de Janeiro state. We stopped on Trindade a very very small village but very very beautiful too, we just spend 2 hours there to lunch and back to the road to complete until Paraty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIsH5tpQEKWtKFgOeuWSUw.jpeg" /></figure><h3>10° Day to 15° Day</h3><p>Paraty-RJ</p><p>It’s another place that is a piece of haven in the earth with a lot of beaches, islands and its crystal waters.</p><p>During our stay we got a lot of rain, so we couldn’t walk every morning like in Santos, that was a thing we loved in Santos.</p><p>on the Airbnb we had comfort and safe because the rain but the internet connection was not so good and on that week was the first time that I had to use my mobile connections shared to my laptop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fhUAWeWMBJD0EEwVhyquyA.jpeg" /></figure><p>Almost in the end of week the sun was back and we enjoy it to took a Kayak ride.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tF8HLKBEM1_8rK8ZBpfk8A.jpeg" /></figure><p>And on the last day on Paraty we could go to the downtown and enjoy there, Paraty has a huge culture history.. I will not talk about it here because the google can say better than me 😅 but i would say on my YouTube channel you can see it as well @trilhandosonhos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r1dIFi0f75l_wJuIvLm9Zg.jpeg" /></figure><p>This was our first 15 days on travel.</p><p>3 states and 4 cities that we stayed at least one night.</p><p>I will be back the next 15 days of trip on next week.</p><p><a href="http://youtube.com/@trilhandosonhos">www.youtube.com/@trilhandosonhos</a></p><p>Instagram: Trilhando Sonhos</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f3bd2a8f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I separate the logic and my view in React Native]]></title>
            <link>https://medium.com/@alikorodrigues/how-i-separate-the-logic-and-my-view-in-react-native-3262ce9b2cdb?source=rss-918b6bb041ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/3262ce9b2cdb</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Alik Rodrigues]]></dc:creator>
            <pubDate>Thu, 18 Aug 2022 11:17:57 GMT</pubDate>
            <atom:updated>2022-08-18T11:17:57.070Z</atom:updated>
            <content:encoded><![CDATA[<p>Getting a small code using the single responsibility</p><p>Let’s think about how we did create our screens and components…</p><p>If we need a simple screen to show data coming from an Axios request <br>We will get something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*U299kXAfJtzYIDH8PkdaEQ.png" /><figcaption>Initial view</figcaption></figure><p>and now, you need to add an onPress function to do any logic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*yyS14InYAc4ksqNXNy8Ilg.png" /><figcaption>view with handle press</figcaption></figure><p>Ok, there is no problem to do your logic code and view code on the same file, You can do this and there are a lot of companies and developers doing their apps exactly like this.</p><p>But, if you already do it in a big app with a lot of functions, libs, and logical calculations you probably got a big component file doing all responsibilities in just one file and if you created a test for this component, perhaps you had to create mocks for the libs, requests even your test case is just to test if the title text is rendered or not ( getByText() using testing-library for example). Ok, now you may are thinking “I can do a setup file with my mocks so, I don’t need to mock every time in each file” and I would say, yeah, you are right you can do this too.</p><p>But if I say to you that you can make your components cleaner and split the responsibility into two files and then you will have small files, with your view more testable because you won’t need to mock anything ( I’d like to say if you will do the hook tests you probably will need to mock something )</p><p>Our components will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*kCE5aXHu32QdgnkfB0gt7A.png" /><figcaption>HomeView with a single responsibility</figcaption></figure><p>and our new hook file will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*GsiF2FHckC2vjzLwpxU8eg.png" /><figcaption>useHome Hook</figcaption></figure><p>And now we need to create a function that will connect our two files ( hook and view) to export as a screen or component that you will use normally</p><p>For it, let’s create an index file with just eight lines of code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*4VIUoQJcUKEqUjUobg-B_Q.png" /><figcaption>Exporting your component to be used by the app</figcaption></figure><p>For the last, we need to create the withHook function that will do the “magic” to wrap our component with the hook returns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVfmP6uuJ4D_-cU_G_4KSw.png" /><figcaption>withHook function</figcaption></figure><p>And on the end, we have 3 files for the component and 1 util file that will be used for each component/screen that you will do from here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*1LPmNf_WqSzxd55IdHLmAA.png" /><figcaption>Folders</figcaption></figure><h3>Conclusion</h3><p>There isn’t the best way or best pattern for all teams and projects, there are a lot of ways to create your components. And with this way you can separate your logic and view of course, if your app is small maybe it’s not needed <br>Once the app grows you will need to create tests and add more logic to your components and for this case maybe using the single responsibility your code will still be small and maintainable.</p><p>In the next article, I will do some tests for this Home screen and useHome the hook with the Testing library.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3262ce9b2cdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How you can identify performance lows]]></title>
            <link>https://medium.com/@alikorodrigues/how-you-can-find-identify-performance-lows-9e0fc48b0222?source=rss-918b6bb041ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e0fc48b0222</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[react-devtools]]></category>
            <dc:creator><![CDATA[Alik Rodrigues]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 17:06:33 GMT</pubDate>
            <atom:updated>2022-07-25T12:52:57.851Z</atom:updated>
            <content:encoded><![CDATA[<p>Using React devtools to identify which time to render and prevent bugs</p><p>In this article, I’ll show you, how you can use react devtools to prevent render problems and it will consume more memory than necessary</p><h3><strong>FlatList or Map?</strong></h3><p>So, to start let’s talk about two different ways to render an array,<br>I know some of you guys are great developers and already know FlatList is better but Did you ever take a look at how big is the difference? <br>We will create a dummy array with 1000 positions and render it once using FlatList and another using Map then react devtools will show us how long the time to render the array.</p><p>Let’s start with FlatList</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VO1OfL8vZxCYdDTivh57cA.png" /><figcaption>FlatList time to render 1000 items</figcaption></figure><p>The emulator took 135.7ms to render our screen…</p><p>Now let’s see the results of the map function</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ni73woA5IOeDiS3cxUwgMA.png" /><figcaption>Map Function time to render 1000 items</figcaption></figure><p>Now, the emulator took 5384ms to render our screen 😱</p><p>We can see a huge difference between those ways to render an array, of course, there are ways to improve a little bit the render performance for both <br>( FlatList, Map) but honestly, we cannot do a miracle<br> if you need to render a lot of items FlatList will do it better than Map.</p><p>Perhaps now you are thinking, ”Ok since right now I will only use FlatList” <br>but that is not the correct answer, always depends on how many items you need to render, let’s imagine you need to render only 5 items</p><p>The flatlist took 67ms to render the screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hzWzEoh4M4BJ8gBk9vKpdA.png" /><figcaption>FlatList 5 items</figcaption></figure><p>Using the map function, the emulator took 51.9ms to render our screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E38WH5TEM2l0myifZwleUQ.png" /><figcaption>Map function 5 items</figcaption></figure><p>Then we can conclude, that not always Flatlist is the better solution for render your list. you can read more about how Flatlist works <a href="https://reactnative.dev/docs/virtualizedlist">https://reactnative.dev/docs/virtualizedlist</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e0fc48b0222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a native library to React Native]]></title>
            <link>https://medium.com/@alikorodrigues/how-to-create-a-native-library-to-react-native-ba5dbfb428ee?source=rss-918b6bb041ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba5dbfb428ee</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Alik Rodrigues]]></dc:creator>
            <pubDate>Tue, 28 Jun 2022 23:24:07 GMT</pubDate>
            <atom:updated>2022-06-28T23:24:07.623Z</atom:updated>
            <content:encoded><![CDATA[<p>Create your React-Native library</p><p>Sometimes we need to use some native API to get information/value to use in our JS Side. <br>In this article let’s see how we can create our own React Native Lib with android code.</p><h3>Creating a lib</h3><p>first of all, there is a react native command to help us create our lib we can use:</p><blockquote>npx create-react-native-library [YOUR MODULE NAME]</blockquote><p>after this, the CLI shows us some configurations to choose:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HTE5lwLO92e5S6Hz8ZZQMg.png" /></figure><p>Let’s select the first option: <strong>Java &amp; Objective-C </strong>and then <strong>Native Modules</strong></p><p>This is our selected configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*bWiGJAYxvgNM5Mf7c-UOBw.png" /></figure><h3>Default Code</h3><p>once we have the project created, you can notice some default folders/code inside your module folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*K33qGF9Oidq4K-C0SXgpAw.png" /><figcaption>Files inside myModule</figcaption></figure><p><strong>example</strong>: It is an example app that will use the module created.<br><strong>android/ios</strong>: It is the native folder where we can code our native methods to be called by the JS Side from our module (src/index.tsx)<br><strong>src/index.tsx</strong>: Let’s call this guy a “bridge” to call our native code (inside the folders above) for the app that is using our module.</p><p>some files you can remove if it is not necessary for you like<strong> .circleci</strong> for example.</p><h3>Analyzing the example method</h3><p>let’s see how is the method created as an example by the command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*BFrucTr_hP52TC2Y5s4Khg.png" /><figcaption>Module file to Android</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*HdPdADtOGbxEZUP1aBAZ4w.png" /><figcaption>Module file to IOS</figcaption></figure><p>In the files above you can see the multiply method with its simple logic to just multiply two values and put the result into a resolve function.</p><p>but for the apps to be able to use we need the <strong>src/index.tsx</strong> to call the native code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*LdVpvFFkrU3hySb_asA1hw.png" /><figcaption>src/index.tsx</figcaption></figure><p>explaining a little bit of the code above, It is creating a const with the reference of the native module then we have a function that is an exported fnc using the module reference and calling the respective method from the Native Side.<br>Now, we can use this method in our App (that is using our module) let’s see how the example app does this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*Xox26xVIi21xepR4YN2tOg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba5dbfb428ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>