<?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 acidSupreme on Medium]]></title>
        <description><![CDATA[Stories by acidSupreme on Medium]]></description>
        <link>https://medium.com/@acidSupreme?source=rss-5a3063e4da13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*og_MK94VoICyBpcK.jpeg</url>
            <title>Stories by acidSupreme on Medium</title>
            <link>https://medium.com/@acidSupreme?source=rss-5a3063e4da13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:36:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@acidSupreme/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[Mastering Higher-Order Components in React JS: A Comprehensive Guide ]]></title>
            <link>https://medium.com/@acidSupreme/mastering-higher-order-components-in-react-js-a-comprehensive-guide-40060c42b161?source=rss-5a3063e4da13------2</link>
            <guid isPermaLink="false">https://medium.com/p/40060c42b161</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[acidSupreme]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 16:39:16 GMT</pubDate>
            <atom:updated>2023-04-01T16:39:16.194Z</atom:updated>
            <content:encoded><![CDATA[<p>What’s up, React developers? Ready to level up your React game and make your code more reusable, modular, and just plain <em>cool</em>? Then buckle up, because today we’re diving into the wonderful world of <strong>Higher-Order Components (HOCs)</strong> in React JS. If you’ve been craving some code sorcery, you’re in the right place!</p><p><em>Prerequisites: A basic understanding of React, its components, and some familiarity with ES6 JavaScript.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*CdGOlRLFeSpHDe6M.gif" /></figure><h3>1. React Component Basics 🏁</h3><p>Before we jump into HOCs, let’s do a quick recap of React components. Remember, React is all about breaking our UI into smaller, reusable chunks called <em>components</em>. We have two types of components:</p><ul><li>Functional components: Simple, stateless, and all about that <strong>function</strong> life.</li><li>Class components: A bit more complex, stateful, and rocking the <strong>class</strong> keyword.</li></ul><p>And let’s not forget our friends <strong>state</strong> and <strong>props</strong>, which help us manage data within and across our components.</p><h3>2. Understanding Higher-Order Components (HOCs) 🧙‍♂️</h3><p>Enough chit-chat, let’s get down to business. Higher-Order Components (or HOCs, as cool kids call them) are basically functions that take a component and return a new, enhanced version of that component. It’s like getting a superhero upgrade! 🦸‍♀️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*xFRQbqLU2KCQWRuz.gif" /></figure><p>HOCs offer some sweet benefits:</p><ul><li>Code reuse: Because who wants to copy-paste code like it’s 1999?</li><li>Separation of concerns: Keepin’ it clean, focused, and modular.</li><li>Prop manipulation: Adding or modifying props like a boss.</li></ul><p>And just in case you’re wondering how HOCs stack up against other React patterns, they’re kinda like cousins to Render Props and Hooks. They all get along, but they have their own unique superpowers.</p><h3>3. Creating a Simple Higher-Order Component 🔧</h3><p>Let’s create our very own HOC, shall we? Picture this: We have a bunch of components that display text, but we want to give them all the same fancy style. Instead of repeating ourselves, we’ll use a HOC to make our components fabulous in a snap. 💅</p><p>Here’s the magic recipe:</p><pre>const withFancyText = (WrappedComponent) =&gt; {<br>  return (props) =&gt; {<br>    const fancyStyle = { fontStyle: &quot;italic&quot;, fontWeight: &quot;bold&quot; };<br>    return (<br>      &lt;div style={fancyStyle}&gt;<br>        &lt;WrappedComponent {...props} /&gt;<br>      &lt;/div&gt;<br>    );<br>  };<br>};</pre><p>Let’s break it down:</p><ol><li><strong>withFancyText</strong> is our HOC function. It takes a <strong>WrappedComponent</strong> as an argument.</li><li>We create a new functional component with some fancy styling.</li><li>We render the <strong>WrappedComponent</strong> inside our fancy <strong>div</strong>, passing along all the original props using the <strong>{...props}</strong> syntax. Voilà!</li></ol><p>Now, we can use our HOC to enhance any text component:</p><pre>const TextComponent = (props) =&gt; &lt;p&gt;{props.text}&lt;/p&gt;;<br>const FancyTextComponent = withFancyText(TextComponent);</pre><p>Boom! Our <strong>FancyTextComponent</strong> is now an italic, bold version of <strong>TextComponent</strong>. Talk about a glow-up! ✨</p><h3>4. Common Use Cases for Higher-Order Components 🎯</h3><p>You might be thinking, “That’s cool, but what else can HOCs do for me?” Well, my friend, HOCs are like the Swiss Army knife of React components, with a tool for nearly every situation! The possibilities are virtually endless! 🇨🇭🔪</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*SqJ1IPO62LGbyFF0.gif" /></figure><p>Here are some real-life scenarios where HOCs shine:</p><ul><li><strong>Authentication and Authorization</strong>: Control access to certain parts of your app based on user roles or permissions. HOCs can be your bouncer, keeping unwanted guests out of the VIP area. 🚧</li><li><strong>Data fetching and state management</strong>: Centralize data-fetching logic and manage component state like a pro. HOCs are like your personal assistant, handling all the data-related chores for you. 📚</li><li><strong>Error handling and logging</strong>: Keep your app running smoothly by catching and handling errors gracefully. HOCs are like your app’s superhero sidekick, saving the day when things go wrong. 🦸‍♂️</li><li><strong>Analytics and performance tracking</strong>: Monitor user interactions and app performance with ease. HOCs can be your app’s private investigator, tracking down all the juicy details. 🕵️‍♀️</li><li><strong>Theming and styling</strong>: Apply consistent theming or styling across your components without repeating yourself. HOCs are like your app’s personal stylist, making sure everything is on fleek. 💃</li></ul><h3>5. Best Practices for Using Higher-Order Components 🏆</h3><p>Ready to start using HOCs like a boss? Keep these best practices in mind:</p><ul><li><strong>Naming conventions</strong>: Use the <strong>with</strong> prefix to make your HOCs easily recognizable, like <strong>withAuth</strong> or <strong>withErrorHandler</strong>.</li><li><strong>Maximizing HOC composability</strong>: HOCs can be combined to create even more powerful components. It’s like building a React Voltron! 🤖</li><li><strong>Avoiding prop name collisions</strong>: Be mindful of prop names when using multiple HOCs to avoid overwriting important data. Communication is key! 🗣️</li><li><strong>Stateless HOCs and pure components</strong>: Keep your HOCs stateless and pure for maximum reusability and performance. Less baggage, more fun! 🎒</li><li><strong>Ref forwarding</strong>: If you need access to the wrapped component’s instance, use React’s <strong>forwardRef</strong> to pass refs through your HOCs. No more broken chains! 🔗</li></ul><h3>6. Debugging Higher-Order Components 🐛</h3><p>Even the best developers encounter bugs, but fear not! Here are some tips for debugging HOCs:</p><ul><li><strong>Identifying common issues and pitfalls</strong>: Keep an eye out for prop collisions, missing or incorrect prop types, and improper use of refs.</li><li><strong>Using React Developer Tools</strong>: Inspect HOCs like a pro by using the React DevTools browser extension. It’s like having x-ray vision for your components! 👓</li><li><strong>Unit testing HOCs with Jest and Enzyme</strong>: Write tests to ensure your HOCs are working as expected. Trust but verify, my friend. 🧪</li></ul><h3>7. Integrating HOCs with Other React Patterns 🧩</h3><p>HOCs can play nice with other React patterns too! Here’s how:</p><ul><li><strong>Combining HOCs with Context API</strong>: Use HOCs to consume context values and pass them as props. It’s like your HOCs are getting VIP access to all the cool data! 🎫</li><li><strong>Utilizing HOCs alongside Render Props</strong>: Mix and match HOCs and Render Props to get the best of both worlds. It’s like having a React toolbox full of awesome gadgets. 🔧</li><li><strong>Integrating HOCs with React Hooks</strong>: While Hooks are great, sometimes you still need HOCs. Combine them to build a truly flexible and powerful app. It’s like having the ultimate React super team! 🦸‍♀️🦸‍</li></ul><h3>Conclusion 🎉</h3><p>Well, that’s a wrap, folks! We’ve covered the basics of Higher-Order Components, created our very own HOC, and explored some common use cases and best practices. Now, it’s time for you to go forth and enhance your React components like never before! Remember, with great power comes great responsibility, so use your newfound HOC skills wisely. 😉</p><p>To infinity and beyond! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*7aOJHbnq3jey_26f.gif" /></figure><h3>References and Further Reading 📚</h3><p>Ready to dive even deeper into HOCs? Here’s a list of resources to get you started:</p><ul><li><a href="https://reactjs.org/docs/higher-order-components.html"><strong>Official React documentation on Higher-Order Components</strong></a></li><li><a href="https://www.smashingmagazine.com/2020/06/higher-order-components-react/"><strong>Higher-Order Components In React</strong></a></li><li><a href="https://www.robinwieruch.de/react-higher-order-components/"><strong>React Higher-Order Components (HOCs)</strong></a></li></ul><h3>Follow Me on Twitter 🐦</h3><p>If you enjoyed this guide and want more tips, tricks, and insights on React, web development, or just some good ol’ geeky humor, be sure to follow me on Twitter: <a href="https://twitter.com/acidSupreme"><strong>@acidsupreme</strong></a>. Let’s connect, share ideas, and level up our coding game together! 🎉👩‍💻👨‍💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40060c42b161" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2 Simple Method That Instagram and Snapchat Make Their Cash]]></title>
            <link>https://medium.com/@acidSupreme/2-simple-method-that-instagram-and-snapchat-make-their-cash-4392f606500c?source=rss-5a3063e4da13------2</link>
            <guid isPermaLink="false">https://medium.com/p/4392f606500c</guid>
            <category><![CDATA[snapchat]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[instagram]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[internet-marketing]]></category>
            <dc:creator><![CDATA[acidSupreme]]></dc:creator>
            <pubDate>Fri, 05 Aug 2016 05:01:28 GMT</pubDate>
            <atom:updated>2016-08-05T05:01:28.636Z</atom:updated>
            <content:encoded><![CDATA[<p>How do <a href="https://www.instagram.com/acidsupreme/">Instagram</a> and snapchat make their money you might ask yourself.</p><p>Before we address that let’s take a quick look on how they started.</p><p>A dude by the name of Kevin System learned code at night and built a prototype app. He share it with a friend by the name of Mike Krueger and bumped into some investors and somehow convinced them to “fund” their idea.</p><p>Pretty much betting on a start up company if they can success or not. Meaning if they can make some money in return for their investment.</p><p>Did some more refining of the idea and a name changed to what we all know by now as Instagram and in a few hours after launch, it became the #1 photo app. Over time it kept growing until it became a fixture in social media apps. Now with millions of active users you open the revenue doors for businesses to come in and pay you to help promote their product or service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NipMRcsditEztC71FoCl6A.png" /></figure><p><strong>POW that’s how Instagram and Snapchat make their cash. They convince investors in funding their app until they figure out how to sell advertising space to businesses to promote their brands.</strong></p><p>But the way they incorporate the advertising makes it feel like it blends right in with the existing app and it’s ecosystem without having it stick out like a sore thumb.</p><p>Adds an human touch to ads and it feels less invasive and way more personal and natural. They even go a step forward and place ads where it would most likely to work, sparing all of us from ads that feels out of place and seems stupid.</p><p>Yea Kinobody ads on Youtube I’m talking to you! But I’ll digress.</p><p>This is what Instagram and Snapchat do. They sell advertising space.</p><p>Yea ain’t shit changed. It’s not that much different from Mad Men but instead of selling ads on print or TV it moved to Instagram and Snapchat. Same concept just different ways to apply that concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jIOkwIQpzQeAPnIblo-8zQ.jpeg" /><figcaption>back when Hershey’s was only 10cents. *sigh* definitely born in the wrong time.</figcaption></figure><p>Human attention has shifted away from TV and radio and set on our phones. It’s an extension of ourselves.</p><p>Sooner or later VR would be more easily accessible and people start creating incredible things with it. It would change the landscape of media once again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4392f606500c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Side Hustle Ideas You Can Start Today!]]></title>
            <link>https://medium.com/@acidSupreme/10-side-hustle-ideas-you-can-start-today-2946d39f3525?source=rss-5a3063e4da13------2</link>
            <guid isPermaLink="false">https://medium.com/p/2946d39f3525</guid>
            <category><![CDATA[hustle]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[make-money-online]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[acidSupreme]]></dc:creator>
            <pubDate>Tue, 02 Aug 2016 02:02:38 GMT</pubDate>
            <atom:updated>2016-08-02T02:02:38.611Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*UzZwsnQSP2xIAkWv-1OUiQ.jpeg" /></figure><p>You are ready to start making that extra cash on the side but you’re stuck on where to start. Well, don’t worry, I got you covered. There’s a list of 10 side hustles you can start today, look through it and see if you there’s anything that sparks your interest.</p><p>Before you get started, a few things to note. When creating this list, I had 3 criteria that I wanted to follow closely.</p><p><strong>The first criteria:</strong> the side businesses were actually feasible and made logical sense. While doing some researching on this topic, I found a lot of side businesses that were just ridiculous and in my mind weren’t doable for most people.</p><p><strong>The second criteria:</strong> the side businesses were low cost. A business that costs $25,000 to open, is not low cost in my mind and is not a <em>‘side hustle’</em>. Side hustles have to be low enough in start-up costs so that almost anyone can pursue them.</p><p><strong>The third criteria:</strong> the businesses has to be <em>‘home based’</em>. By my own definition a side business is a business you can operate out of your home or vehicle and doesn’t require a store location to run.</p><p>So what did I find? Well, I was surprised to find that there as many side business ideas as the mind can create, but here is just a few… (Well, 10 to be exact…)</p><p><strong>1. Blogging.</strong> Blogging is difficult to monetize but can be a fun outlet to practice your writing or build an audience around a particular idea. The other huge advantage of blogging is that it helps you build your brand. So regardless of whether you take it on as a side hustle or not, I highly encourage you to run you own blog that’s all about you and what you do. It will be a great centralized place for your audience to connect with you directly.</p><p><strong>2. Building Niche Websites.</strong> Building niche sites is a popular side hustle because after some initial research and time investment they can be a relatively hands-off income source. I’m an expert in this field and I’m happy to welcome any questions regarding this subject.</p><p><strong>3. Computer Repair Service.</strong> There are more computers in this country (including tablets and smartphones) than there are people. The repair market is very fragmented which means there is opportunity for solo-operators to break in.</p><p><strong>4. Consulting / Coaching.</strong> Consulting is an ambiguously broad field, but there are consultants for practically every area of expertise. What are you a relative expert in that others might pay for your advice? This is definitely an area we’ll explore in more detail later.</p><p><strong>5. Craigslist Arbitrage.</strong> Craigslist and other markets are still filled with inefficiencies that a trained eye can exploit for profit. There are some great stories of regular people doing just this. For instance, Ryan Finlay of <a href="http://recraigslist.com/"><strong>ReCraigslist.com</strong></a>, makes a full-time living buying and selling on Craigslist.</p><p><strong>6. Dropshipping.</strong> Dropshippers set up their own storefront and process sales, but never touch the actual product. Instead, the items are shipped directly to the customer from the manufacturer or wholesaler. I’ve worked in a company that made millions (yes, crazy right?) as a dropshipper. We never actually had any stocked products, except a few very popular items. It was mind-blowing!</p><p><strong>7. Ghostwriting.</strong> With millions of websites all competing for attention, writing is a service that’s constantly in demand. Someone’s got to create all that content, right?</p><p>You can start out on your own, or on one of several established ghostwriting platforms like<a href="http://thecontentauthority.com/"><strong>The Content Authority</strong></a>, <a href="http://scripted.com/"><strong>Scripted</strong></a>, or <a href="http://www.textbroker.com/"><strong>TextBroker</strong></a>.</p><p><strong>8. Photography Service.</strong> Professional cameras today as quite affordable. You can easily turn your photography hobby into an income stream.</p><p><strong>9. Selling on Amazo</strong>n. Have you always wanted to write a book? Well now you can, and you can get it published for free on the world’s #1 bookstore! I’ve been experimenting with publishing on the Kindle platform myself, and have a couple titles out so far.</p><p><strong>10. Teaching on Udemy.</strong> <a href="http://udemy.com/"><strong>Udemy</strong></a><strong> </strong>is an impressive online education platform where students can connect with teachers from all around the world in any subject. You can create your own course around a topic you’re an expert in and set your own tuition rate.</p><p><strong>Go ahead, get started!</strong></p><p><strong>Luis</strong></p><p><strong>P.S.</strong></p><p>If you’re in the process of creating your side hustle, I’d love to hear about your experience. I hope what I share here will get you closer to your goals in life.</p><p>I’m here to learn from others and give back by sharing the little that I know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2946d39f3525" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>