<?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 Chauksey Neha on Medium]]></title>
        <description><![CDATA[Stories by Chauksey Neha on Medium]]></description>
        <link>https://medium.com/@chauksey-neha?source=rss-e40b2d4ea5c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oe7zhRfK0cdI4fGs</url>
            <title>Stories by Chauksey Neha on Medium</title>
            <link>https://medium.com/@chauksey-neha?source=rss-e40b2d4ea5c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:10:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chauksey-neha/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[An observation to unit testing in jest]]></title>
            <link>https://chauksey-neha.medium.com/an-observation-to-unit-testing-in-jest-d28010c38389?source=rss-e40b2d4ea5c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d28010c38389</guid>
            <dc:creator><![CDATA[Chauksey Neha]]></dc:creator>
            <pubDate>Wed, 16 Dec 2020 08:16:14 GMT</pubDate>
            <atom:updated>2020-12-16T08:29:50.983Z</atom:updated>
            <content:encoded><![CDATA[<h3>An observation to unit testing in enzyme</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*0vYqNg5WfRhmN5ixaOPXBQ.png" /></figure><ul><li>Your tests should be more inclined to how the user interacts with the application, not necessarily to how the functionality was implemented. For example, avoid checking state changes, the user doesn’t know about that.</li><li>For best practice, avoid getting instances of the rendered container, the user does not interact with it, neither should your tests.</li><li>Always perform full renders, it gives you more confidence that these components actually work correctly in the real world.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d28010c38389" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Best Practices for]]></title>
            <link>https://chauksey-neha.medium.com/react-best-practices-for-ea4869c70090?source=rss-e40b2d4ea5c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea4869c70090</guid>
            <dc:creator><![CDATA[Chauksey Neha]]></dc:creator>
            <pubDate>Wed, 04 Nov 2020 08:35:11 GMT</pubDate>
            <atom:updated>2020-11-04T08:35:11.630Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Architecture Best Practices</h3><h4>Using the best code quality standards to organizing the folder structure for different teams, there are no limitations to what your best practices could be like. For some developers, giving meaningful names to your files could be the best practice, whereas, for others, it could be as simple as using the best libraries that optimize the workflow.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DydhcQ520XsifbCJ1Dm4Q.png" /></figure><h3><strong>#1. Don’t overthink the application structure and avoid using too many nested files and folders</strong></h3><p>When it comes to the folder structure, we feel ReactJs is very opinionated and gives you a lot of freedom to think and experiment. There’s no default way of managing the folder of your React application. Don’t worry much about the structure of your application upfront. Don’t try to predict how it’s going to grow and how you’ll want it structured down the road. Focus on what pattern emerges. Keep the file structure relatively flat to start with, avoid lots of nested folders. Less nesting means less “../../” in your imports. That way it is easy to adjust over time.</p><h3>#2. Stick with a structure that binds your whole team together when your application grows</h3><p>“Move files around until it feels right!” When you have a team of developers working on the same project, moving files here and there isn’t something you can afford. This is why it becomes imperative to stick to a folder structure that would eventually help your team stay organized as your application grows. For instance, you can group your files by feature instead of type.</p><h3>#3. Be mindful about naming conventions when your components grow in numbers</h3><p>Did you know Facebook’s codebase consists of over 30,000+ React components?</p><p>When you are working on a large, scalable React project, you’ll witness a surge in the number of components. Meaningful component names makes codebase searches effortless for your developers. One advice here can be files that are changed together should probably live together.</p><h3>#4. Keep Your Components Small</h3><p>React works on the components’ reusability principle. Try to maintain and write smaller components instead of putting everything into a single massive component. Small size components are easy to read, easy to update, easy to debug, maintain, and reuse. Now the question is how big a component should be? Take a look at your render method. If it has more than 10 lines your component is probably too big. Try to refactor the code and split the components into smaller ones. In React, a component should only be responsible for one functionality (single responsibility principle). You can create smaller and reusable components when you follow this principle. This way everyone can work easily on your application.</p><h3>#5. Don’t Use Indexes as a Key Prop</h3><p>A lot of developers use the index as a value for a key prop. Adding a key prop to the element is required when you create an array of JSX elements. This is commonly done when you use a map() or some other iterator or loop. This is another bad practice in React. React uses the key property to track each element in the array and due to the collapsing nature of an array. This can easily result in the wrong information being rendered in the wrong place. This is especially apparent when looping through class components with the state. <br> The key props are used for identification and it determines what should be rendered or re-rendered. React does not spend time rendering duplicates. So when you have two elements with the same keys React sees them as the same and this can cause some elements to be eliminated.</p><p>There can be many more advices for the best practices to follow. Will try to add more eventually.</p><p>References:</p><p><a href="https://buttercms.com/blog/front-end-developer-best-practices-to-design-react-ui-framework">https://buttercms.com/blog/front-end-developer-best-practices-to-design-react-ui-framework</a></p><p><a href="https://www.toptal.com/react/tips-and-practices">React.js Best Practices and Tips from React.js experts</a></p><p><a href="https://www.simform.com/react-architecture-best-practices/">https://www.simform.com/react-architecture-best-practices/</a></p><p><a href="https://www.geeksforgeeks.org/7-react-best-practices-every-web-developer-should-follow/">https://www.geeksforgeeks.org/7-react-best-practices-every-web-developer-should-follow/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea4869c70090" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>