<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ponikar</title>
    <description>The latest articles on Forem by Ponikar (@ponikar).</description>
    <link>https://forem.com/ponikar</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%2F602686%2Fccd3d87e-b207-4ff7-8846-ceb1cc965348.jpeg</url>
      <title>Forem: Ponikar</title>
      <link>https://forem.com/ponikar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ponikar"/>
    <language>en</language>
    <item>
      <title>What the heck is OpenClaw/Clawbot/MoltBot?</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Wed, 04 Feb 2026 19:24:32 +0000</pubDate>
      <link>https://forem.com/ponikar/what-the-heck-is-openclawclawbotmoltbot-1icd</link>
      <guid>https://forem.com/ponikar/what-the-heck-is-openclawclawbotmoltbot-1icd</guid>
      <description>&lt;h2&gt;
  
  
  Why Are AI Agents Suddenly a Big Deal?
&lt;/h2&gt;

&lt;p&gt;Something happened recently in the world of AI agents. All of a sudden, people around me started going crazy about this new AI agent whose name has already changed three times.&lt;/p&gt;

&lt;p&gt;But AI agents are not new. They’ve been around for almost three years. So what changed? Why does it suddenly feel like a big deal or even a breakthrough in the era of AI agents?&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;At its core, an AI agent is an LLM that is given a concrete instruction to perform a particular task.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It can reason to make better decisions
&lt;/li&gt;
&lt;li&gt;It has access to a set of tools to perform actions in the real world
&lt;/li&gt;
&lt;li&gt;It can operate beyond simple text generation
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Enter OpenClaw
&lt;/h2&gt;

&lt;p&gt;OpenClaw (yes, the one that changed its name three times) does something similar — but also &lt;strong&gt;a lot more&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;First of all, it’s &lt;strong&gt;open source&lt;/strong&gt;, which means anyone can run it locally or on the cloud.&lt;/p&gt;

&lt;p&gt;But more importantly, OpenClaw is not just an agent — it’s an &lt;strong&gt;agentic system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of it this way:&lt;br&gt;&lt;br&gt;
When LLMs entered the real world, they only had a brain. They could think and respond, but only through text. It always felt like something was missing.&lt;/p&gt;

&lt;p&gt;AI agents were supposed to bridge that gap.&lt;/p&gt;

&lt;p&gt;OpenClaw is one of the first serious attempts at doing exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  An AI That Has Its Own World
&lt;/h2&gt;

&lt;p&gt;OpenClaw can literally &lt;strong&gt;control a computer&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It understands its environment
&lt;/li&gt;
&lt;li&gt;It can take actions
&lt;/li&gt;
&lt;li&gt;It can spawn multiple sub-agents to handle complex tasks
&lt;/li&gt;
&lt;li&gt;It can effectively manage and coordinate those agents
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why it’s recommended to give OpenClaw an &lt;strong&gt;isolated and dedicated environment&lt;/strong&gt; to do its work.&lt;/p&gt;

&lt;p&gt;Yes, you &lt;em&gt;can&lt;/em&gt; run it on your own machine — but unless you really know what you’re doing, it’s risky.&lt;/p&gt;




&lt;h2&gt;
  
  
  Communication: How Do You Talk to It?
&lt;/h2&gt;

&lt;p&gt;Any AI agent needs a way to communicate with humans.&lt;/p&gt;

&lt;p&gt;Usually, this is done via a web-based UI. But OpenClaw is designed to run independently and potentially forever.&lt;/p&gt;

&lt;p&gt;So instead of a UI, it uses existing &lt;strong&gt;messaging platforms&lt;/strong&gt; like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Telegram
&lt;/li&gt;
&lt;li&gt;WhatsApp
&lt;/li&gt;
&lt;li&gt;Slack
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These channels allow you to access the agent from any device. They establish a secure connection so whenever you send a message, the agent acknowledges it, responds, or takes action.&lt;/p&gt;




&lt;h2&gt;
  
  
  Dashboard
&lt;/h2&gt;

&lt;p&gt;OpenClaw is &lt;strong&gt;model-agnostic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can configure it to use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic models
&lt;/li&gt;
&lt;li&gt;Google Gemini
&lt;/li&gt;
&lt;li&gt;Open-source models
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You choose whatever works best for your use case.&lt;/p&gt;




&lt;h2&gt;
  
  
  Agents
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczsal0v5u1mmldynsq5x.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczsal0v5u1mmldynsq5x.png" alt="Agent architecture" width="574" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you set up OpenClaw, you start with a single agent that is managed via a gateway.&lt;/p&gt;

&lt;p&gt;You can then create multiple specialized agents for specific tasks.&lt;/p&gt;

&lt;p&gt;The real beauty of OpenClaw is that these agents can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communicate with each other
&lt;/li&gt;
&lt;li&gt;Assign tasks
&lt;/li&gt;
&lt;li&gt;Share context
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Memory System
&lt;/h2&gt;

&lt;p&gt;OpenClaw has a structured memory system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AGENTS.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Operating instructions and additional memory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;memory/YYYY-MM-DD.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Daily append-only logs that capture day-to-day context&lt;br&gt;&lt;br&gt;
(today’s and yesterday’s files are loaded at session start)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MEMORY.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Curated long-term memory for decisions, preferences, and durable facts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SOUL.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Defines the agent’s persona, tone, boundaries, and communication style&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IDENTITY.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Specifies the agent’s name, vibe, emoji, and avatar&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;USER.md&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Stores facts about you, including your preferred name and profile details&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Skills
&lt;/h2&gt;

&lt;p&gt;Skills are special doors that let the agent interact with the outside world — similar to tools in LLMs.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playing your favorite song on Spotify
&lt;/li&gt;
&lt;li&gt;Calling APIs
&lt;/li&gt;
&lt;li&gt;Interacting with services
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Heartbeat (Cron Jobs)
&lt;/h2&gt;

&lt;p&gt;OpenClaw also supports scheduled tasks using cron-like heartbeats.&lt;/p&gt;

&lt;p&gt;Running an agent 24/7 is a bad idea unless you’re doing very intensive work.&lt;/p&gt;

&lt;p&gt;Instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent wakes up at a specific time
&lt;/li&gt;
&lt;li&gt;Does its job
&lt;/li&gt;
&lt;li&gt;Goes back to sleep
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach minimizes compute costs.&lt;/p&gt;

&lt;p&gt;If multiple agents are involved, they can coordinate by updating &lt;code&gt;MEMORY.md&lt;/code&gt; to assign tasks or share context.&lt;/p&gt;




&lt;h2&gt;
  
  
  So What’s the Real Breakthrough?
&lt;/h2&gt;

&lt;p&gt;What’s surprising is that OpenClaw isn’t built on some brand-new LLM breakthrough.&lt;/p&gt;

&lt;p&gt;It still uses the same class of models that appeared around 2022 — just smarter versions.&lt;/p&gt;

&lt;p&gt;The real innovation is &lt;strong&gt;not the model&lt;/strong&gt;, but the &lt;strong&gt;system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;OpenClaw is an agentic system that defines a sophisticated way for AI to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Control its environment
&lt;/li&gt;
&lt;li&gt;Work autonomously
&lt;/li&gt;
&lt;li&gt;Coordinate multiple agents
&lt;/li&gt;
&lt;li&gt;Persist memory and context
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;There’s a lot more that I didn’t cover in this post.&lt;/p&gt;

&lt;p&gt;The goal here was to get you familiar with this new agentic system and explain why it’s different from traditional AI agents.&lt;/p&gt;

&lt;p&gt;If you have questions or doubts, feel free to leave a comment.&lt;/p&gt;

&lt;p&gt;Hope you enjoyed reading this!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a performative React Native app</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Thu, 08 Jan 2026 18:02:13 +0000</pubDate>
      <link>https://forem.com/ponikar/building-a-performative-react-native-app-3klh</link>
      <guid>https://forem.com/ponikar/building-a-performative-react-native-app-3klh</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;It's 2026 and building an app with React Native could not become more easier. Thanks to the open-source React Native community and Expo ecosystem. In the era of AI, it enables anyone to build an app faster than ever.&lt;/p&gt;

&lt;p&gt;However, building a performative React Native app is still challenging. Your MVP might work but not across all the mobile devices.&lt;/p&gt;

&lt;p&gt;This blog covers the painful points on how to profile and build a performant React Native app that works smooth as much as possible, even on mid-range Android devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Profile
&lt;/h3&gt;

&lt;p&gt;Before you decide to improve performance of your app, let's first understand what part of your app is really slow.&lt;/p&gt;

&lt;p&gt;For starters, React Debugger helps a lot to understand things such as expensive re-rendering, initial load time, screen mount/unmount state.&lt;/p&gt;

&lt;p&gt;Do not underestimate React Debugger for your React Native app, it can help you a lot to improve the performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp27hnbziflc5qits5wj.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxp27hnbziflc5qits5wj.png" alt="React native flame graph" width="800" height="500"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;If you are more curious to profile your app beyond JavaScript, you can try profiling your app natively using Xcode or Android Studio.&lt;/p&gt;

&lt;p&gt;You can see things like total memory being taken by your app in order to run it. Memory usage when you load a specific screen and perform certain operations.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Native profiling is optional, can be skipped if your app is not doing resource heavy operations like rendering videos or 3D graphics.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can use IDEs like &lt;em&gt;Android Studio&lt;/em&gt; or &lt;em&gt;Xcode&lt;/em&gt; to profile your app natively. By doing so, you will understand the overall memory usage, native memory leaks, and CPU usage. This will give you a clear picture of how your app will work. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc77cji2vr0jbyjhgxwgh.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc77cji2vr0jbyjhgxwgh.png" alt="screenshot of Xcode" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hqnre0dcgx3vz8yc0pq.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hqnre0dcgx3vz8yc0pq.png" alt="screenshot of android studio" width="800" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you will have some sort of sense about which part of your app is slow. Now let's talk about what and how to optimise it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rendering large list
&lt;/h3&gt;

&lt;p&gt;Rendering list can be quite challenging. For starters, if you have simple items to render, you can use &lt;code&gt;FlatList&lt;/code&gt; or &lt;a href="https://shopify.github.io/flash-list/" rel="noopener noreferrer"&gt;FlashList&lt;/a&gt; by Shopify. Both are straightforward solutions to render moderate lists.&lt;/p&gt;

&lt;p&gt;Problem arises when the item takes time to render. To understand this in a much simpler way, consider each item in the list takes ~400ms. FlatList virtualization concept basically adds/removes items as user scrolls and it is pretty obvious to spot blanks in between the list because the CPU is most of the time busy performing virtualization.&lt;/p&gt;

&lt;p&gt;In order to deal with this problem, there are solutions like &lt;a href="https://shopify.github.io/flash-list/" rel="noopener noreferrer"&gt;FlashList&lt;/a&gt; which can &lt;a href="https://shopify.github.io/flash-list/docs/recycling/" rel="noopener noreferrer"&gt;recycle&lt;/a&gt; the item and make sure to reuse it. Another one is &lt;a href="https://legendapp.com/open-source/list/api/gettingstarted/" rel="noopener noreferrer"&gt;LegendList&lt;/a&gt; which follows the concept of &lt;a href="https://legendapp.com/open-source/state/v3/usage/reactivity/" rel="noopener noreferrer"&gt;reactivity&lt;/a&gt; and makes sure to not re-render item again if nothing changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://legendapp.com/open-source/list/api/gettingstarted/" rel="noopener noreferrer"&gt;LegendList&lt;/a&gt; is a robust solution for rendering large sets of items efficiently, accurately mitigating blank spaces between list items through precise positioning and optional recycling.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://legendapp.com/open-source/state/" rel="noopener noreferrer"&gt;Legend-State&lt;/a&gt; pairs naturally with &lt;a href="https://legendapp.com/open-source/list/api/gettingstarted/" rel="noopener noreferrer"&gt;LegendList&lt;/a&gt; for scenarios requiring &lt;a href="https://legendapp.com/open-source/state/v3/react/fine-grained-reactivity/#:~:text=Legend%2DState%20enables%20a%20new,individual%20elements%20re%2Drender%20themselves." rel="noopener noreferrer"&gt;fine-grained reactivity&lt;/a&gt;, such as real-time data updates in large, dynamic lists where standard React state might trigger unnecessary re-renders.&lt;br&gt;
​&lt;/p&gt;

&lt;h3&gt;
  
  
  Initial boot time
&lt;/h3&gt;

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

&lt;p&gt;Boot time is the time which requires your app to load and run on the device. This time includes loading and executing JS bundle in the RAM.&lt;/p&gt;

&lt;p&gt;As you have guessed it, if your app has a bloated JS bundle, it will take some split seconds to load it and users may feel frustrated waiting for the app to launch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4d92lesgt9qh2hccan2z.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4d92lesgt9qh2hccan2z.png" alt="screenshot of JS bundler" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use tools like &lt;a href="https://www.npmjs.com/package/webpack-bundle-analyzer" rel="noopener noreferrer"&gt;webpack analyzer&lt;/a&gt; to understand which part of your bundle is large enough. You can look for third party dependency which is contributing most to the size and replace it with a lighter one.&lt;/p&gt;

&lt;p&gt;Unlike web, React Native out of the box doesn't support &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Code_splitting" rel="noopener noreferrer"&gt;code splitting&lt;/a&gt; entirely. It's a concept where your JS bundle gets divided into multiple chunks. This way client loads only required JS.&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://re-pack.dev/" rel="noopener noreferrer"&gt;Repack&lt;/a&gt; bundler which supports code splitting. It will require additional configuration to make it work.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As a good thumb rule, avoid bundling media assets like images/SVGs along with your business logic. Use remote servers to host and cache it using libraries like expo-image which loads and caches the assets once.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Again, profiling can help you to understand which part of your app is slow at rendering. It can be a particular screen or component of the app which requires more resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Illusion of lazy load
&lt;/h3&gt;

&lt;p&gt;Earlier when I was building Huddle01 meet app, we noticed a lag in the Android app. Initially the component was taking time to load. We soon realised we are rendering too many components initially.&lt;/p&gt;

&lt;p&gt;Our app has multiple bottom sheets in the meeting room. Initially we decided to render all the sheets at once. Android unlike iOS has limited resources, especially low-mid range Android devices.&lt;/p&gt;

&lt;p&gt;Instead of rendering all the bottom sheets at once, we just toggled the sheet, in other words rendering only one sheet at a time. Our Android app became smooth just by applying conditional rendering.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As a rule of thumb, avoid rendering parts of your app which are not visible initially to users. Remember Android devices are resource constrained and cannot optimize it like iOS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I call this technique an &lt;em&gt;illusion of lazy loading.&lt;/em&gt; Use it with caution, you can selectively decide which component to conditionally render.&lt;/p&gt;

&lt;p&gt;Optimise this technique with &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API" rel="noopener noreferrer"&gt;Intersection Observer.&lt;/a&gt; This way you completely avoid rendering components which are not visible at the time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Synthetic sugar trade-offs
&lt;/h3&gt;

&lt;p&gt;Avoid fancy JS libraries which offer nothing but just a fancy way of writing JavaScript. Remember &lt;strong&gt;your JS is 80% of your native app so every library you install is liable to performance issues.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before you install any library, try to use a custom solution if possible. I would even recommend &lt;strong&gt;avoiding CSS libraries if you are targeting low-end Android devices.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although there are lightweight libraries like &lt;a href="https://www.unistyl.es/" rel="noopener noreferrer"&gt;react-native-unistyle&lt;/a&gt; which leverage compile time and avoid runtime overhead.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's better to measure first before you decide to use any library.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Runtime overhead is the worst for your app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Do not optimize for an API if you are targeting an audience which prefers using phones around $100.&lt;/p&gt;

&lt;h3&gt;
  
  
  Imperative way to handle UI changes
&lt;/h3&gt;

&lt;p&gt;You might have heard about a method called &lt;a href="https://reactnative.dev/docs/legacy/direct-manipulation" rel="noopener noreferrer"&gt;setNativeProps&lt;/a&gt;, a way to update your UI without triggering render of the React tree. It is very important to use this very carefully because it can lead React state out of sync with the current UI. If re-rendering is becoming very costly then you may consider using this method.&lt;/p&gt;

&lt;p&gt;React state triggers re-rendering components and sometimes we may end up rendering whole app. For example dark/light mode. It's pretty obvious since we want all the elements of the app to adapt the mode as soon as possible. If you use React state to manage this, you will see the lag when testing on low-end devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Animations
&lt;/h3&gt;

&lt;p&gt;Running animations couldn't be more easier thanks to &lt;a href="https://docs.swmansion.com/react-native-reanimated/" rel="noopener noreferrer"&gt;react-native-reanimated&lt;/a&gt;. It leverages UI threads to offload animations but be very careful when working with low-end Android devices.&lt;/p&gt;

&lt;p&gt;If your priority is low-end devices, they don't have the luxury of multiple threads and it can backfire. You may see your animations being sluggish, laggy, or not working at all. Yes, this can happen with react-native-reanimated library. Although this may differ from device to device. It's always better to know what your target audience is.&lt;/p&gt;

&lt;p&gt;If you are targeting low-end devices, it's better to stick to vanilla React Native animations to avoid randomness.&lt;/p&gt;

&lt;h3&gt;
  
  
  Leveraging resources like GPU
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3fthgt0q2etqfji2a9l.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3fthgt0q2etqfji2a9l.png" alt="GPU Image from margelo.com" width="400" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the hacks I found while working with multiple applications is leveraging resources like GPU when possible. While working with React Native we don't have support out of the box, but libraries like &lt;a href="https://shopify.github.io/react-native-skia/" rel="noopener noreferrer"&gt;react-native-skia&lt;/a&gt; are so powerful that they let you use GPU to render graphics from JavaScript.&lt;/p&gt;

&lt;p&gt;This feels like magic when your JS code can do realtime image manipulation and apply shaders that run completely on GPU.&lt;/p&gt;

&lt;p&gt;There's one more library I would like to point out by &lt;a href="https://margelo.com/" rel="noopener noreferrer"&gt;Margelo&lt;/a&gt;, &lt;a href="https://margelo.github.io/react-native-filament/" rel="noopener noreferrer"&gt;react-native-filament&lt;/a&gt;. This library renders 3D graphics completely on native GPUs. So now it's quite possible to create a Pokemon GO like app in React Native.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's always better to use powerful libraries like these when possible to avoid overhead on JS threads and leverage device resources.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  C++ magic
&lt;/h3&gt;

&lt;p&gt;In recent years, React Native has improved significantly with the &lt;a href="https://reactnative.dev/architecture/landing-page" rel="noopener noreferrer"&gt;new architecture updates&lt;/a&gt; that completely get rid of the bridge, enabling access to native APIs from JS runtime using JSI (JavaScript Interface), which is written in C++.&lt;/p&gt;

&lt;p&gt;One of the most skilled and talented C++ engineers and core contributor of react native I know, &lt;a href="https://x.com/mrousavy" rel="noopener noreferrer"&gt;Marc&lt;/a&gt; and his team, have published several powerful libraries which leverage JSI modules that are completely written in C++.&lt;/p&gt;

&lt;p&gt;For example, &lt;a href="https://github.com/margelo/react-native-quick-crypto" rel="noopener noreferrer"&gt;react-native-quick-crypto&lt;/a&gt; has a C++ implementation which does all the heavy lifting on the C++ side, keeping your JS thread completely non-blocking. C++ as we know is the most powerful and performant language to do all the performance intensive and low-level tasks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://margelo.com/" rel="noopener noreferrer"&gt;Margelo&lt;/a&gt;, founded by &lt;a href="https://x.com/mrousavy" rel="noopener noreferrer"&gt;Marc&lt;/a&gt;, has also released &lt;a href="https://nitro.margelo.com/" rel="noopener noreferrer"&gt;Nitro Modules&lt;/a&gt;, a new way of writing native modules which leverage highly optimized JSI and are end-to-end type-safe. You can check the benchmark &lt;a href="https://nitro.margelo.com/docs/comparison#benchmarks" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The reason I am emphasizing more on C++ is because thanks to AI now it's possible to write native modules based on the requirement, and Nitro Modules can help write faster and more robust native modules.&lt;/p&gt;

&lt;p&gt;The line between native and JS is getting blurred as we move forward. C++ is bridging that gap and it couldn't be more easier to write your own native implementation which pushes your React Native limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Last 5 years were the golden period of React Native. With help of a supportive community, we are getting a truly "write once, run anywhere" codebase. But as we become more creative, we have to push the limit of existing technology. React Native may be limited to some domains but it will improve a lot, or there might be a successor of React Native which truly overcomes all the challenges we are facing now. We may never know but it's so fascinating to see how cross-platform technologies like React Native and Flutter have evolved.&lt;/p&gt;

&lt;p&gt;Thanks for reading this blog. Let me know if you have any questions in the comment section.&lt;/p&gt;

&lt;p&gt;Happy New Year.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>ai</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Building React Native app that ship code from Mobile</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 19 Oct 2025 08:05:39 +0000</pubDate>
      <link>https://forem.com/ponikar/building-an-ai-agent-that-commits-and-raises-prs-from-your-phone-1n78</link>
      <guid>https://forem.com/ponikar/building-an-ai-agent-that-commits-and-raises-prs-from-your-phone-1n78</guid>
      <description>&lt;p&gt;Ever wondered when there will be a time when you’ll be able to ship code from your mobile? Since LLMs are capable of generating multiple chunks of code, you may not necessarily need your laptop to ship tiny features or hot fixes. What if an AI app could do that for you?&lt;/p&gt;

&lt;p&gt;This blog is all about how I am building a mobile AI agent that helps you ship code directly from your phone, and hopefully, you won’t need to open your laptop while enjoying your favorite cocktail on a beach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;p&gt;I am using React Native to build a cross-platform app, Cloudflare Workers as a backend, and Vercel AI SDK to set up an AI agentic flow that enables support for multiple LLMs, including Google Gemini, OpenAI, and Claude.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For the sake of the prototype, by default, the AI agent uses Google Gemini Flash 2.0 since it’s a cheaper and effective solution out there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  The workflow
&lt;/h4&gt;

&lt;p&gt;I have named it Gitfix. The code is fully &lt;a href="https://github.com/ponikar/gitfix" rel="noopener noreferrer"&gt;open source&lt;/a&gt;, you can check it out here. Basically, it connects with your GitHub account, asks for the required permissions to read repos and raise PRs. Once the AI agent suggests changes, it can automatically raise a PR with a single tap.&lt;/p&gt;

&lt;p&gt;So the flow looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07f6hdjy7qz699fpo8r8.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07f6hdjy7qz699fpo8r8.png" alt="High level overview of Gitfix AI agentic flow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub OAuth flow
&lt;/h3&gt;

&lt;p&gt;Millions of developers use GitHub every day, and it has a rich set of API tools, including GitHub Apps that let developers customize their experience.&lt;/p&gt;

&lt;p&gt;As a user, you have to install the Gitfix GitHub app in your GitHub organization. This app will interact with your repos and activities like PRs, issues, etc.&lt;/p&gt;

&lt;p&gt;Ultimately, our AI agent takes help from this GitHub app to read and raise PRs.&lt;/p&gt;

&lt;p&gt;Our app uses the standard GitHub OAuth flow to authenticate users.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about privacy?
&lt;/h3&gt;

&lt;p&gt;Our server architecture follows a stateless approach, which means the server doesn’t store any GitHub-related data, including repos, access tokens, or any meta information.&lt;/p&gt;

&lt;p&gt;The server relies totally on the client side to provide all the required context that helps the AI agent perform specific operations.&lt;/p&gt;

&lt;p&gt;If you haven’t checked the app, you can refer to this tweet example that demonstrates the app flow.&lt;/p&gt;

&lt;p&gt;

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

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





&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;@&amp;lt;filename&amp;gt;&lt;/code&gt; feature
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frluk0yc416t1d907z1cc.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frluk0yc416t1d907z1cc.png" alt="@filename feature"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve used Cursor’s @filename feature, it’s very handy to let AI know which file to consider and make changes.&lt;/p&gt;

&lt;p&gt;I tried to implement a similar behavior in the app. Once GitHub shares meta information about the repo tree and branch data, and when the user mentions that file name, the app simply iterates over the tree data and shows suggestions. Once the user taps on it, the logic simply refers to that file in the prompt.&lt;/p&gt;

&lt;p&gt;Each file has a unique sha and filePath that later helps AI fetch the file content. This information is stored on the client side to provide the LLM with file context throughout the conversation.&lt;/p&gt;

&lt;p&gt;The AI agent uses these fileRefs to fetch file content using GitHub APIs. Once the contents are ready, we append them to the LLM context so the AI can effectively suggest changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tool calling for rescue
&lt;/h3&gt;

&lt;p&gt;We leverage the LLM’s tool/function calling feature to communicate with external APIs such as GitHub. LLMs can smartly decide which tool to use for a specific operation.&lt;/p&gt;

&lt;p&gt;This is the high-level architecture of how the AI agent works. It consists of multiple chains of LLM calls that leverage tool calling to perform certain actions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpchsyyfefw1c2uilc4pn.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpchsyyfefw1c2uilc4pn.png" alt="High level overview of AI agent that manage multiple LLM calls"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The AI agent, at a high level, acts as an orchestrator to decide which route to take based on the user’s query.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;High-quality context provides high-quality results&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As we all know, the more and better context you provide to LLMs, the more accurate the result you get. Since the server strictly follows a stateless architecture, our app needs to store all the information regarding repos, conversation threads, meta information, file versioning, references, etc.&lt;/p&gt;

&lt;p&gt;For example, our app stores file references based on threads. As users use the @fileName feature, the app stores these references corresponding to that thread. When we make a call to the LLM, the app provides these file refs as context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incremental changes support
&lt;/h3&gt;

&lt;p&gt;As we all know, LLMs are good at making tiny changes effectively, and we often make iterations of changes from LLMs. The app maintains different versions of files and makes sure to provide the previous iteration of each file.&lt;/p&gt;

&lt;p&gt;In summary, the app manages context effectively to help the AI agent generate responses efficiently.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;User experience is the ultimate moat you can have in the race of AI wrappers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The app uses git diff to highlight new changes similar to how GitHub does.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjsapdfyu190hrsoxeou1.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjsapdfyu190hrsoxeou1.png" alt="Screenshot of Gitfix mobile app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The magical moment
&lt;/h3&gt;

&lt;p&gt;Eventually, once the user is happy with the changes, they can instruct the AI agent to directly raise a PR to their repo.&lt;/p&gt;

&lt;p&gt;As you might wonder, the AI agent checks out a new branch, commits changes, and then raises a PR to the main branch. This entire process is hidden behind the abstraction layer provided by the AI agent.&lt;/p&gt;

&lt;p&gt;For now, this flow is not very dynamic, it only raises PRs to the &lt;code&gt;main&lt;/code&gt; branch, but later, as I continue working on the app, users will be able to decide multiple factors such as branch_name, commit message, and PR description, etc.&lt;/p&gt;

&lt;p&gt;Overall, Gitfix is a POC that shows how your mobile can help you ship changes, thanks to the modern era of AI.&lt;/p&gt;

&lt;p&gt;It has certain limitations as of now, but the potential is limitless. When Cursor came, it was just an LLM making changes in a bunch of files, but now the agentic flow can do more than what it’s asked for.&lt;/p&gt;

&lt;p&gt;Mobile devices are powerful and can even run LLMs locally. This is the beginning of an era where mobile apps can perform intensive tasks with the help of AI.&lt;/p&gt;

&lt;p&gt;Thanks for reading this blog. I hope you like it. Let me know your thoughts and questions in the comments.&lt;/p&gt;

&lt;p&gt;I’ll see you in another blog. You can reach me on &lt;a href="https://x.com/iponikar" rel="noopener noreferrer"&gt;X&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>reactnative</category>
      <category>agents</category>
    </item>
    <item>
      <title>Should You Work at a Startup?</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sat, 20 Sep 2025 08:07:31 +0000</pubDate>
      <link>https://forem.com/ponikar/should-you-work-at-a-startup-5f33</link>
      <guid>https://forem.com/ponikar/should-you-work-at-a-startup-5f33</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;My name is &lt;a href="https://x.com/iponikar" rel="noopener noreferrer"&gt;Darshan&lt;/a&gt;, a founding engineer. Right now working at &lt;a href="https://huddle01.com" rel="noopener noreferrer"&gt;Huddle01&lt;/a&gt;. If you are hearing this term for the first time, &lt;a href="https://news.ycombinator.com/item?id=32088377" rel="noopener noreferrer"&gt;“Founding Engineer”&lt;/a&gt; – it is basically an engineer who is a core member of a startup when it was started or a core member of a team when the product is getting built.&lt;/p&gt;

&lt;p&gt;This blog is about how it looks like working at a startup. This may help you decide whether you should consider working at a startup or not.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Odds of Success
&lt;/h3&gt;

&lt;p&gt;It’s risky. Working at a startup is risky. You probably have heard this: “9 out of 10 startups fail” and that is somehow true. But even though it fails, you should aim for learning.&lt;/p&gt;

&lt;p&gt;In the early stage of your career, a startup feels like a giant empty canvas where you can experiment, build, and break things. Most importantly, you do this faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Plot
&lt;/h3&gt;

&lt;p&gt;When a startup is yet to figure out &lt;a href="https://en.wikipedia.org/wiki/Product-market_fit" rel="noopener noreferrer"&gt;product-market fit&lt;/a&gt;, all they have is time and budget. Time matters the most, so they tend to work at a higher pace. You have often observed how startups ship faster, ship new updates every week, and sometimes a team is working late at night. (That’s not the case every time, but yeah you gotta.)&lt;/p&gt;

&lt;p&gt;The reason why they have to be extremely careful with deadlines is because every startup starts with a foundation idea, and that idea is based on some hypothesis.&lt;/p&gt;

&lt;p&gt;A founder or a group of founders needs to test this hypothesis as soon as possible. After all, the users decide whether the startups are onto something or not. So speed matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Swiss Army Knife Engineer
&lt;/h3&gt;

&lt;p&gt;Be ready to do more than just your role. You are not just an engineer but a founding member. Sometimes you will find yourself juggling between product requirements, implementing some analytics tools, working with the marketing team to make tweaks in the product, and it can go on.&lt;/p&gt;

&lt;p&gt;When I was working at my first startup job &lt;a href="https://nintee.com" rel="noopener noreferrer"&gt;Nintee&lt;/a&gt;, I was in the user interview call with my product manager, and we both had to observe user behavior and look for implicit feedback from users.&lt;/p&gt;

&lt;p&gt;Either users understood the flow, whether the design was complicated, or which part was high cognitive load for users. We had to take care of all small nuances so we could improve our product.&lt;/p&gt;

&lt;p&gt;This is a completely different experience. Like &lt;a href="https://x.com/paulg" rel="noopener noreferrer"&gt;Paul Graham&lt;/a&gt; said, “Talk to your users.”&lt;/p&gt;

&lt;p&gt;Changes are necessary. You will have times where your founders are gathered around and talking about the learning you had so far, and now in order to move forward, here’s what you as a team have to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Turning Point
&lt;/h3&gt;

&lt;p&gt;Sometimes the initial hypotheses were wrong and the sooner the team realized it, the more you save your time and resources. In this case, you either change the direction of a product. This is known as a &lt;a href="https://en.wikipedia.org/wiki/Pivot" rel="noopener noreferrer"&gt;pivot&lt;/a&gt;. In this process, generally the existing product either gets replaced with something new or you build something on top of it.&lt;/p&gt;

&lt;p&gt;So yeah, be ready to throw out your code. As engineers we tend to make things perfect and well-optimized, but in a startup first as a team you gotta make sure you are building the right thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Working Product Over Perfect Code
&lt;/h3&gt;

&lt;p&gt;If you are building something and putting 100% of your efforts into making sure the software is well optimized, but people won’t use it because it’s not making sense for them, it’s useless no matter how awesome it is.&lt;/p&gt;

&lt;p&gt;So the first priority of a startup is to make sure they build something that must solve users' problems, and in order to figure this out, the team has to do many experiments. A lot of use-and-throw code is written. User calls happen frequently. The team is looking for a pattern in the analytics dashboard.&lt;/p&gt;

&lt;p&gt;So at this point you are not a software engineer anymore but a product engineer who is responsible for the end-to-end process. Unlike MNCs, you are not working in one particular team but you have to collaborate across teams. Startups have a small number of people so it’s very easy to collaborate and you do cross-functional work. That’s the most exciting part.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hidden Levers
&lt;/h3&gt;

&lt;p&gt;One thing I have noticed and experienced as well is that if you get a chance to work with the smartest and most ambitious people who are shaping the startups, you will realize it eventually shapes you as well.&lt;/p&gt;

&lt;p&gt;Your mindset, your growth evolves around it. You are witnessing a kind of history where either you break it or make something happen which has the potential to have a huge impact on thousands of users.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Startups Create Wealth
&lt;/h3&gt;

&lt;p&gt;Startups can also be the way of creating wealth. The definition of wealth may be different from person to person. Many times people think of wealth as money. Many people get motivated by this. If you are an early member of a team and if you have some equity or stock options, if the company works out, you get rewards for taking risks. You may never work for capital anymore but look for problems that you can solve. But more than just money, you gotta work with a product you genuinely care about. You sometimes find people for life who teach you not just about startups but a general overview of life.&lt;/p&gt;

&lt;h3&gt;
  
  
  Startups Are Ambiguous
&lt;/h3&gt;

&lt;p&gt;I am not glorifying working at startups, but it’s just very random that unless or until you see it working, it just seems this thing is never going to work out.&lt;/p&gt;

&lt;p&gt;Again, startups are risky and you never know where you will be in the next quarter. Things move fast, some startups get shut down, some get acquired, some just change their vision.&lt;/p&gt;

&lt;p&gt;So if you are someone who wants to work at a startup, make sure you have some sort of backup, so even if things don’t work out you can prepare yourself for the what comes next.&lt;/p&gt;

&lt;p&gt;But risk is worth taking. Youngster have potential and it can only unleash if we work in a challenging environment.&lt;/p&gt;

&lt;p&gt;You have to mentally and physically prepare yourself to work at startups. You are going to deal with a large amount of ambiguity and there will be times where you as a person or team will think you are lost and need to figure out where to go next.&lt;/p&gt;

&lt;p&gt;Building a resilient attitude will eventually help in the long run.&lt;/p&gt;

&lt;p&gt;But this can be a time you will look back and be proud of yourself for the attempt you made.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Continuous Learning Journey
&lt;/h3&gt;

&lt;p&gt;Learning is the most important part in a startup, either as a person or team. You have to reflect on whatever data you get and you have to work on that. This process is so beautiful and that’s how most startups work.&lt;/p&gt;

&lt;p&gt;That’s it for today. That’s my overall thought on startups. If you have any doubts or suggestions about the blog, please feel free to leave a comment.&lt;/p&gt;

&lt;p&gt;Thanks for reading. &lt;/p&gt;

</description>
      <category>startup</category>
      <category>career</category>
      <category>learning</category>
      <category>software</category>
    </item>
    <item>
      <title>AI as the Orchestrator</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 15 Jun 2025 14:22:16 +0000</pubDate>
      <link>https://forem.com/ponikar/ai-as-the-orchestrator-g8j</link>
      <guid>https://forem.com/ponikar/ai-as-the-orchestrator-g8j</guid>
      <description>&lt;p&gt;Hi there, my name is Darshan Ponikar. I’m a software engineer transitioning into a product engineer. Recently, I started exploring AI agent use cases, and in this blog, I’m sharing my learnings. These are just my rough thoughts around AI and AI agents.&lt;/p&gt;

&lt;p&gt;This is a beginner-friendly blog, but you’re expected to have some understanding of LLMs and a bit of prompt engineering.&lt;/p&gt;

&lt;p&gt;The blog aims to draw a general picture of what LLMs with actions look like. Feel free to share your thoughts in the comments and don’t hesitate to disagree with mine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rise of AI agents
&lt;/h3&gt;

&lt;p&gt;This is getting more and more clear as &lt;strong&gt;AI agents&lt;/strong&gt; are arising in every possible industry. Any boring task which is important but requires more effort to complete can easily be automated by AI agents.&lt;/p&gt;

&lt;p&gt;I am curious to understand how these AI agents work and is that something different or new than LLMs? It's been 5 years since we have LLMs and if you haven’t been active in the space for a while, then you have probably missed the obvious limitation of LLMs where AI cannot take an action.&lt;/p&gt;

&lt;p&gt;It still cannot send an email, can write code but cannot run software, can write a blog post but cannot improve SEO — and it goes on.&lt;/p&gt;

&lt;p&gt;What LLMs are good at doing is purely text-based, but it's been also quite a while where developers trick LLMs to generate a proper JSON schema for their requirements, and it has improved a lot in recent years.&lt;/p&gt;

&lt;p&gt;But generating JSON schema won’t help you much to perform any task which requires more than that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Beyond prompt engineering
&lt;/h3&gt;

&lt;p&gt;LLMs are generally good at instructing well. You probably have noticed this, but what if they have some sort of way to call some third-party APIs to complete a task?&lt;/p&gt;

&lt;p&gt;For example, a way to store data in a DB API?&lt;/p&gt;

&lt;p&gt;This is known as &lt;strong&gt;tool calling&lt;/strong&gt;, and it’s evolving a lot.&lt;/p&gt;

&lt;p&gt;The idea is that you instruct LLMs and give them a set of tools, each with a unique description. What LLMs do is they basically decide &lt;strong&gt;which tool&lt;/strong&gt; and &lt;strong&gt;when to use it&lt;/strong&gt; in order to fulfil the user's query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foi6mst95mmoi7nrckdmu.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foi6mst95mmoi7nrckdmu.png" alt="CCM's orchestral program" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;image &lt;a href="https://ccm.uc.edu/areas-of-study/academic-units/orchestral-studies.html" rel="noopener noreferrer"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is more like orchestration of tools, and AI has tools to make decisions in real time that basically changes everything.&lt;/p&gt;

&lt;p&gt;Instead of giving some sort of JSON, AI can literally make an API call or pull data from a database. You just have to give them clear instructions on what this tool wants as parameters.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tool calling on scale
&lt;/h3&gt;

&lt;p&gt;I think on a scale, that’s what LLMs are going to do. They are trained on a very high-quality large dataset and they have some sort of reasoning (let’s assume they have) to make decisions.&lt;/p&gt;

&lt;p&gt;Even though they are good at reasoning and decision-making, they don’t have a way to perform actions, and I think we are very far from that future (yet) where LLMs can perform any task.&lt;br&gt;&lt;br&gt;
But they are good at instructing well. They can instruct an AI agent what and how to do. That’s where LLMs are going to take actions through AI agents.&lt;/p&gt;

&lt;p&gt;LLMs will operate robots, LLMs are operating third-party software through AI agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Next gen wrapper
&lt;/h3&gt;

&lt;p&gt;Think AI agents are like another wrapper around AI, but this time you are providing tools along with instructions so LLMs can almost perform certain actions for a given query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufzh1rw9ppt0ufgdbvqc.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufzh1rw9ppt0ufgdbvqc.png" alt="High level picture of LLMs and AI agents" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The complexity of a tool can vary based on the task it is given to perform.&lt;/p&gt;

&lt;p&gt;It can be easier to make an API call to something more complex like ordering food online where it has to take care of things like payment, restaurant availability, distance, source to destination, etc.&lt;/p&gt;

&lt;p&gt;Obviously, you should start with something simpler first before you make it a little complex.&lt;/p&gt;

&lt;p&gt;In general, tools can make different API calls, can use LLMs to reason better, etc.&lt;/p&gt;

&lt;p&gt;To make this more standardized, &lt;strong&gt;Anthropic&lt;/strong&gt; came up with &lt;strong&gt;MCP server&lt;/strong&gt;, a standard way to provide third-party API support to LLMs.&lt;/p&gt;

&lt;p&gt;Think like how your client app makes an API call to a server via REST APIs metaphorically speaking, MCP server provides REST API to LLMs.&lt;/p&gt;

&lt;p&gt;MCP server provides scale so you can make your AI agent as generic as possible based on your requirement.&lt;/p&gt;

&lt;p&gt;Since this topic is pretty novice, we don't have many resources available as MCP servers but we are still early for this.&lt;/p&gt;

&lt;p&gt;I think it's far easier to just provide tool calling instead of setting up your own MCP server if you just want to test it out.&lt;/p&gt;

&lt;p&gt;But in future, we will probably see companies providing MCP servers to communicate, and there might be a startup which solely provides MCP servers for context.&lt;/p&gt;

&lt;p&gt;Think like MCP servers for legals, MCP servers to restaurant chains, MCP servers to know your Instagram stats, etc.&lt;/p&gt;

&lt;p&gt;But LLMs need to be smarter and efficient enough to make a decision for tool calling, otherwise it won’t make any sense.&lt;/p&gt;

&lt;p&gt;Hence the title &lt;strong&gt;AI as an orchestration&lt;/strong&gt;. We are still new, and it’s fascinating to explore endless opportunities that can be fulfilled by AI.&lt;/p&gt;

&lt;p&gt;We have an MCP server now. Maybe in the future we will have some other tool to make it more efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for reading, share your thoughts in the comments section.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>mcp</category>
      <category>gpt3</category>
      <category>ai</category>
    </item>
    <item>
      <title>OTA updates in React Native</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 14 Jul 2024 14:50:50 +0000</pubDate>
      <link>https://forem.com/ponikar/ota-updates-in-react-native-1pbo</link>
      <guid>https://forem.com/ponikar/ota-updates-in-react-native-1pbo</guid>
      <description>&lt;p&gt;Hi there, it's been a long time since I have written a blog on React Native. Today I just want to explain what OTA updates are and how you can use them in your React Native project.&lt;/p&gt;

&lt;p&gt;We will deep dive into OTA updates, advantages, and challenges you may face while dealing with this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;This blog covers some advanced topics from my experience building various apps. If you're new to React Native, some parts might be hard to understand, and that's okay. Everyone starts somewhere. Feel free to ask questions or share your thoughts in the comments section.&lt;/p&gt;

&lt;p&gt;The idea of this blog is to give you a high-level overview of how OTA updates work in the real world. Instead of covering obvious topics like installation and troubleshooting, I'll focus on helping you understand the real impact of OTA updates when working with a production app.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is OTA update?
&lt;/h2&gt;

&lt;p&gt;OTA stands for Over the Air updates, it's an idea to update your JavaScript bundle on the fly without the need to update the binary (native Android/iOS update). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04j8zjv0esbe7zux1y6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04j8zjv0esbe7zux1y6y.png" alt="OTA update flow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, if you have OTA updates configured and you push a new bundle, existing users can download and load the new JS bundle on the next boot-up. &lt;/p&gt;

&lt;p&gt;OTA updates are really helpful to fix UI-related bugs on the fly and sometimes it helps avoid submitting your apps for review which can take up to 7 days. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is also one popular method known as Server Driven UI that lets you control the behavior of the UI from the server. OTAs and Server Driven UI are two separate things. I might write a blog on it in the future but this blog is dedicated to OTA updates. You can share your thoughts in the comment section. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So now we have understood what OTA updates are in general. Let's understand how it works in React Native. &lt;/p&gt;

&lt;p&gt;In very simple words, OTAs are just for updating your JS bundle on the fly. Roughly speaking, it's just an API call to your server and asking if there has been any update pushed lately or not. The server might give you a JS bundle that you can swap out with the current bundle and load the app, but as you can see things start to get complicated as we speak about swapping the JS bundle and making a server call and loading the JS bundle in the next boot-up. &lt;/p&gt;

&lt;p&gt;To make it easier, there are libraries like &lt;a href="https://github.com/microsoft/react-native-code-push" rel="noopener noreferrer"&gt;&lt;code&gt;react-native-codepush&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://docs.expo.dev/eas-update/introduction/" rel="noopener noreferrer"&gt;&lt;code&gt;eas-updates&lt;/code&gt;&lt;/a&gt; by &lt;a href="https://docs.expo.dev/" rel="noopener noreferrer"&gt;Expo&lt;/a&gt; that simplify this process. &lt;/p&gt;

&lt;p&gt;These libraries act as a wrapper around your app and they also provide a CodePush server in which you can configure and push your JS bundle. &lt;/p&gt;

&lt;p&gt;You can refer to their documentation to install this library. If you are facing any issues, you can share them in the comment section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Too Easy to break UX
&lt;/h2&gt;

&lt;p&gt;Remember CodePush only updates your JavaScript code. It cannot update your native Java/Objective C code. So it's really easy to break things by accidentally pushing a JS bundle that can break your app if the native modules of that bundle are missing. &lt;/p&gt;

&lt;p&gt;Let's take an example, suppose you have a music app live in the app store and people are loving it. They are using it all day but now you have a product requirement that requires you to access the user's microphone. You decided to install a library that lets you access the microphone. This library also requires you to configure native files such as &lt;code&gt;MainApplication.java&lt;/code&gt; or &lt;code&gt;Appdelegate.m&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku1p8q7scpm4snz3wz3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku1p8q7scpm4snz3wz3p.png" alt="JS code invokes native function"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You made changes, everything is working locally as expected. You decided to release this update via CodePush. The moment you release the OTA update the app will crash because your JS code is trying to call a native module which is missing. Users have to reinstall the application and you have to immediately revert that bundle so other users won't experience these crashes.&lt;/p&gt;

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

&lt;p&gt;We had the exact same situation while building Nintee Application. We had to revert the JS bundle and ask users to reinstall the app. It's easy to spoil the UX. &lt;/p&gt;

&lt;p&gt;Another challenging part is OTA updates don't reflect immediately.  First, the user needs to download the bundle in the background and load it which can happen in the next app boot. &lt;/p&gt;

&lt;p&gt;So if users install this app, chances are they can load the stale JS bundle which is locally present. UX can easily get out of sync.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ground rules
&lt;/h2&gt;

&lt;p&gt;You have to establish some ground rules when you are working with OTA updates. &lt;/p&gt;

&lt;p&gt;Stick to the app version: I made a habit to increment the app version whenever I modified any native code. You can easily differentiate and upload the JS bundle corresponding to the app version. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffb403pxus1amuozpkyqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffb403pxus1amuozpkyqx.png" alt="OTA updates for different versions of your app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, &lt;br&gt;
if Segment A is using version &lt;code&gt;1.5.2&lt;/code&gt; you can push OTA updates specifically for this segment. This way you can make sure that OTA updates support that App binary and it won't break the app. &lt;/p&gt;

&lt;p&gt;Decide whether you want updates to be visible immediately. Prioritize between OTA and Native binary release. You can also ship both updates at the same time. &lt;/p&gt;

&lt;p&gt;This makes sure if new users are onboarding, they will see the new changes meanwhile existing users can either load JS on the fly or update the binary.  &lt;/p&gt;

&lt;h2&gt;
  
  
  What's my take on OTA updates?
&lt;/h2&gt;

&lt;p&gt;These are the technical decisions to make sure the user's UX stays consistent. &lt;/p&gt;

&lt;p&gt;It depends on your team, and the size of your user base to decide whether you should configure OTA in your app or not.&lt;/p&gt;

&lt;p&gt;While working at Nintee, we realized that almost 75% of our users don't bother to update the app. They would likely use the old version of the app if there are no major updates. We had a situation where we had to ask users to update the app. This process became cumbersome as we were onboarding more and more users. &lt;/p&gt;

&lt;p&gt;OTA updates help us to push bug fixes, UI improvements, and functionalities on the fly. It was almost like how we update our web applications. &lt;/p&gt;

&lt;p&gt;Since the app distribution platform like Play Store and App Store can take up to 24 hours (sometimes) when an app only contains some bug fixes and minor changes, it is a really frustrating experience for a developer.&lt;/p&gt;

&lt;p&gt;You just have to be more careful while working with OTA updates as we saw it's too easy to spoil the User Experience.  &lt;/p&gt;

&lt;p&gt;I hope this blog helped you to understand the high-level overview of how OTA updates work at the production level. &lt;/p&gt;

&lt;p&gt;Thank you for reading this blog and I shall come with another exciting blog. Please share your thoughts in the comment section. &lt;/p&gt;

&lt;p&gt;Curious to know more? Check out reference links &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/microsoft/react-native-code-push" rel="noopener noreferrer"&gt;React Native Code Push library&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.expo.dev/eas-update/introduction/" rel="noopener noreferrer"&gt;Expo eas updates&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.expo.dev/eas-update/runtime-versions/" rel="noopener noreferrer"&gt;Manage runtime version with eas updates&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/microsoft/react-native-code-push/issues/2675" rel="noopener noreferrer"&gt;Microsoft App Center retiring&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Happy Hacking...&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>ux</category>
      <category>mobile</category>
    </item>
    <item>
      <title>We love building Cross Platform App!</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 10 Mar 2024 08:02:44 +0000</pubDate>
      <link>https://forem.com/ponikar/we-love-building-cross-platform-app-4j23</link>
      <guid>https://forem.com/ponikar/we-love-building-cross-platform-app-4j23</guid>
      <description>&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&gt;

&lt;p&gt;This article is very generic. I am not going to talk about any specific solution like React Native; rather, I will share my thoughts around the idea of a cross-platform solution. The trap of options and how to decide what to pick for your next MVP/Side project/Product.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Plot
&lt;/h3&gt;

&lt;p&gt;Imagine you are in 2012, a brand new iPhone 5 came, and Steve Jobs unveiled its revolutionary features. Everyone is excited to use this iPhone, and as a developer, you are eager to build native apps. You learned about XCode, installed it on a Mac, and started learning Objective C to build your first HelloWorld app. Life was pretty simple, right?&lt;/p&gt;

&lt;p&gt;Now let's come back to the present; it's 2024, and now we have more than an adequate amount of options to build Native Apps. React Native, Flutter, Ionic, Capacitor, and etc.&lt;/p&gt;

&lt;p&gt;All these technologies seem promising, and you are confused about picking from them because you don't want to end up choosing the wrong tool to build your product.&lt;/p&gt;

&lt;p&gt;But the idea of cross-platform engineering is that as a developer, while building a product, you spend less time taking care of each platform separately and more time building logic for your business.&lt;/p&gt;

&lt;p&gt;But we often find ourselves debating over these existing solutions and wind up doing nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Picking the Tool that works for you
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;It's not about what is working for others but you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are good at, let's say, Flutter, you should continue upscaling around it and eager to learn more about it.&lt;/p&gt;

&lt;p&gt;In the software industry, everything changes rapidly. You never know; maybe the time I am writing this article. There are some nerds writing another JavaScript framework.&lt;/p&gt;

&lt;h4&gt;
  
  
  Nothing seems to be perfect
&lt;/h4&gt;

&lt;p&gt;Every solution claims to solve certain problems, but it also has certain cons. So eventually, it's on you what to choose.&lt;/p&gt;

&lt;p&gt;Let's understand via an example.&lt;/p&gt;

&lt;p&gt;React Native renders UI natively, so your end-users likely can't find the difference while using the app. But at the same time, due to the async nature of it, sometimes it's limited, but it has come a long way with a new architecture.&lt;/p&gt;

&lt;p&gt;Flutter, on the other hand, renders UI components on canvas, which is faster, but it doesn't render native UI components.&lt;/p&gt;

&lt;p&gt;So what to pick?&lt;/p&gt;

&lt;h3&gt;
  
  
  Seeking for Job opportunities
&lt;/h3&gt;

&lt;p&gt;As someone who is looking forward to building his/her career around this, you should always look at the number of jobs available. Let's take a step back and think which can help you in the long run.&lt;/p&gt;

&lt;p&gt;The idea is not marrying a particular technology but being willing to give yourself a chance to explore something new.&lt;/p&gt;

&lt;p&gt;In simple words, explore things and decide who is the best for your career and keep accumulating.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building a Product
&lt;/h3&gt;

&lt;p&gt;In my previous experiences of building a top-notch product, I realize it's a long-term process (feel free to disagree). You start with an MVP, and it's likely to be thrown out if it didn't work.&lt;/p&gt;

&lt;p&gt;In this situation, you can be okay to pick anything you like. The idea is to build something faster so you can validate and iterate over it.&lt;/p&gt;

&lt;p&gt;So be it anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't be in dilemma
&lt;/h3&gt;

&lt;p&gt;If it's working for you than it doesn't matter whether it worked for others. At certain points, you may have to switch even multiple times, and that's totally fine. You have to start from somewhere and move faster so you can decide what is working for you.&lt;/p&gt;

&lt;p&gt;Lastly, I would say technologies come and go, but the low-level mental model of yours stays the same so focusing on building a great understanding around cross-platform engineering will help you in the long run rather than juggling between what to pick.&lt;/p&gt;

&lt;p&gt;If something makes you curious, it's a good thing, and you should iterate over it.&lt;/p&gt;

&lt;p&gt;Thanks for reading this article; I just wanted to share my thoughts that worked for me. I hope you have gotten some sense out of it. If you have any questions/suggestions, please feel free to leave your thoughts in the comment sections.&lt;/p&gt;

&lt;p&gt;You can reach out to me via X &lt;a href="https://x.com/iponikar"&gt;iponikar&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have a great time :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>0 to 1, working in a startup as Software Engineer</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 03 Dec 2023 19:32:18 +0000</pubDate>
      <link>https://forem.com/ponikar/0-to-1-working-in-a-startup-as-software-engineer-4jlp</link>
      <guid>https://forem.com/ponikar/0-to-1-working-in-a-startup-as-software-engineer-4jlp</guid>
      <description>&lt;p&gt;It's been a while since I last wrote a blog. I typically cover topics related to the frontend ecosystem, including JavaScript, TypeScript, React, and React Native. This time around, I want to share my personal journey and dive into the world of shipping cool things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Note
&lt;/h3&gt;

&lt;p&gt;Thanks for taking the time to read this blog. Everything I share here is 100% my thoughts and beliefs. It's based on my experiences, so feel free to disagree or drop your thoughts in the comments. Enjoy the read! :)&lt;/p&gt;

&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&gt;

&lt;p&gt;This blog recounts my experiences working at an early-stage startup. I've been a Software Engineer at &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt; for over 3 months now, and in this blog, I share my insights and reflections on this period. I hope it helps you decide whether working in a startup is something you'd consider and provides a glimpse into the workings of early-stage startups.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Plot
&lt;/h3&gt;

&lt;p&gt;I worked as a software engineer at &lt;a href="https://geekyants.com/"&gt;Geekyants&lt;/a&gt; from Oct 2021. It was where I began my corporate journey, shipping my first line of code. Working at &lt;a href="https://geekyants.com/"&gt;GeekyAnts&lt;/a&gt; was a fantastic experience with amazing community support, providing opportunities to learn something new almost every single day. Things were going well. In the second quarter of 2023, I started feeling the need to shift my focus to building products alongside writing code. I wanted to experience how the product cycle works and how decisions are made. &lt;/p&gt;

&lt;p&gt;I believed startups were a great way to learn about this, so I decided to make the switch and join a startup where I could take full responsibility for building something meaningful in a product that adds value to people's lives.&lt;/p&gt;

&lt;h3&gt;
  
  
  Turn of events
&lt;/h3&gt;

&lt;p&gt;2023 was a tough time, with news of layoffs circulating online. I kept job hunting but wasn't actively looking for a switch since the market was unpredictable. One day, while randomly scrolling through Twitter, I saw a tweet mentioning, "If anyone is hiring for React Native roles, please comment below." I noticed &lt;a href="https://twitter.com/paraschopra"&gt;Paras Chopra&lt;/a&gt;'s reply with a Google Doc link, filled out the form, and within a week, I got a call from the company. The interview process lasted for three weeks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I know some of you may be interested in the interview process. Let's discuss it on some other day. I promise I will share it soon. :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I cracked the interview and got a job offer. I was a little confused in this unpredictable market, wondering if I should even consider working in startups. I talked with my friends; the offer was good, but I had no idea about the company and the founder.&lt;/p&gt;

&lt;p&gt;These are some points that I considered before joining &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Founder:&lt;/strong&gt; As a core member of a team, you always bet on the founder, even if you believe in the idea as much as a founder does. The founder decides where we should head, and as a contributor in the initial days, the founder does the same to you. Since you are going to contribute heavily in the initial days, I realized &lt;a href="https://twitter.com/paraschopra"&gt;Paras&lt;/a&gt; (Founder of &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt;) is an amazing human being. He often shares his wisdom on Twitter, and he has already built a bootstrap company, &lt;a href="https://wingify.com/"&gt;Wingify&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Funding:&lt;/strong&gt; This is a subjective topic. If you are joining a startup that does have funding and has at least 1-2 years of runway, then that's a really good place to start working. On the other hand, initially, when they don't have funding and whether they want to build a bootstrap startup or are looking for funding, it's important to consider how they are going to survive until they reach the point of a little push up. After knowing the wonderful history of &lt;a href="https://twitter.com/paraschopra"&gt;Paras&lt;/a&gt;, I did not consider funding as an important factor, but &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt; recently raised a seed funding round by &lt;a href="https://www.sequoiacap.com/"&gt;Sequoia Capital&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Team:&lt;/strong&gt; This is the most important factor, and you should take this seriously. As your team is going to be small, you are going to work very closely. Hence, it becomes important to feel comfortable around them, to not hesitate to share your opinion, and to be honest with the team. As a core member of the team, your contribution will shape the product somehow, whether you are honest with the team or not.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Validate Idea
&lt;/h3&gt;

&lt;p&gt;I simply asked one question to &lt;a href="https://twitter.com/paraschopra"&gt;Paras&lt;/a&gt;, "So are we going to build an MVP, right?" He said no. He said we already have an MVP in a Discord server. I was a little shocked here. I was like, how is it possible to validate an idea without building a prototype of an app or web app. I was wrong. It turned out he did a pretty good job in the &lt;a href="https://discord.gg/VW52syAHP2"&gt;Discord server&lt;/a&gt;, and people were/still are using the &lt;a href="https://discord.gg/VW52syAHP2"&gt;Discord server&lt;/a&gt;. Soon, I realized this is the place I was looking for to work. I joined the company in the first week of September 2023.&lt;/p&gt;

&lt;h3&gt;
  
  
  SDE to Founding Engineer
&lt;/h3&gt;

&lt;p&gt;I got the role of Senior Software Engineer, and my primary goal is to build a mobile application for &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt;. I am not going to talk about what &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt; is; I think our homepage probably justifies that. One thing I'm excited about working here is that if this works, we can make an impact on a huge number of people out there, helping them live a better life. This would be a moment of feeling proud and it keeps me motivated to work.&lt;/p&gt;

&lt;p&gt;We are a very small team at &lt;a href="https://nintee.com/"&gt;Nintee&lt;/a&gt;. In the engineering department, we have a total of 6 people, including CTO &lt;a href="https://twitter.com/abhinav"&gt;Abhinav Saxena&lt;/a&gt;, who is my manager. We work remotely, and since the team is small, we work very closely with each other. The brainstorming sessions are quite helpful to learn and build as a team. Fortunately, I have a manager who is really talented, and he has amazing work experience like building the messaging app &lt;a href="https://en.wikipedia.org/wiki/Hike_Messenger"&gt;Hike&lt;/a&gt; from scratch. Remember &lt;a href="https://en.wikipedia.org/wiki/Hike_Messenger"&gt;Hike&lt;/a&gt;? A messaging app that was popular in genZ back in 2016. He keeps sharing his work experience with us, which keeps us inspired to work.&lt;/p&gt;

&lt;p&gt;Since the team is small, the feedback loop is fast. We have 1:1 sessions twice a month, in which we share feedback and talk about personal and company growth. I feel very fortunate to work with someone like &lt;a href="https://twitter.com/abhinav"&gt;Abhinav&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Thinking about Product
&lt;/h3&gt;

&lt;p&gt;Technically, it was sorted. We are having a good time building an app. We face obstacles often, but we always come up with solutions. As I said earlier, it's been more than 3 months, and our shipping cycle keeps iterating. One thumb rule of a startup is that feedback shapes products. In order to keep iterating on that feedback, we started shipping faster. We aimed to make two production releases every week. One will have a major features update, and the second one contains bug fixes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here's the catch: we don't always make 2 releases a week, but most of the time we did two releases. We started inviting external users and onboarded them via video call. Users are kind enough to give us honest brutal feedback. Their support helps the product a lot to shape the product in the initial stage. I felt astounding knowing that there are people out there who want to try something new and are ready to give feedback.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Move Fast, Break Things
&lt;/h3&gt;

&lt;p&gt;When you don't know whether the idea is going to be a product-market fit, you have to do lots of experiments. The faster this iteration loop, the closer you come to the idea of a product-market fit. Most decisions, whether related to engineering or product, are done very quickly.&lt;/p&gt;

&lt;p&gt;In 3 months, we moved things quickly – introducing a UI library, shipping new features, bug fixing, and inviting external users to use our app. Sometimes I refuse to believe we made this much progress so far. There is a time where you may need to redo things, and that's a really common thing. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I personally consider not falling in love with my work unless it's useful to others.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Work-life Balance
&lt;/h3&gt;

&lt;p&gt;As I said earlier, I work remotely. This means I have total control of my time. This is a myth that startups don't have work-life balance unless you don't know what you are doing in your job. I too agree that sometimes we need to pull up our socks and start working hard, but that's not the case often. This is a thrilling time when most startups are about to ship something exciting they've been working really hard on.&lt;/p&gt;

&lt;p&gt;If you are a really good developer and you know what you are doing, then building features won't take much time. It's more about understanding what you are building, finding edge cases. &lt;/p&gt;

&lt;p&gt;You have to take full responsibility for that feature. You have the control to make decisions in your domain. There's a new term in the market, "Product Engineer," and most of the time you have to act like a Product Engineer.&lt;/p&gt;

&lt;p&gt;On the other hand, I never worked in an office. Although we did 10 days of co-working together, and that was also a good time. We found ourselves productive. I am not against working in an office, but since I have spent most of my time working remotely, I feel that it's more productive.&lt;/p&gt;

&lt;p&gt;It worked for me, but it may not work for you. So feel free to disagree.&lt;/p&gt;

&lt;p&gt;That's the summary of pretty much how my life took turns in 2023. I feel very proud of the decisions that I took in my past. If I did not open Twitter, my life would have been completely different that I can't even imagine.&lt;/p&gt;

&lt;p&gt;There is a famous quote, "You are an average of five people you hang out with." I feel very fortunate that I am working with folks who are extraordinarily talented, whose wisdom shapes me somehow. These things only happen when you work at startups.&lt;/p&gt;

&lt;p&gt;I will finish this blog with one quote by me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Working in a startup is like gambling, either you fly so high or you fall down really fast, but you shouldn't forget you can retry anytime."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thank you for reading this blog. You can share your thoughts in the comment sections. I will see you with another blog.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>startup</category>
      <category>reactnative</category>
      <category>career</category>
    </item>
    <item>
      <title>React Native is Multi Threaded</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 04 Jun 2023 10:03:58 +0000</pubDate>
      <link>https://forem.com/ponikar/react-native-is-multi-threaded-44aj</link>
      <guid>https://forem.com/ponikar/react-native-is-multi-threaded-44aj</guid>
      <description>&lt;p&gt;TL;DR: React Native is multi-threaded!&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;This blog represents my personal thoughts and ideas for achieving exceptional performance in React Native. While it's meant to inspire and explore new possibilities, please remember that the techniques discussed may not work for everyone or in every situation. Let's keep an open and respectful dialogue, and feel free to share your thoughts and questions as we delve into the realm of pushing performance limits in React Native.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cue
&lt;/h3&gt;

&lt;p&gt;What if I told this to someone suffering from performance issues while building a React Native app? They'd probably troll me in the comment section, and I can't blame them. But before you jump to conclusions, give me 2 minutes to explain why I believe React Native is multi-threaded.&lt;/p&gt;

&lt;p&gt;Before we delve into that, I want to address all readers, whether you've been developing React Native apps for a long time or are just starting out. We're at the beginning of the Era of React Native, and things are changing with the introduction of the new architecture called JSI that powers React Native apps. But I won't go into much detail about JSI here; there are good talks and blogs available for that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile Apps 📱
&lt;/h3&gt;

&lt;p&gt;At the end of the day, we're building native mobile apps. JavaScript acts as the controller. If we look at it broadly, we have two threads, as mentioned in the React Native &lt;a href="https://reactnative.dev/architecture/threading-model" rel="noopener noreferrer"&gt;blog&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/Native Thread&lt;/li&gt;
&lt;li&gt;JS Thread&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgvse8v78gema7tda5bh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgvse8v78gema7tda5bh.png" alt="React Native Threads"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The native thread executes the native iOS/Java code, while the JS code runs in the JS thread. As React Native developers, we often interact with the JS thread because we primarily know JS and don't have much knowledge of the native languages, such as Java/Kotlin and Objective-C/Swift.&lt;/p&gt;

&lt;p&gt;Think of it as multiple universes. We know that another universe exists, but we have no idea how to communicate with it. The old bridge simply sends data between the JS thread and the native thread, with the JS thread not interacting much with the native thread.&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript is Single Threaded
&lt;/h3&gt;

&lt;p&gt;JavaScript is designed to execute one thing at a time. It can't run multiple code executions simultaneously, effectively blocking the entire JS thread. Consequently, apps become unresponsive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;React Native wizards identified this problem and realised that expensive tasks like animations can't run on the JS thread. It would be awesome if we could run animations on the native thread and free up the JS thread as much as possible. This led to the development of React Native Reanimated 2. I want to give a shoutout to &lt;a href="https://twitter.com/swmansion" rel="noopener noreferrer"&gt;Swmansion&lt;/a&gt;, the company behind this library, as most React Native apps now use it for animations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Secret Sauce 🍝
&lt;/h3&gt;

&lt;p&gt;The idea is simple: if you want to make React Native apps faster, keep the JS thread as free as possible. But how? Readers might think, "Do you want us to write platform-specific code now because JS can't handle heavy tasks?" Well, no.&lt;/p&gt;

&lt;p&gt;By using libraries like &lt;a href="https://github.com/software-mansion/react-native-reanimated" rel="noopener noreferrer"&gt;Reanimated&lt;/a&gt;, &lt;a href="https://github.com/mrousavy/react-native-mmkv" rel="noopener noreferrer"&gt;React Native MMKV&lt;/a&gt;, and &lt;a href="https://github.com/Shopify/react-native-skia" rel="noopener noreferrer"&gt;React Native Skia&lt;/a&gt;, you leverage the native thread. However, I know there are developers building amazing things who think outside the box. I'm always thrilled when I read engineering blogs from companies like Netflix, Meta, and Shopify. They create solutions beyond the limits.&lt;/p&gt;

&lt;p&gt;So, for that extra momentum, you might consider writing your own solution in native code to make your app stand out. You need to sit with your team and make important decisions. In this AI era, writing and understanding boilerplate code couldn't be easier, thanks to ChatGPT.&lt;/p&gt;

&lt;p&gt;I understand that in 90% of cases, you won't want to choose this path. However, if you really want to write native code for your requirements, here's what you can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write the implementation in Native language.&lt;/li&gt;
&lt;li&gt;Create a JSI binding that connects this native method to JS code.&lt;/li&gt;
&lt;li&gt;Call this method from JS (Async/Sync).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is how you can offload your JS thread and make your app blazingly fast.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts 🎁
&lt;/h3&gt;

&lt;p&gt;I know this solution is challenging and may not be for everyone, especially those who are just starting with&lt;br&gt;
React Native. Unfortunately, there is no declarative way to offload your JavaScript thread in React Native. But the future is bright, and we will have support for offloading the JS thread.&lt;/p&gt;

&lt;p&gt;Actually, there is a solution. React Native Reanimated has something called a worklet, which runs JS code in the UI thread. However, you need to be very careful when using this. I will provide the &lt;a href="https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/worklets/" rel="noopener noreferrer"&gt;documentation link&lt;/a&gt; here.&lt;/p&gt;

&lt;p&gt;As I mentioned before, this is a new era of React Native, and things will get a lot better in the near future. If you're a beginner, keep doing what you're doing, try to understand how React Native works, and stay aware of what's happening in the React Native world. The best way to do this is by watching RN talks, reading blogs, and engaging with the community.&lt;/p&gt;

&lt;p&gt;That's it from my side. Thank you so much for reading the blog. If you have any questions, please put them in the comment section.&lt;/p&gt;

&lt;p&gt;I will see you in the brand new blog. Stay tuned.&lt;/p&gt;

&lt;p&gt;Darshan Ponikar&lt;br&gt;
Signing off...&lt;/p&gt;

&lt;p&gt;Edited by ChatGPT&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>mobile</category>
      <category>programming</category>
    </item>
    <item>
      <title>My React Native Journey</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Fri, 25 Nov 2022 11:10:33 +0000</pubDate>
      <link>https://forem.com/ponikar/my-react-native-experience-2pcm</link>
      <guid>https://forem.com/ponikar/my-react-native-experience-2pcm</guid>
      <description>&lt;p&gt;Hi there, My name is Darshan. I work as a Full Stack Engineer and today I want to share my journey with React Native. This blog contains everything I have learned and experienced with React Native.&lt;/p&gt;

&lt;p&gt;I bet it excites every react developer out there when first time they get to know about react native. We can finally write native application in JavaScript. So we spin up our machine create a fresh project and start writing our app. &lt;/p&gt;

&lt;h2&gt;
  
  
  Think like Mobile Engineer
&lt;/h2&gt;

&lt;p&gt;It's okay if the subtitle didn't make sense to you right now. I can understand we have background of web engineer. We don't know anything about mobile engineering and that's totally okay. &lt;/p&gt;

&lt;p&gt;In my early day and even today I use to observe a lot of native applications and I compare them with my project and I try to figure out how can I improve my application with that. &lt;/p&gt;

&lt;p&gt;Let's suppose you are building a chat app, you can take a reference from WhatsApp or Instagram messaging. Try to figure out what things are need to be added or improved. We will take more about this later in this blog. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Avoid over comparing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5idxrlk505m7nqo8niz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa5idxrlk505m7nqo8niz.gif" alt="men drinking beer beyond his limit" width="260" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was my problem. I used to over compare a lot and it made me sad.😅 Lots of time I wanted to quit my project and do something else.&lt;/p&gt;

&lt;p&gt;But that's totally okay if you can't reach the perfection in one go. It will come in iteration of versions. Don't put too much stress on yourself. &lt;/p&gt;

&lt;h2&gt;
  
  
  Expo to the moon 🚀
&lt;/h2&gt;

&lt;p&gt;If you are just getting started with React Native. You don't want to juggle with all the native side configuration and language. Expo is probably a safe option to get started it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Spend sometimes with Native Environment
&lt;/h2&gt;

&lt;p&gt;It was 50% lie when someone told you that you only have to deal with JavaScript. Sometimes you need to configure native environment to make a feature work. You may have encountered with library which need native configuration. &lt;/p&gt;

&lt;p&gt;So it would be good if you get used to it as early as possible. It will definitely going to help you in long run. &lt;/p&gt;

&lt;h2&gt;
  
  
  User experience matter the most
&lt;/h2&gt;

&lt;p&gt;It's okay if your app UI doesn't look good but I think as Mobile engineer (I hope you are thinking yourself as same 😅)&lt;br&gt;
You should always try to improve the user experience that's the reason users prefers Native apps over Web app.&lt;/p&gt;

&lt;p&gt;Take an example of Forms. Forms behaves differently on Native Applications. &lt;/p&gt;

&lt;p&gt;Accessibility of Keyboard: When the keyboard shows up the field should be moved up and have enough space between the keyboard and field so users can see whatever they are typing. (Common sense right 😅) In mobile we need to take care of this things explicitly.&lt;/p&gt;

&lt;p&gt;Feedback: Users loves to see what happens when they do some interactions with your applications. For example showing loading indicators, Showing Popups, etc. &lt;/p&gt;

&lt;h2&gt;
  
  
  It should work without Internet
&lt;/h2&gt;

&lt;p&gt;If your application is not working without internet, It won't make sense to install it at first place. You should always integrate offline storage in your app. when users close your app and come back your app should resume from the last state. &lt;/p&gt;

&lt;p&gt;You should give a feedback when the app is online/offline. So users are aware of what is happening in background.&lt;/p&gt;

&lt;p&gt;Even though you are making a basic app like TodoList. This will make good impression on users. &lt;/p&gt;

&lt;h3&gt;
  
  
  Performance
&lt;/h3&gt;

&lt;p&gt;Although this section could have covered in User experience section but as we are taking about React Native I want to briefly share my thoughts about it. &lt;/p&gt;

&lt;p&gt;You must have heard, when it comes to performance, react native may not a good to build an app. This is totally wrong and this specifically depends on the use case of the application. There are plenty of blogs and talks which justify when to use react native. So I am not going to write anything about it but React Native performs well and there are plenty of good companies even MNCs are investing in React Native so we don't need to worry about that part. &lt;/p&gt;

&lt;p&gt;Also React Native is changing, They have recently announced the new architecture that's basically changes the communication part of React Native. (You can read more about it &lt;a href="https://techblog.geekyants.com/rethinking-react-native-architecture-part-i" rel="noopener noreferrer"&gt;here&lt;/a&gt;). Future of react native is far better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Always start with android.
&lt;/h3&gt;

&lt;p&gt;If you are targeting both platform, focus more on android. iOS has blazingly fast CPU processing power so you might or might not see the performance bottlenecks.&lt;/p&gt;

&lt;p&gt;Test your application in low-end devices and make sure everything is working as expected. You may need to invest more time.&lt;/p&gt;

&lt;p&gt;Like any react web applications, Avoid unnecessary re-rendering. You can profile your application and figure about which component is causing re-rendering.&lt;/p&gt;

&lt;p&gt;You can use debugging tools like flipper to debug better. It has plugin support so you can install or make plugin. That will make our life easier.   &lt;/p&gt;

&lt;h3&gt;
  
  
  Keep Building Stuff
&lt;/h3&gt;

&lt;p&gt;Lastly, I would recommend keep building stuff whether it is clone app or your idea unless you don't build it by yourself you will not understand. Avoid tutorials hell.&lt;/p&gt;

&lt;p&gt;I know this blog was very general after all it was my experience with mobile engineering with react native. &lt;/p&gt;

&lt;p&gt;Thanks for reading, I hope this blog has helped you. If you are having any questions related to this blog or react native you can put those in a comment box. &lt;/p&gt;

&lt;p&gt;All the best. ✨ &lt;br&gt;
DM me at &lt;a href="https://twitter.com/iponikar" rel="noopener noreferrer"&gt;iponikar&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discuss</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>TypeScript: Types of Types</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Sun, 09 Jan 2022 11:29:39 +0000</pubDate>
      <link>https://forem.com/ponikar/typescript-types-of-types-39ie</link>
      <guid>https://forem.com/ponikar/typescript-types-of-types-39ie</guid>
      <description>&lt;p&gt;Hey there, I hope you are doing great! This is my third post about typescript and this is one of the most important topic to discuss. &lt;/p&gt;

&lt;h3&gt;
  
  
  Hold on
&lt;/h3&gt;

&lt;p&gt;Before you go ahead I am assuming that you have basic knowledge of what is typescript and how does it works but if you don't have any idea about typescript than you can checkout my other blogs.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/ponikar" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F602686%2Fccd3d87e-b207-4ff7-8846-ceb1cc965348.jpeg" alt="ponikar"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ponikar/introduction-to-typescript-1acj" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Introduction to TypeScript&lt;/h2&gt;
      &lt;h3&gt;Ponikar ・ Jun 21 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#typescript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="/ponikar" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F602686%2Fccd3d87e-b207-4ff7-8846-ceb1cc965348.jpeg" alt="ponikar"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ponikar/typescript-any-unknown-never-1idc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;TypeScript: Any | Unknown | Never&lt;/h2&gt;
      &lt;h3&gt;Ponikar ・ Sep 4 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#typescript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  How to read this blog?
&lt;/h3&gt;

&lt;p&gt;This blog is more like Crash Blog.😂&lt;/p&gt;

&lt;p&gt;I have wrote this blog along with examples. Unfortunately I cannot add Interactive code snippets like CodeSandBox. &lt;/p&gt;

&lt;p&gt;My advice is to visit this &lt;a href="https://www.typescriptlang.org/play" rel="noopener noreferrer"&gt;playground&lt;/a&gt; and experiment these examples by your own. This will give you good understanding about Typescript.&lt;/p&gt;

&lt;p&gt;Let's go........&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/RleLlzY0MVxY7N5xX7/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/RleLlzY0MVxY7N5xX7/giphy.gif" alt="Typescript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick recap of &lt;code&gt;Types&lt;/code&gt; and &lt;code&gt;Interface&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Although typescript gives you &lt;strong&gt;default type annotations&lt;/strong&gt; like &lt;code&gt;string&lt;/code&gt;,&lt;code&gt;number&lt;/code&gt;,&lt;code&gt;boolean&lt;/code&gt;, etc. You may need to create your &lt;strong&gt;own types&lt;/strong&gt; according to your need or when you are working with real world project.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;type&lt;/code&gt; and &lt;code&gt;interface&lt;/code&gt; let you create your own type. So you can use it anywhere in your project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As I promised everything is driven by examples. Let's see. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose I want to create a &lt;code&gt;User&lt;/code&gt; type that contains some properties like &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;, &lt;code&gt;contactNumber&lt;/code&gt; etc.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User&lt;/code&gt; type with &lt;code&gt;interface&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
   &lt;span class="nl"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;contactNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&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;Taddda! We have create our first type. You may say that this is something like creating an object. You are slightly right. This is more like creating &lt;code&gt;user-defined&lt;/code&gt; type than object.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User&lt;/code&gt; type with &lt;code&gt;type&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
   &lt;span class="nl"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;contactNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&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;You may notice that the both ways of defining type are almost similar. So when should I use which one? &lt;/p&gt;

&lt;p&gt;There is &lt;strong&gt;one major difference between these two is that &lt;code&gt;interface&lt;/code&gt; let you inherit another &lt;code&gt;interface&lt;/code&gt; like a One class can inherit another class&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="c1"&gt;// B can access all the types of A.&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you facing situation something like this. Feel free to use &lt;br&gt;
interfaces. &lt;/p&gt;
&lt;h3&gt;
  
  
  What is types of types?
&lt;/h3&gt;

&lt;p&gt;If you are using typescript, there are highly chances that you will ended up writing more and more codes. But there is a one way we can try to avoid it. &lt;/p&gt;

&lt;p&gt;it simple mean is that you can create &lt;strong&gt;types from the existing types dynamically&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are some helpful type annotation that let you to build types from types. &lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;keyof&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Let get start with keyof. keyof returns the &lt;strong&gt;union of keys of type OR interface&lt;/strong&gt;. (consider keys as the left hand side properties of type and interface).&lt;/p&gt;

&lt;p&gt;Let's take an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;contactNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// PropertyOfUser can be name | email | contactNumber&lt;/span&gt;
&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;PropetyOfUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;keyof&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Generic Types
&lt;/h4&gt;

&lt;p&gt;Generic types are fun. that basically let you &lt;strong&gt;pass a type as argument of another type&lt;/strong&gt; that you can assign in various way.&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="c1"&gt;// assigning default type, if nothing is provided. &lt;/span&gt;
&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;GenderType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;male&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;female&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;GenderType&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;UserAccount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;male&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// pass that type as an argument.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a very made up example to explain you how the Generic Types work. You can &lt;strong&gt;assume this type similar like functions which take and argument and perform some tasks.&lt;/strong&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The given type is not recommended way to write &lt;code&gt;User&lt;/code&gt; Type. It was just for the example. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is really useful in various ways. Especially if you want to make more reusable types.&lt;/p&gt;

&lt;h4&gt;
  
  
  Type Indexing.
&lt;/h4&gt;

&lt;p&gt;Type indexing gives &lt;strong&gt;type of particular property/key&lt;/strong&gt; of interface or type. &lt;/p&gt;

&lt;p&gt;Here's example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;male&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;female&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;genderOfUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gender&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// type indexing&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is very hypothetical example I have taken, but you can see that &lt;strong&gt;instead of writing &lt;code&gt;male&lt;/code&gt; or &lt;code&gt;female&lt;/code&gt;. We can just assign type index.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Mapping
&lt;/h3&gt;

&lt;p&gt;Mapping is a process of &lt;strong&gt;iterating over keys of type and let you modify the type of that key&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Didn't get it? Let's see an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;RequireUserFields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;keyof&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="nx"&gt;boolean&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;In above example we are just making another type by using User Type. We are &lt;strong&gt;iterating through the keys and assigning a &lt;code&gt;boolean&lt;/code&gt; type.&lt;/strong&gt; You can see the advantage here that you &lt;strong&gt;don't need to manually write all the keys&lt;/strong&gt; of User type again.&lt;/p&gt;

&lt;p&gt;This was very high level overview of How you can write dynamic types that avoid unnecessary typescript code.&lt;/p&gt;

&lt;p&gt;If you found this helpful, please let me know your thoughts in comments.&lt;/p&gt;

&lt;p&gt;If you think there is something wrong or missing. Please let me and other readers know about it.&lt;/p&gt;

&lt;p&gt;If you want to ask some questions about typescript or anything about Front-end dev. You can reach me on Twitter. &lt;br&gt;
&lt;a href="https://twiiter.com/iponikar" rel="noopener noreferrer"&gt;@iponikar&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog. See you soon with another one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/mqd0IiCu4iBVK/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/mqd0IiCu4iBVK/giphy.gif" alt="Typescript"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React Query</title>
      <dc:creator>Ponikar</dc:creator>
      <pubDate>Fri, 07 Jan 2022 16:52:51 +0000</pubDate>
      <link>https://forem.com/ponikar/react-query-3h25</link>
      <guid>https://forem.com/ponikar/react-query-3h25</guid>
      <description>&lt;p&gt;Hey there, I hope you are safe and well. Today I am going to write about React Query. What is a use of this library and Why you ever want to use it? &lt;/p&gt;

&lt;p&gt;I've been working with this library for past 6 months and I was always asking myself like Why I didn't know about it before? &lt;/p&gt;

&lt;h3&gt;
  
  
  Why?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/cPKWZB2aaB3rO/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/cPKWZB2aaB3rO/giphy.gif" alt="React query why" width="360" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I firstly going to share Why you ever want to use something like react query? In React Ecosystem. We have everything from state management like Redux, MobX to UI libraries like material UI, etc. &lt;/p&gt;

&lt;p&gt;But there is something that we always struggle especially me and that is API fetching. Yes that is true and I can bet you may have struggle with that too. &lt;/p&gt;

&lt;p&gt;See, API fetching needs to do lots of things other than just fetching and rendering the list in front of user. If you really care about User Experience You may have followed this pattern like,&lt;/p&gt;

&lt;p&gt;It's our responsibility to acknowledge user what is happening behind the scene. Like fetching data (Show loading indicator). If something went wrong show Error message and so on. &lt;/p&gt;

&lt;p&gt;We always need to manually take care of all this stuff. Which I always struggle with that whenever I fetch APIs in components.&lt;/p&gt;

&lt;h4&gt;
  
  
  State Management. (Server States vs Local States)
&lt;/h4&gt;

&lt;p&gt;I have been reading Kent C. Dodds's blog and He has specifically mentioned that there are two types of States (Data) we need to handle. &lt;/p&gt;

&lt;p&gt;1) Server States &lt;br&gt;
2) Local States&lt;/p&gt;

&lt;p&gt;They need to handle individually other than just using Global state management libraries like Redux library.&lt;/p&gt;

&lt;p&gt;One of the best example of this situation is Chat Messaging System. &lt;/p&gt;

&lt;p&gt;In typically messaging app, You will see Loader whenever you send message and then the acknowledgment (Sent) and error (Message failed). In this situation you need to update states both sides. &lt;/p&gt;

&lt;p&gt;This can become complex as you try to add more functionalities. &lt;/p&gt;

&lt;p&gt;When I was learning React with Redux before, I thought redux will be the only one solution for all problems but then the day passed and I realised having a global state management is not sufficient to deal with all the challenges.  &lt;/p&gt;
&lt;h4&gt;
  
  
  Caching
&lt;/h4&gt;

&lt;p&gt;If you are beginner, You can ignore this but in simple words, Caching is a client side storage.&lt;br&gt;
Whenever you request for data to server. Our browser cache (persists) data. Your browser will look into the cache before requesting data to server. This also allow us to manage caches by our own but there is no better way to implement that.&lt;/p&gt;

&lt;p&gt;Caching perform a very crucial role in terms of scaling your app. You can learn more about caching on internet. &lt;/p&gt;
&lt;h3&gt;
  
  
  React Query
&lt;/h3&gt;

&lt;p&gt;React query is solution for all the challenges that I have mentioned above. It is a data fetching library or I should introduced as Missing Piece of React Ecosystem. React Query take care of everything from managing local and server states, Caching states, Managing various API states like Loading, Error, Data, etc.  &lt;/p&gt;

&lt;p&gt;React Query wraps your app with Client Provider that manages caching and syncing of your states across all the components. (My favourite part). 😍&lt;/p&gt;
&lt;h3&gt;
  
  
  Enough talk, let's show the example.
&lt;/h3&gt;

&lt;p&gt;We are going to fetch posts from Server with help of react query. &lt;/p&gt;
&lt;h4&gt;
  
  
  First we will wrap our App with &lt;code&gt;QueryClientProvider&lt;/code&gt;.
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;QueryClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;QueryClientProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-query&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;queryClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;QueryClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;App&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="k"&gt;return&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;QueryClientProvider&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;queryClient&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Posts&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/QueryClientProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  We will use &lt;code&gt;useQuery&lt;/code&gt; hook to fetch data.
&lt;/h4&gt;

&lt;p&gt;This is just beginning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useQuery&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-query&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&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="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;repoData&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
     &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://jsonplaceholder.typicode.com/posts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
       &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
     &lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Please wait...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

   &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;

   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Posts&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;Day&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&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="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt; &lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;useQuery&lt;/code&gt; hook that take care of fetching data from the server. Something like &lt;code&gt;GET&lt;/code&gt; method. Notice how this hook abstract the &lt;code&gt;loading&lt;/code&gt; and &lt;code&gt;error&lt;/code&gt; handling part.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We didn't require to use &lt;code&gt;try catch&lt;/code&gt; block here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Key: key is unique for each request to identify each request uniquely.&lt;/p&gt;

&lt;p&gt;Callback: This callback is callback that return async response. You can also use &lt;code&gt;Axios&lt;/code&gt; here. &lt;/p&gt;

&lt;h4&gt;
  
  
  Note:
&lt;/h4&gt;

&lt;p&gt;Once this hook fetch the data from server. It stores that data in cache memory. So when component try to make same request again instead of asking from server it will return that response from &lt;code&gt;Cache Memory&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also invalidate your cache storage if you need fresh data from server. All you need to use &lt;code&gt;useQueryClient&lt;/code&gt; hook from &lt;code&gt;react-query&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;We will see that example in next section. When we try to mutate data to server. &lt;/p&gt;

&lt;p&gt;Before we can talk about data mutation. You may notice that you don't need to use Global state management libraries like redux to manage server states throughout components. Because We have already use &lt;code&gt;Cache Memory&lt;/code&gt;. That will syncs your data automatically without dispatching any actions or updating any states manually. This will be really helpful for a complex React Application.&lt;/p&gt;

&lt;p&gt;Data Mutation &lt;/p&gt;

&lt;p&gt;Let's try send request of New Post to the server. We will use &lt;code&gt;useMutation&lt;/code&gt; library to mutate data on server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useMutation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useQueryClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-query&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NewPost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useQueryClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;mutate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useMutation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPost&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="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://myblog.app/new&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{...&lt;/span&gt;&lt;span class="nx"&gt;newPost&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// register all the callbacks,&lt;/span&gt;
    &lt;span class="na"&gt;onMutate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="c1"&gt;// this will be called when you invoke mutation method&lt;/span&gt;
      &lt;span class="c1"&gt;// ie like temporary showing blog&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;onError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&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;// this will be called when your API request get failed.&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;onSettled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// this will work either way. (Success, Fail)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&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;// this will be called when your API request get &lt;/span&gt;
     &lt;span class="c1"&gt;// executed successfully. &lt;/span&gt;
     &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;invalidateQueries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;posts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// will refetch posts&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newPost&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="c1"&gt;// add new post &lt;/span&gt;
    &lt;span class="nx"&gt;mutate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`temp-name`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;My Blog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The content goes here...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt; 
 &lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can you can easily mutate data on server. Also the callbacks help you to acknowledge user what is happening without setting up manually. You can compare that this is easy way to fetch APIs than what we were doing before. &lt;/p&gt;

&lt;p&gt;The intention of writing this blog was let you know about this amazing library. Rather than manually handling the API Request sync with local states. which is can give you lots of headache.&lt;/p&gt;

&lt;p&gt;I haven't covered everything of &lt;code&gt;react-query&lt;/code&gt; library. You can prefer &lt;a href="https://react-query.tanstack.com/overview"&gt;documentation&lt;/a&gt; for that. &lt;/p&gt;

&lt;p&gt;If you have read the entire blog. &lt;br&gt;
Thank you.&lt;/p&gt;

&lt;p&gt;If you think there is something wrong in this blog. Feel free to correct me in comments. Share your thoughts in comments that are you going to use &lt;code&gt;react-query&lt;/code&gt; or not. &lt;/p&gt;

&lt;p&gt;If you want to discuss something with me. You can reach me out on twitter. My DM is always open. I would love to help you. &lt;/p&gt;

&lt;p&gt;Twitter: &lt;a href="https://twitter.com/iponikar"&gt;@iponikar&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
