<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aadil Halepotra on Medium]]></title>
        <description><![CDATA[Stories by Aadil Halepotra on Medium]]></description>
        <link>https://medium.com/@a.halepotra90?source=rss-b480f9081563------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g8fjm3GuB1l1lvVtO_WRIQ.jpeg</url>
            <title>Stories by Aadil Halepotra on Medium</title>
            <link>https://medium.com/@a.halepotra90?source=rss-b480f9081563------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:39:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@a.halepotra90/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building Your First Claude Code Plugin: A Step-by-Step Guide]]></title>
            <link>https://medium.com/simform-engineering/building-your-first-claude-code-plugin-a-step-by-step-guide-bdf7c1609ba7?source=rss-b480f9081563------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdf7c1609ba7</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[custom-plugin]]></category>
            <category><![CDATA[claude-plugin]]></category>
            <dc:creator><![CDATA[Aadil Halepotra]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 09:26:14 GMT</pubDate>
            <atom:updated>2026-08-17T09:26:14.961Z</atom:updated>
            <content:encoded><![CDATA[<h4>From folder structure to live deployment: The complete guide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2R-xY_WYt0GYmQLnyKxycQ.png" /></figure><p>Ready to build? This isn’t just a tutorial with code snippets. It’s the complete story of how we build one specific Claude code plugin from folder structure to deployment to real impact.</p><p>If you haven’t read the first blog, <a href="https://medium.com/simform-engineering/build-claude-code-plugins-for-your-team-e587c1e581bb"><em>Build Claude Code Plugins for Your Team</em></a>. It explains the why. This blog post is about how.</p><h3>Understanding the Plugin Folder Structure</h3><p>Every Claude code plugin follows this structure:</p><pre>my-plugin/<br>├── .claude-plugin/<br>│   └── plugin.json           (metadata)<br>├── commands/                 (slash commands)<br>│   └── create-component.md<br>├── skills/                   (reusable skills)<br>│   └── component-patterns/<br>│       └── SKILL.md<br>├── agents/                   (AI assistants)<br>│   └── code-reviewer.md<br>└── hooks/                    (automation - optional)<br>    └── hooks.md</pre><p><strong>Key rule:</strong> Only plugin.json goes inside .claude-plugin/. Everything else at the plugin root.</p><p>Let’s get started with understanding and implementing the Claude Code plugin:</p><h3>plugin.json</h3><p>The metadata file that tells Claude Code what your plugin is.</p><p><strong>File: </strong><strong>.claude-plugin/plugin.json</strong></p><pre>{<br>  &quot;name&quot;: &quot;your-team-plugin&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;Description of Plugin&quot;,<br>  &quot;author&quot;: {<br>    &quot;name&quot;: &quot;Your Team (Company name/Team name)&quot;<br>  }<br>}</pre><p><strong>What each field does:</strong></p><ul><li>name — plugin identifier</li><li>version — version number (helps manage updates)</li><li>description — what the plugin does</li><li>author — who created it</li></ul><p>That’s it. Simple metadata that Claude Code uses to load and display your plugin.</p><h3>The skill</h3><p>A skill is just a Markdown file with frontmatter. The description field is the trigger; Claude reads it and decides whether this skill is relevant to what you&#39;re doing right now, no manual invocation needed. Here&#39;s the full file, unedited:</p><p><strong>File: </strong><strong>skills/component-patterns/SKILL.md</strong></p><blockquote><em>Skill: </em><a href="https://gist.github.com/aadil-h/74890f8a803617a1e808980cf67c7471"><em>https://gist.github.com/aadil-h/74890f8a803617a1e808980cf67c7471</em></a></blockquote><h4>Understanding this skill</h4><p><em>Notice what this file is not</em>: it’s neither a prompt nor instructions written for a specific conversation. It’s a reference document the kind you’d want a new hire to read before their first PR. Three things make it work as a skill rather than just documentation sitting in a repo:</p><ul><li><strong>The </strong><strong>description field is doing real work.</strong> It lists the situations that should trigger this skill in plain language: &quot;creating a new shared component&quot; and &quot;writing a component props interface&quot; so Claude can match intent to content without you typing /component-patterns every time.</li><li><strong>Rules come with the code that enforces them.</strong> Never hardcode the hex color code; instead, take it from the global color file as per the theme, where all the colors are defined.</li><li><strong>It teaches by pattern, not by prose.</strong> Every convention file structure, props interface, style factory, variant pattern and barrel export is shown as a real snippet Claude can imitate, not described abstractly.</li></ul><h3>The command</h3><p>A command is a named action that includes its own frontmatter, which providesargument-hint for usage and specifies the allowed-toolsto define what the command is permitted to affect. Here’s the complete file:</p><p><strong>File: </strong><strong>commands/create-component.md</strong></p><blockquote>Command: <a href="https://gist.github.com/aadil-h/34440a8a5826ba6a87336233442ca532">https://gist.github.com/aadil-h/34440a8a5826ba6a87336233442ca532</a></blockquote><h4>Understanding this command</h4><p>This is the shortest file of the four files (skills, agents, command, hooks). Look at what it <em>deliberately omits</em>: no file templates, no styling rules and no naming conventions. Those all live in component-patterns. The command&#39;s only real job is orchestration:</p><ul><li><strong>Always first “load the skill.”</strong> The command doesn’t know what a correct component looks like it doesn’t need to. It borrows that knowledge from the skill at runtime, which means if the styling convention changes tomorrow, this file doesn’t need a single edit.</li><li><strong>$ARGUMENTS gives it a stable interface.</strong> The command /create-component Avatar --variant reads like a CLI command because it behaves the same way as creating your avatar variant based on the name you provide.</li><li><strong>allowed-tools is a permission boundary, not documentation.</strong> Scoping this command to Read, Write, Edit, Glob, Bash, Skill means it literally cannot reach for a tool outside its job, regardless of what the model decides mid-task.</li><li><strong>The last step points back at the skill again.</strong> “Run the verification checklist from the skill before finishing” closes the loop the command doesn’t just generate files, it re-checks its own output against the same source of truth it started from.</li></ul><h3>The agent</h3><p>An agent has its own role, its own set of allowed tools, and a smaller job than the main assistant. Ours is kept very simple and <strong>read-only</strong>. It can inspect a diff against agent define coding standard and tell us what it finds, but it cannot change or edit any files. Here’s the complete file:</p><p><strong>File: </strong><strong>agents/code-reviewer.md</strong></p><blockquote><em>Agents: </em><a href="https://gist.github.com/aadil-h/20ea8352b923e3fa12d896c84d57dbc3"><em>https://gist.github.com/aadil-h/20ea8352b923e3fa12d896c84d57dbc3</em></a></blockquote><h4>Understanding this agent</h4><p>This file is by far the longest of the four, and that length is deliberate. The entire structure of an agent lies in its context; most people prefer not to have it re-derived during every review. A few things worth noticing:</p><ul><li><strong>tools: [Read, Grep, Glob, Bash] with no </strong><strong>Write or </strong><strong>Edit.</strong> This isn&#39;t a suggestion in the prompt; it&#39;s a strict capability boundary. The agent cannot modify a file, no matter how confident it is in a solution. That&#39;s what makes &quot;read-only&quot; a guarantee instead of a request.</li><li><strong>“Detect the Stack First”</strong> basically means <strong>check what the project is using before judging anything</strong>. A project might use React Navigation or Expo Router, Redux or GraphQL, Formik or react-hook-form. The agent should not just guess. It needs to check the actual project files first and then decide what rules to apply. This helps avoid reporting problems that are not actually problems for that particular project.</li><li><strong>Every rule is paired with the failure it prevents.</strong> It is a chain of rules that needs to be followed by code standards.</li><li><strong>The output format is fixed, every time.</strong> Summary → Critical Issues → Standards Violations → Minor Issues → Approved Patterns. A human reviewer’s mood does change what is flagged first; a fixed template means this agent’s review reads the same on PR #12 and PR #612.</li></ul><p><strong>The lesson:</strong> Use an agent when the task needs its own role, limited tools, and specific knowledge. This keeps the main assistant’s context clean and avoids filling it with extra instructions and information that it doesn’t need all the time.</p><h3>The hook</h3><p>Hooks are the exception; they do not determine anything in the model. Hooks are a shell command that runs automatically during a lifecycle event, specifically PreToolUse, before any Read or Edit actions occur. Full file below:</p><p><strong>File: </strong><strong>hooks/hooks.md</strong></p><blockquote><em>Hooks: </em><a href="https://gist.github.com/aadil-h/262e5bf5c4b3d84884645d2082b9844f"><em>https://gist.github.com/aadil-h/262e5bf5c4b3d84884645d2082b9844f</em></a></blockquote><h4>Understanding this hook</h4><p>This file looks the least like “AI configuration” of the four, and that’s exactly why it belongs here. A hook isn’t a prompt the model reads and chooses to follow, it’s a shell command the harness runs regardless of what the model wants:</p><ul><li><strong>It tells Claude what to do when blocked, not just what gets blocked. </strong>Implement a hook to check restricted files before executing any command or skill. The hook should prevent Claude from reading restricted files and provide a clear reason for why access to those files is not allowed.</li><li><strong>It can block dangerous commands before they run.</strong> Implement a hook that inspects a command against a denylist (e.g. rm -rf, git push --force, credential dumps) before execution. The hook should stop the command from running entirely and return a clear message telling Claude why it was blocked.</li></ul><p><strong>The lesson:</strong> If something must always be followed, don’t just tell the model to follow it. Put it in a hook. A hook works like a fixed gate outside the model, so even if Claude gets confused, makes a mistake, or tries to do something it shouldn’t, the rule still stays in place.</p><h3>How it fits together</h3><p>Ask Claude to create a component, and the <strong>skill + command</strong> handles the work. Ask it to review a PR, and the <strong>agent</strong> handles the review with its own limited set of tools. And if Claude tries to open a .env.production file during either task, the <strong>hook</strong> blocks it immediately, so the skill or agent never gets to see the file’s content.</p><p>Four different mechanisms, each solving a different kind of “make sure this always happens” problem:</p><ul><li>Know it → <strong>skill</strong></li><li>Do it → <strong>command</strong></li><li>Specialize in it → <strong>agent</strong></li><li>Guarantee it → <strong>hook</strong></li></ul><h3>Writing your own</h3><p>If you’re standardizing your team’s Claude Code setup, the quickest approach is:</p><ol><li>Write down the rule as a skill first plain Markdown, a good description trigger, real code examples.</li><li>If it’s an action someone repeats by hand, wrap it in a command that loads your skill and executes the steps.</li><li>If it’s a job that needs its own focused lens (review, audit, security), make it an agent with a scoped toolset.</li><li>If it must never be optional, make it a hook, not a reminder, in the skill.</li></ol><p>Write the standard once. Let Claude enforce it every time after.</p><h3><strong>Deployment of Claude Plugin</strong></h3><p>To deploy a Claude plugin, organize your project in the proper marketplace structure with a claude-plugin/marketplace.json manifest file and a plugins/ folder.</p><p>Before sharing it, check that everything is correct by running claude plugin validate. Once everything looks good, push the public repository to GitHub and share the marketplace URL.</p><h4>Test Locally</h4><p>You can test the plugin on your computer before publishing it.</p><p>Run:</p><p>claude --plugin-dir ./your-plugin-folder</p><p>You can also test it directly from Claude Code. Type /plugin, choose <strong>Add marketplace</strong>, and select your local plugin folder (./).</p><blockquote><strong>Host and distribute marketplaces: </strong><a href="https://code.claude.com/docs/en/plugin-marketplaces#host-and-distribute-marketplaces">https://code.claude.com/docs/en/plugin-marketplaces#host-and-distribute-marketplace</a></blockquote><p>Claude Code plugins are most useful when they reflect the way a team already builds software. <a href="https://www.simform.com/">Simform</a> applies the same principle to AI-assisted engineering: codify proven practices, automate repeatable work, and keep developers focused on higher-value problems.</p><blockquote><strong><em>For more updates on the latest tools and technologies, follow the </em></strong><a href="https://medium.com/simform-engineering"><strong><em>Simform Engineering</em></strong></a><strong><em> blog.</em></strong></blockquote><blockquote><strong><em>Follow Us: </em></strong><a href="https://twitter.com/simform"><strong><em>X</em></strong></a><strong><em> | </em></strong><a href="https://www.linkedin.com/company/simform/"><strong><em>LinkedIn</em></strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdf7c1609ba7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/building-your-first-claude-code-plugin-a-step-by-step-guide-bdf7c1609ba7">Building Your First Claude Code Plugin: A Step-by-Step Guide</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Claude Code Plugins for Your Team]]></title>
            <link>https://medium.com/simform-engineering/build-claude-code-plugins-for-your-team-e587c1e581bb?source=rss-b480f9081563------2</link>
            <guid isPermaLink="false">https://medium.com/p/e587c1e581bb</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude-skills]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[claude-plugin]]></category>
            <dc:creator><![CDATA[Aadil Halepotra]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 07:38:33 GMT</pubDate>
            <atom:updated>2026-07-16T07:38:33.825Z</atom:updated>
            <content:encoded><![CDATA[<h4>Automate repetitive development with reusable Claude code plugins</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jlut-u1c8L_D7pQy5Zkvgg.png" /></figure><p>Tired of watching your team rebuild the same thing they built last week? We faced this problem too. So we built a Claude code plugin to solve it.</p><h3>The Problem</h3><p>Building a form takes 45 minutes. Building an API endpoint takes 20 minutes. Building styled buttons takes another 30 minutes. Although they’ve done all of this dozens of times before.</p><p>Then comes code review:</p><ul><li>“Why’s your button styled differently than Sarah’s?”</li><li>“You hardcoded the color? It’s in the theme!”</li><li>“You forgot the security check.”</li><li>“Can you add tests?”</li></ul><p>Back to square one. Three review cycles later, your team is frustrated. The real cost? <strong>30% of development time goes to repetitive work, inconsistency, and back-and-forth reviews.</strong></p><h3>What If You Automated the Repetition?</h3><p>We decided to build something different: a Claude code plugin that knows your team’s coding standard.</p><p>Think of it this way: instead of manually building the same LEGO house 100 times, you teach Claude how to build it once. Then Claude builds it perfectly, every time, in 5 minutes.</p><p>Our Claude code plugin does exactly that. It’s an AI assistant built on Claude that knows:</p><ul><li>Every Coding standard your team follows</li><li>Every pattern your team follows</li><li>Every mistake to avoid</li></ul><p>The result? Faster code. Better code. Consistent code.</p><h3>What Is a Claude Code Plugin?</h3><p>A Claude code plugin is a package that extends Claude’s capabilities. Think of it like adding new tools to Claude’s toolbox.</p><p>Instead of manually writing code, your team uses Claude with custom commands that know your standards. These commands are defined in your claude code plugin and execute instantly.</p><p><strong>How it works:</strong></p><pre>You type a command<br>        ↓<br>Claude reads your plugin rules<br>        ↓<br>Claude generates code following your standards<br>        ↓<br>Code is generated in seconds<br>        ↓<br>Your team reviews (1 simple merge, not 3 cycles)</pre><p>That’s it. No magic — just Claude powered by your documented rules.</p><h3>The Numbers</h3><p>Here’s what changed when we rolled this out:</p><p><strong>Time to scaffold:</strong> 45 minutes down to 5 minutes. That’s 9x faster.</p><p><strong>Code review cycles:</strong> 3 rounds down to 1. 3x faster review cycles.</p><p><strong>Style violations:</strong> 80% of PRs had them. Now? Zero. 100% compliant.</p><p><strong>Onboarding time:</strong> 2 weeks down to 3 days. 3x faster for new developers.</p><p><strong>Security issues:</strong> 4 discovered monthly down to zero. Complete prevention.</p><h3>How It Actually Works</h3><p>Your team describes what they need. Claude reads your documented standards and generates exactly that.</p><p>In seconds, not hours.</p><p><strong>The process:</strong></p><ol><li>Developer types a prompt (something simple like “create a button”)</li><li>Claude reads your plugin’s rules (your standards, patterns &amp; security requirements)</li><li>Claude generates complete code following all your standards</li><li>Code includes everything: validation, security, tests, documentation</li><li>One quick review. One simple merge.</li></ol><p><strong>What gets generated depends on your stack:</strong></p><p>Claude adapts to your team’s tech stack from claude code plugin, whether it’s React, Python, Java, Node.js, or Go, and generates code that follows your exact standards:</p><ul><li>Your design system (colors, spacing, typography)</li><li>Your naming conventions (camelCase? snake_case? PascalCase?)</li><li>Your security practices (how you handle secrets, auth, validation)</li><li>Your documentation style (how you write comments and docs)</li><li>Your testing approach (how you structure tests)</li></ul><p><strong>The transformation:</strong></p><p><strong>Before:</strong> 2–3 hours of manual work + 2–3 review cycles + back-and-forth feedback</p><p><strong>After:</strong> Instant code generation + 1 quick review + 1 simple merge</p><h3>Who Benefits</h3><p><strong>Developers:</strong> 9x faster scaffolding. Fewer review cycles. More time on interesting problems.</p><p><strong>QA/Test teams:</strong> Tests are generated automatically. Fewer bugs slip through.</p><p><strong>Product managers:</strong> Features ship faster. More iterations per sprint.</p><p><strong>Security teams:</strong> Hardcoded secrets blocked automatically. Compliance patterns enforced.</p><p><strong>Leaders:</strong> Measurable velocity increase. Better code quality. Faster onboarding.</p><h3>The Real Lesson</h3><p>A plugin doesn’t replace people. It removes friction so people can do their best work.</p><p>Instead of spending energy on boilerplate, your team spends energy on:</p><ul><li>Solving real problems</li><li>Thinking about architecture</li><li>Shipping features with confidence</li><li>Innovating faster</li><li>Improving code quality instead of fixing repetitive mistakes</li><li>Experimenting with new ideas without slowing down delivery</li></ul><p>That’s where the real value is.</p><h3>What’s Next?</h3><p>You have two choices:</p><p><strong>Option A:</strong> Keep doing things manually</p><ul><li>45 minutes per task</li><li>3 review cycles per PR</li><li>2 weeks to onboard new devs</li></ul><p><strong>Option B:</strong> Build your own Claude plugin</p><ul><li>Document your patterns</li><li>Create a Claude plugin to enforce them</li><li>Benefit forever</li></ul><p>We chose Option B. And we’re not looking back.</p><p>If you’re curious about how to actually build one, stay tuned for the upcoming detailed blog on <strong>Building Your First Claude Plugin: A Step-by-Step Guide. </strong>In that post, we will walk through the folder structure, code examples, safety guards, and everything you need to get started.</p><p>What’s one thing your team builds repeatedly? Drop it in the responses — let’s talk about automating it.</p><p>Reusable AI workflows can turn hours of repetitive coding into minutes while keeping quality and consistency intact. That’s the kind of practical AI adoption <a href="https://www.simform.com/">Simform </a>focuses on building solutions that fit seamlessly into modern software engineering workflows.</p><blockquote><strong><em>For more updates on the latest tools and technologies, follow the </em></strong><a href="https://medium.com/simform-engineering"><strong><em>Simform Engineering</em></strong></a><strong><em> blog.</em></strong></blockquote><blockquote><strong><em>Follow Us: </em></strong><a href="https://twitter.com/simform"><strong><em>X</em></strong></a><strong><em> | </em></strong><a href="https://www.linkedin.com/company/simform/"><strong><em>LinkedIn</em></strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e587c1e581bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/build-claude-code-plugins-for-your-team-e587c1e581bb">Build Claude Code Plugins for Your Team</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in React Native 0.69]]></title>
            <link>https://medium.com/simform-engineering/whats-new-in-react-native-0-69-c0b17c53925c?source=rss-b480f9081563------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0b17c53925c</guid>
            <category><![CDATA[react18]]></category>
            <category><![CDATA[react-18-new-features]]></category>
            <category><![CDATA[hermes]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-upgrade]]></category>
            <dc:creator><![CDATA[Aadil Halepotra]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 05:19:18 GMT</pubDate>
            <atom:updated>2022-08-04T05:19:18.675Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGQ6zuQnXRXgKnO9gLuYaA.png" /></figure><p>Recently, React Native 0.69 was released. This version has several improvements for the New Architecture of React Native and new features: <strong>React 18 support</strong> &amp; <strong>bundled Hermes</strong>.</p><p>React Native 0.69 is the first release to support React 18. React Native <strong>enhances performance, flexibility, and memory usage</strong>.</p><h3>What’s React 18 support?</h3><p>React 18 introduces new hooks such as <strong>useId</strong>, and also includes new concurrency features like <strong>useTransition</strong>.</p><p><strong>useId</strong> is a built-in hook that has been available since React 18 to generate unique IDs that are stable across the server and client while avoiding hydration mismatches.</p><pre>const id = useId();</pre><p><strong>useId</strong> generates a string that includes the token. This helps ensure that the token is unique.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6bf98e6f94ae9b1295fb651e4431a50/href">https://medium.com/media/b6bf98e6f94ae9b1295fb651e4431a50/href</a></iframe><p><strong>React 18 introduces </strong><a href="https://reactjs.org/blog/2022/03/29/react-v18.html"><strong>several new features</strong></a>,<strong> including :</strong></p><ul><li>Automatic batching</li><li>New Strict Mode behaviors</li><li>New hooks (useId, useSyncExternalStore)</li></ul><p>React 18 is enabled by default when you enable the New Architecture in React Native 0.69. However, during the upgrade process, you may encounter some issues, in which case you can opt for React 18.</p><blockquote><strong>Opt-ing out of React 18 on Android</strong></blockquote><p>For Android, you can override the isConcurrentRootEnabled in your ActivityDelegate (in the MainActivityfile) and enable/disable React 18.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e1a7486bac3c3032b4d110d1b371c19/href">https://medium.com/media/7e1a7486bac3c3032b4d110d1b371c19/href</a></iframe><blockquote><strong>Opt-ing out of React 18 on iOS​</strong></blockquote><p>For iOS, you’ll have to change the return value to false of the concurrentRootEnabled method in your AppDelegate.mm file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c64f60e8ab78cd562f7b5af7e882f71/href">https://medium.com/media/5c64f60e8ab78cd562f7b5af7e882f71/href</a></iframe><blockquote>Note: Although the application runs on React Native 0.69, it will still utilize React 17 mode on Old Architecture even if React 18 is included in the package.json. Overriding the isConcurrentRootEnabled method will have no effect on your app.</blockquote><h3>What’s new: Bundled Hermes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*It4K7XDCq1Hsw8x-Uk1QKw.png" /></figure><p><a href="https://hermesengine.dev/"><strong>Hermes</strong></a> is an open-source JavaScript engine optimized for React Native.</p><ul><li>React Native 0.69 has built-in support for Hermes. Prior to this release, Hermes and React Native were released separately. This led to a misunderstanding as to which Hermes version is compatible with which React Native version.</li><li>Migrating to Hermes will give developers the best experience and help improve productivity.</li><li>Hermes improves React Native performance and helps with <strong>start-up time, memory usage, and bundle size</strong>. Hermes is an entirely different JavaScript engine. Sometimes, when you upgrade a project to Hermes, you need to upgrade other dependencies for compatibility.</li></ul><p>The use of Hermes is opt-in. Follow the instructions to enable it in your project.</p><p><strong>Enable Hermes</strong></p><blockquote><strong>Android</strong></blockquote><p>android/app/build.gradle</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bab873fa7ec6c03d1963b77835c53b98/href">https://medium.com/media/bab873fa7ec6c03d1963b77835c53b98/href</a></iframe><p>proguard-rules.pro</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc3c8c0d5585600c95c7e88f8fdf205d/href">https://medium.com/media/dc3c8c0d5585600c95c7e88f8fdf205d/href</a></iframe><p>If you’ve built your app at least once, clean the build</p><p>$ cd android &amp;&amp; ./gradlew clean</p><p>Now you are able to develop and deploy your app as usual</p><p>$ npx react-native run-android</p><blockquote><strong>iOS</strong></blockquote><p>Edit your ios/Podfile file and make the change illustrated below :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62e8481147a89d02f089c84517f9bb70/href">https://medium.com/media/62e8481147a89d02f089c84517f9bb70/href</a></iframe><p>Once you’ve configured it, you can install the Hermes pods with :</p><p>$ cd ios &amp;&amp; pod install</p><p>After that, you can run the app as usual :</p><p>$ npx react-native run-ios</p><h3>Highlights of 0.69</h3><ul><li><a href="https://github.com/facebook/react-native/commit/982ca30de079d7e80bd0b50365d58b9048fb628f">Deprecating support</a> for iOS/tvOS SDK 11.0, version 12.4+ is now required</li><li><a href="https://github.com/facebook/react-native/commit/c5babd993a2bed2994ecc4710fa9e424b3e6cfc2">Better support</a> for M1 users developing for Android</li><li><a href="https://github.com/facebook/react-native/commit/0480f56c5b5478b6ebe5ad88e347cad2810bfb17">Addition</a> of the new .xcode.env configuration file for more deterministically sourcing the node executable</li><li><a href="https://github.com/facebook/react-native/commit/50c8e973f067d4ef1fc3c2eddd360a0709828968">React Native now uses</a> the latest status bar API from Android 11</li><li><a href="https://github.com/facebook/react-native/commit/c2e4ae39b8a5c6534a3fa4dae4130166eda15169">Support for C++17</a></li><li><a href="https://github.com/facebook/react-native/commit/1a1a304ed2023d60547aef65b1a7bf56467edf08">New</a> hotkeysEnabled option in the iOS debug menu</li></ul><blockquote>React Native CLI has been bumped to a new major version of <a href="https://github.com/react-native-community/cli/releases/tag/v8.0.0">8.0</a> :</blockquote><ul><li>link and unlink commands have been removed in favor of autolinking</li><li>Deprecated initCompat has been removed, use init command instead</li><li>Removed deprecated run-android properties</li><li>Removed install and uninstall commands</li><li>Removed assets and hooks from react-native.config.js – you&#39;ll need to remove these properties from your config</li><li>podspecPath was removed from the iOS dependency config</li><li>Removed --project-path option from a run-ios</li><li>Changed iOS source directory detection from looking for an Xcode project to looking for a Podfile</li></ul><blockquote>Removed Support :</blockquote><ul><li>Support for console.disableYellowBox <a href="https://github.com/facebook/react-native/commit/b633cc130533f0731b2577123282c4530e4f0abe">has been dropped</a>.</li><li>Already deprecated prop types have been removed.</li><li>removeListener, deprecated since RN 0.65, <a href="https://github.com/facebook/react-native/commit/8dfbed786b40082a7a222e00dc0a621c0695697d">was removed</a> from Appearance</li><li>If you were using SegmentedComponentIOS, you’d now need to replace it with the third-party library, for example, <a href="https://github.com/react-native-segmented-control/segmented-control">segmented-control</a></li></ul><h3>Instructions for upgrading to React Native 0.69</h3><p>To update the version of React Native and related modules, update your package.json file and then run the usual package update commands (usually yarn, pod install, etc.). However, for RN 0.69, this is not enough.</p><p>For a better approach and to get lists of changes that need to be applied, you can check out the <a href="https://react-native-community.github.io/upgrade-helper/?from=0.68.2&amp;to=0.69.0">React Native upgrade tool</a>.</p><h3>Conclusion</h3><p>React Native 0.69 provides performance enhancement, less memory usage, and reduced start time. Before upgrading to 0.69, make sure to work on a different branch and have a backup of the code, as there are many open issues in the <a href="https://github.com/facebook/react-native/issues">GitHub</a>.</p><p>Hope this article has helped you learn something new today. 👏</p><p>Happy Learning :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0b17c53925c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/whats-new-in-react-native-0-69-c0b17c53925c">What’s New in React Native 0.69</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Testing in React Native using Jest]]></title>
            <link>https://medium.com/simform-engineering/unit-testing-in-react-native-using-jest-9a30bcaf75ef?source=rss-b480f9081563------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a30bcaf75ef</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[jest]]></category>
            <dc:creator><![CDATA[Aadil Halepotra]]></dc:creator>
            <pubDate>Tue, 28 Jun 2022 04:15:32 GMT</pubDate>
            <atom:updated>2024-08-30T12:12:20.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EK1POprzxbsdwwjBlV0r7Q.png" /></figure><p>We are humans, and humans make mistakes! Therefore, testing is essential in uncovering these mistakes and verifying your code.</p><ul><li>Test cases identify edge-case scenarios and ensure that your code continues to function as expected in these situations.</li><li>Testing ensures that your code continues to work in the future as you add new features or refactor the existing ones.</li></ul><p>Application testing is an important part of building applications, as it prevents regression and enables your code to perform effectively. Using Jest as a test runner is one way to accomplish this.</p><p>Jest had <a href="https://www.npmjs.com/package/jest">50m</a> downloads in the last month and was used on over <a href="https://github.com/facebook/jest/network/dependents">3,898,000</a> public repos on GitHub. Moreover, it is used extensively at renowned companies like Facebook, Instagram, Twitter, Spotify, Airbnb, and The New York Times.</p><h3>What Is Jest?</h3><p>Facebook has developed Jest — a popular test framework for JavaScript that provides delightful JavaScript testing.</p><p>Jest does not rely on any third-party tools for much of its functionality. Ease to set up, time-saving, and hassle-free are some of the advantages of Jest.</p><p>Jest has gained much popularity over recent years for both front-end and back-end testing.</p><h3>Getting started with Jest</h3><p>The official docs for starting with Jest can be found <a href="https://jestjs.io/docs/getting-started">here</a>. Now, let’s follow the instructions and create a new project along with a package.json file with the help of the npm command.</p><pre>npm init -y</pre><p>Install Jest as a dev dependency</p><pre>npm install --save-dev jest</pre><p>For TypeScript</p><pre>npm install --save-dev ts-jest</pre><h3><strong>Now, let’s start by writing your first test</strong></h3><p>Create a folder <strong>Multiply</strong> and two files <strong>multiply.js</strong> and <strong>multiply.test.js</strong> inside it.</p><p>Inside multiply.js, create one multiply function and export that function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45684e10a83407fed11e5942b543b30e/href">https://medium.com/media/45684e10a83407fed11e5942b543b30e/href</a></iframe><p>Next, we will create our test cases. So first, import the multiply function inside the multiply.test.js file.</p><h4>Jest: ‘describe’ and ‘it’ block</h4><p>describe breaks your test suite into components. Depending on your test strategy, you might have a describe for each function in your class user-facing functionality.</p><p>it is where you perform individual tests. You should be able to describe each test in a little sentence, such as it multiply 4*3 to equal 12.</p><p>Next, we have a describe block that is used to group common tests. We have two test cases with it blocks. Now, the it block has a test name first, and in a callback function, we have expect. Here, we are checking whether the multiply gives the correct result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c8c976f398f5916df30f537befc0e82/href">https://medium.com/media/2c8c976f398f5916df30f537befc0e82/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/943da6810723e8ed7b4090dd5de56891/href">https://medium.com/media/943da6810723e8ed7b4090dd5de56891/href</a></iframe><blockquote>Now change the script tag in package.json and add test: “jest”<em> into scripts for run jest test script.</em></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9148a958a143321d857a7fcfe581553f/href">https://medium.com/media/9148a958a143321d857a7fcfe581553f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6455d2524b68c7a8806ecba527c4d292/href">https://medium.com/media/6455d2524b68c7a8806ecba527c4d292/href</a></iframe><p>Now let’s run this command in the terminal to run test cases.</p><pre>npm test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPlCi1RWaz_HIR-Hl7SHtg.png" /></figure><p>Here, we can see all test cases passing. :)</p><p>Next, we will learn to test Asynchronous functions. So, create a new folder <strong>API </strong>and a file <strong>api.js</strong> inside it. Here, we are doing a simple API call with async-await to the JSON placeholder endpoint and get the data back.</p><p>For that, first, we need to install Axios for API calls.</p><pre>npm i axios</pre><p>With the help of this test API <a href="https://jsonplaceholder.typicode.com/posts/1">https://jsonplaceholder.typicode.com/posts/1</a>, we will get this JSON response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ze4OoYbVkCby1FWdHRk4Cw.png" /><figcaption>API response in JSON object</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4df72500be21882bbe02b1cc8b915ef0/href">https://medium.com/media/4df72500be21882bbe02b1cc8b915ef0/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84841fdd6fa9e8b35bee1283f188f5b/href">https://medium.com/media/c84841fdd6fa9e8b35bee1283f188f5b/href</a></iframe><ul><li>Now, to test our fetch posts function, we also need to do the API call in the <strong>api.test.js</strong> file.</li><li>Here, in the first test case for userId, we are again using async-await. After getting the result, we are using a simple<em>toBe </em>to test if the userId is 1.</li><li>In the next test, we are using the then block to do the API call. Here, after receiving the data, we are checking whether the title contains the string ‘aut facere<strong>’</strong>. It contains the string, which we can see from the screenshot in the previous section.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ba7d3f2249388259086c3b0134d7fa6/href">https://medium.com/media/0ba7d3f2249388259086c3b0134d7fa6/href</a></iframe><ul><li>In the API example, we also did a real API call in the test case. We generally mock the API call in a test case because we don’t want to be dependent on an external API that might not be completed or might have some errors. Also, for paid APIs, we can save the API call with the help of a mock API call.</li></ul><p>Create a folder <strong>Mock</strong> and add a file <strong>mock.js</strong> in it. Here, we are doing the same API call as earlier.</p><ul><li>Now, in the <strong>mock.test.js</strong> file in the same directory, we are using jest.spyOn() to mock the API call. Here, we can use a different object with our own values.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7b6c59af39849866dbf01b5d999c8a2/href">https://medium.com/media/c7b6c59af39849866dbf01b5d999c8a2/href</a></iframe><ul><li>Now, when we run this test case, everything passes. But we can also see the console log from the fetch.js file. Here, we are getting the data from our mock call, not the real data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmqZ-IRIrZsTFbLHq0YLRQ.png" /><figcaption>run mock.test.js output</figcaption></figure><p>Next, we will learn about an important concept of setup. So, create a new folder <strong>Setup</strong> and add a file <strong>setup.test.js</strong> in it.</p><p>Here, we have a color array. In the first test case, we are pushing a new color at the beginning and testing it.</p><p>In the second test, we are pushing a new color at the end and testing it.</p><p>In the last test, we are testing whether the array is of length 4.</p><p>When we run the test, the first two pass, however, the last one fails because the array length has been increased to 6 because of the two elements added by the two test cases before it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6397821b4b162fe87b7c48f68c4c409/href">https://medium.com/media/c6397821b4b162fe87b7c48f68c4c409/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*0yq-qyWDvGcHEJstCxuJvw.png" /></figure><p>This completes our small Jest tutorials!</p><h3>Conclusion</h3><p>To conclude, In this Jest tutorial, we’ve walked through the basics of the Jest framework. We’ve learned how to install the Jest framework and saw how it could be used for testing simple JavaScript files.</p><p>Hope this article has helped you learn something new today. If you’ve enjoyed reading this article, be sure to throw me a couple of claps!👏</p><p>Happy Learning :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a30bcaf75ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simform-engineering/unit-testing-in-react-native-using-jest-9a30bcaf75ef">Unit Testing in React Native using Jest</a> was originally published in <a href="https://medium.com/simform-engineering">Simform Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>