<?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 Alec Mev on Medium]]></title>
        <description><![CDATA[Stories by Alec Mev on Medium]]></description>
        <link>https://medium.com/@alecmev?source=rss-da0a10e3fbbb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Co3XJE9v_QEOCZ8FTmM5hg.png</url>
            <title>Stories by Alec Mev on Medium</title>
            <link>https://medium.com/@alecmev?source=rss-da0a10e3fbbb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:41:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alecmev/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[String Refs, Can’t Live With ’Em, Can’t Live Without ‘Em]]></title>
            <link>https://medium.com/@alecmev/string-refs-cant-live-with-em-can-t-live-without-em-c706c343d7df?source=rss-da0a10e3fbbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c706c343d7df</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Alec Mev]]></dc:creator>
            <pubDate>Tue, 02 Aug 2016 10:15:58 GMT</pubDate>
            <atom:updated>2021-07-16T19:40:38.810Z</atom:updated>
            <content:encoded><![CDATA[<p>I won’t be getting into why string refs are marked as legacy in React. Here’s a nice <a href="https://news.ycombinator.com/item?id=12093234">TL;DR from Dan Abramov</a>, if you’re curious. Instead, I’ll just share how to start using <a href="https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute">callback-style refs</a>, without giving up the DRYness of strings, and <a href="https://facebook.github.io/react/docs/reusable-components.html#no-autobinding">not binding functions on every render</a>.</p><p>At first, I came up with this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb78ad6d382b3b544950e83d248e9994/href">https://medium.com/media/eb78ad6d382b3b544950e83d248e9994/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc2ff6f374b0dd9a6faa50a3e4360594/href">https://medium.com/media/fc2ff6f374b0dd9a6faa50a3e4360594/href</a></iframe><p>This works, and it’s pretty efficient, since it’s just one bind per component instance, but damn, it’s quite a hack (having to employ data attributes), and it’s twice the amount of props for no good reason.</p><p>Shortly after, I’ve stumbled into <a href="https://gist.github.com/developit/63e7a81a507c368f7fc0898076f64d8d">a Gist from Jason Miller</a>, the Preact creator, addressing the same annoyance in a bit more elegant way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e8c7a4ada2d70ef1b718c3e481475d4/href">https://medium.com/media/2e8c7a4ada2d70ef1b718c3e481475d4/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c3ea911cca8676c01f57c7216ba88ba/href">https://medium.com/media/8c3ea911cca8676c01f57c7216ba88ba/href</a></iframe><p>Props on this one, didn’t think of caching callbacks. This is a few more binds than my solution, but those are essentially negligible, and well worth the readability. Make sure to check out the Gist I’ve linked above if you don’t feel like extending the original Component.</p><p>I’m using <strong>this.r </strong>instead of <strong>this.refs</strong> as to distinguish between automatic string refs and explicitly-set refs, and to satisfy <a href="https://github.com/yannickcr/eslint-plugin-react/blob/21f684a738af7a6f2b1ec9517b5040162a750789/lib/rules/no-string-refs.js#L36"><strong>react/no-string-refs</strong></a> along the way.</p><p>And that’s it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c706c343d7df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tournament Platforms: Room for One More]]></title>
            <link>https://medium.com/auzom-entertainment/tournament-platforms-room-for-one-more-eb89184fc640?source=rss-da0a10e3fbbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb89184fc640</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[videogames]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[esport]]></category>
            <dc:creator><![CDATA[Alec Mev]]></dc:creator>
            <pubDate>Mon, 13 Jun 2016 20:04:37 GMT</pubDate>
            <atom:updated>2016-06-13T20:04:37.966Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sgb96jxwtsfW6TchlebqMw.jpeg" /></figure><p>If you’re a self-sufficient esports organizer and are in the market for a platform to power your tournament, you’ll find that there’s no shortage of free and well-made services, each offering a variety of bracket styles and levels of control over them. The competition is healthy, the tech is good, some have an API, some offer heavy customization, some are even ready to work out an exclusive tournament format and such in exchange for some <em>love</em>…</p><p>But none seem to care about the communication between and even inside communities, and none are interested in helping the organizers improve. They provide just enough to keep track of scores and get the info and news out there, and leave the rest up to the tournament admins. This “the rest” actually dwarfs the score-tracking part, and here at Auzom we believe that it’s what an open tournament platform should be focusing on, not brackets and standings tables. We aim to fuse the best of both worlds — closed loop giants like ESL and software-only services like Challonge — into a place where both demand and supply are in the reigns of the community, with the quality of service on par with the best commercial counterparts out there.</p><p>This is the second article about our vision, highlighting the now and the near future of Auzom. The first article, <a href="https://blog.auzom.gg/making-competitive-gaming-less-intimidating-ad4a53a7100d"><strong>Making competitive gaming less intimidating</strong></a>, covered our endgame instead, TL;DR of which is: Non-pro players that want something beyond match-making have a hard time finding a team that fits them, and non-pro teams have a hard time finding the right tournament / cup to participate in, and we’re committed to finding a fix for this major supply+demand mismatch, right after we have a polished platform to deploy it on.</p><p>The rest of this article is what we believe will differentiate us from the existing solutions the most. Our focus on these novel extras doesn’t mean that we won’t do our best to challenge and excel in what’s already a norm though. Advanced bracketing system, public API, team and user page customization, integration with games and third party services, all sorts of automation, statistics tracking, tournament exploration, you name it. Nothing is off the table for us.</p><h4>The social aspect</h4><p>Nowadays, communication is trivial. However, when it comes to online communities based around some organized activity they do, competitive gaming being of primary concern in our case, there’s <em>so much more</em> to it than just routing messages between individuals and letting people leave comments on public resources.</p><p>The social part is either completely overlooked in tournament platforms, or is so poorly implemented, that nobody would notice it being gone. Some have private messaging, some let you change your profile picture, some have a text field for your bio, and… social abilities end there. Well, we believe that this doesn’t cut it.* The ever so rapidly growing esports crowd deserves a long overdue tournament platform that incorporates the social component of the gaming communities out there, and we’re eager to finally deliver one.</p><p><em>* Why? Because competitive gaming has so much meta surrounding it! Specialized communication channels, date / time / map negotiation for </em><a href="http://www.urbandictionary.com/define.php?term=scrim"><em>scrims</em></a><em> and matches, “professional” networking, people / organization / team / tournament exploration in general, all sorts of social interaction inside and between communities, tournament-related discussions, the list goes on…</em></p><h4>Competition nourishment</h4><p>Another great issue, though less evident to the outer world, is that a lot of tournaments could be delivering a much better experience to both their participants and fans at very little extra expense, if any, and quite a few of them don’t know how or have no means to. If you, as a new organizer in town, know exactly what needs to be done to have all your bases covered, and you have the right people to involve and consult with — great! But that’s the top 1%, not everybody is so lucky / natural at this.</p><p>Say, you got yourself a nice unique concept for a recurring cup in a game you like. You have a few guys who would be fit to fill the admin crew, you’ve mapped out the timeframe and came up with the cup format, brackets’n’matches and all, and set it all up on some tournament platform. Got yourself a few social handles, even found a guy ready to cast some matches, and, well, it’s looking pretty solid by now, ready to go! But…</p><p>How do you advertise, reach your target audience, if you don’t have enough signups? How do you handle your social presence? How do you create the content and what are the standards? How do you develop a decent brand? Further in, how do you bulletproof your rules? How do you manage your admin crew and distribute tasks between each other? How do you handle disputes, insults, rule-breaking, force of nature situations, etc.? How do you setup your cast / stream, and make it enjoyable to watch? How do you take care of prizes, while abiding to the relevant laws in multiple countries? How do you get in touch with the game publisher / developer, if you want their support? How do you handle media exposure? How do you get sponsors? And taking it to whole other level, how do you “go offline”?</p><p>These hows are intentionally overwhelming, because it sure is overwhelming to even those who have gone through this before, not to mention rookies, and we’re here to help. Nourished or not, once a tournament meets a certain set of standards, and its organizers are willing to upgrade, we’ll be promoting its status to something like “endorsed by Auzom”, making it more visible and trustworthy to the players. This status can be lost, if the quality degrades.</p><h4>Why us?</h4><p>Short and simple: we’re building Auzom for ourselves. We all have a past in competitive, we’ve organized several tournaments and many online events, have built and managed several strong communities, had plenty of obstacles to overcome, and are finally ready to apply our knowledge and talents to making life easy for gamers and organizers alike.</p><h4>Where are we?</h4><p>Now, we’re at a tipping point. We’ve made enough progress to see that our concept is worth pursuing:</p><ul><li>We’ve successfully nourished an 8v8 tournament over the course of one year, bringing the participation to whopping 54 teams, 700+ players</li><li>We’ve emulated the social part with an <a href="https://slack.bcl.online/">active Slack team</a>, with 300+ members and 88K+ messages accumulated over one year</li><li>We’ve invested over 1200 hours of design and code into our ambitious tournament platform, and it’s going <a href="https://auzom.gg/">very</a> <a href="https://auzom.gg/battlefield-4/conquest-league/summer-cup-2016">well</a> <a href="https://auzom.gg/battlefield-4/conquest-league/season-8/overview/playoffs/minor">so</a> <a href="https://auzom.gg/battlefield-4/conquest-league/season-8/overview/playoffs/minor/matches/194">far</a></li></ul><p>And we need help getting things going faster.</p><p>First and foremost, we need a <strong>second tech co-founder</strong>. Most of our aspirations lie in the software part of our project, and even though the groundwork is solid, if I remain being the only architect <em>slash</em> designer <em>slash</em> developer <em>slash</em> sysadmin, we won’t achieve anything remotely profitable for at least another year. In addition to that, working in duo takes the quality of the decisions and the final result to whole other special level, unreachable in solo. If our endeavor intrigues you, and you want to jump right in, please, <a href="/service/mailto:olegs@jeremejevs.com">do get in touch</a>! Let’s talk about it, including the monetary question.</p><p>However, since we’re bootstrapped, any <strong>financial support </strong>beyond ice cream money would go a really long way, and we would never refuse <strong>business mentorship </strong>either. In other words, we could use an angel :)</p><p><em>Have an auzom day!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb89184fc640" width="1" height="1" alt=""><hr><p><a href="https://medium.com/auzom-entertainment/tournament-platforms-room-for-one-more-eb89184fc640">Tournament Platforms: Room for One More</a> was originally published in <a href="https://medium.com/auzom-entertainment">Auzom</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Competitive Gaming Less Intimidating]]></title>
            <link>https://medium.com/auzom-entertainment/making-competitive-gaming-less-intimidating-ad4a53a7100d?source=rss-da0a10e3fbbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad4a53a7100d</guid>
            <category><![CDATA[videogames]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[esport]]></category>
            <dc:creator><![CDATA[Alec Mev]]></dc:creator>
            <pubDate>Tue, 17 May 2016 12:04:32 GMT</pubDate>
            <atom:updated>2016-06-13T20:19:42.878Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ssFzyzXs0EPuoJrRvTq-SQ.png" /><figcaption>“Mission Accomplished” by Berduu</figcaption></figure><p>Here at Auzom we are convinced that not everybody who could be playing competitively is doing so. In fact, we think there are more of those being hesitant about getting into electronic sports than those who go through. The industry is so focused on catering to the elite and selling the show, following best practices of the physical sports world, that they end up completely disregarding the semi-casuals, the type of players that simply doesn’t exist in the conventional sports.</p><p>And they… pardon, <strong>we</strong> have a plan. But let me explain what’s wrong first.</p><h4>The today</h4><p>Most top team-based multiplayer computer games offer match-making, where all you have to do to get a match is click a big <strong>PLAY</strong> button and wait a minute or two for the lobby to form. You’ll find that more often than not these matches end up being fun and balanced, and satisfy a wide range of needs, like getting an adrenaline rush from the competition, improving your skills or having a good time with your friends. This is the bread and butter of an increasing amount of games, due to, among several other reasons, more and more people gaining internet access, and internet quality improving overall, giving them a fair chance to compete with other humans.</p><p>Those that excel at whatever game they’re playing and have the desire to do something with their abilities usually have no trouble being identified by existing competitive teams or forming new ones with the people they meet over time. Once you‘re in, it’s relatively smooth sailing from there on: numerous organizations, including game publishers themselves, offer all sorts of ladders, cups and tournaments, with a nice gradient of rewards, ranging from mere badges and titles to million-dollar-large prize pools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IsWNqAthO61ZbeXZ-AVb7A.jpeg" /><figcaption>“The Great Escape” by Berduu</figcaption></figure><h4>The team problem</h4><p>It might seem to the naked eye that there’s nothing wrong with the current state of things: those craving for a challenge find their ways to spice up their gaming experience, and those who don’t just keep playing match-making. However, nothing in this world is black&amp;white, and this situation is no exception:</p><ul><li>There’s a good share of players in the match-making camp who would love to be in a tightly-knit team, which is an essential human need, the priceless sense of belonging and being proud of it.</li><li>And there’s also a smaller (but non-negligible) share of competitive players who would prefer to tone down their time&amp;effort commitment, without becoming a mere backup or getting benched until further notice, and rather join a collective with similar aspirations instead.</li></ul><p>These “middle ground” teams do exist, but they’re very sparse, and you need to be very lucky to even know a guy who knows a guy who could get you into one. In the reality, those who don’t fit into neither of the worlds, are likely to end up losing their interest in the game much sooner than they would if they were satisfied, which doesn’t benefit anybody.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXiYoRll12k5HIouoCWu2Q.png" /><figcaption>“Covering Fire!” by unknown author</figcaption></figure><h4>The competition problem</h4><p>But even if the team problem were to go away, the players would then find themselves stuck in the crazy universe of cups and ladders, scattered all over the internet. There’s nothing wrong with any one of them per se, but the immense fragmentation and the non-existent discoverability are making it quite a feat to find the right competition to take part in (if there is such in the first place), just like it takes a lot of effort and even luck to find the right team. The issue is especially apparent in niche / mildly popular games, where you have multiple esoteric game modes and battles that involve more than single digit amounts of players per team.</p><p>We are under no illusion here. We don’t expect every organizer out there to agree on the single best tournament platform / discovery service, and remain there forever. That’s a utopia, a pretty fat one. More so, the diversity and the absence of a monopoly are key to a healthy ecosystem.</p><p>However, what’s missing (and is perfectly viable) is a place where any team of any skill level can find something that fits them in a matter of <strong>seconds</strong>, taking as much effort to get in as it takes to gather your friends and press the <strong>PLAY</strong> button in a match-making system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIJs2CjQcnayqUFGy6UD0A.png" /><figcaption>“Far From Here” by Berduu</figcaption></figure><h4>The plan</h4><p>These problems aren’t easy to identify, since nobody complains about them directly; players choose to blame the obvious targets instead, like the game or the community, or just deal with it and keep doing what they were doing. But once you see the outlines, they cannot be unseen.</p><p>The solution is self-evident: we need a tournament platform with a wide variety of competitions and an integrated team-maker, which is essentially a long-term version of a match-maker.</p><p>And we’re building it.</p><p>Even though team-making is the highlight of this article, the already existing teams are still very much a target for us, and since team-making can’t exist on its own, we’ve started with the tournament part of the equation.</p><p>Auzom has no interest in running all the competitions ourselves, for multiple reasons, the main one being that such approach doesn’t scale (or, more accurately, doesn’t scale fast enough). What we intend on doing instead is making our platform powerful and user-friendly enough to start attracting community-based organizations. “Duh, you aren’t the first”, one might say, but what sets us apart from the likes of Challonge or Battlefy is our tournament nourishing programme. We have both the expertise and the manpower to help the people who choose to host with us upgrade the quality of their projects to a globally competitive level, if desired. That includes branding refinement, increase of social presence, improvement of the tournament rules and structure, stream setup, casting guidance, and more. We’ve been learning and practicing this for years in the Battlefield scene, and we’re ready to share our knowledge now.</p><p>Prime example of a tournament we’ve nourished is <a href="https://auzom.gg/battlefield-4/conquest-league">Battlefield Conquest League</a>, best known for being the largest Battlefield league in Europe (and arguably in the whole world), and praised for its unique division-based structure, which fits very nicely with our idea of having something for teams of any skill level. BCL used to have no real presence on social media, Twitch, YouTube, and was still called <a href="http://www.nordicleague.se/">Nordic League</a> while being open to all European countries. This made BCL something only a small part of the Battlefield community knew about, and not really accessible to newcomers. Through our guidance and support BCL has flourished into a growing tournament that attracts new players / teams, has a strong relationship with the game publisher, has several sponsors contributing to the prize pool and has greatly surpassed competing tournaments in both exposure and player base size.</p><p>Once we’re at a point where we can host multiple tournaments for various games and platforms comfortably, and they can go about their business in a completely autonomous way, we’ll move on to solving the team problem. And while we’re at it, we’ll also be making user experience more enjoyable, by introducing some user-level customization, letting teams present themselves better with configurable team pages, and introducing multiple organization types besides just teams, like multi-team brands and sponsors.</p><p>And once we’ve made progress on the team front, we can get to the monetization. Which is quite an overwhelming topic, actually, since we’re offering so much! But, fortunately, we have a consensus on not willing to build a paywall, so the options get narrowed down to premium support features for organizers, customization / entry fees / betting / merchandise / subtle advertisement for the players and, later on, data crunching.</p><p>And as to our progress… <a href="https://auzom.gg/"><strong>real thing</strong></a> = 1K pictures = 1M words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MkySYQdUl9yp0w22GKNlZg.jpeg" /><figcaption>“King of the Hill” by Berduu</figcaption></figure><h4>The needs</h4><p>But, coming back to earth, we’re in a bit of a pickle. We’re too tech-heavy to be able to implement all our ideas in a sensible amount of time with only one developer behind the scenes, that <a href="http://blog.codinghorror.com/in-programming-one-is-the-loneliest-number/">“lonely one”</a> being myself. And as if that wasn’t jolly enough, I’m also doing a part-time to pay my and Auzom’s bills, which doesn’t get us closer to our goals. So this brings us to one of the main reasons for writing all this:</p><p><strong>We are looking for a second technical co-founder</strong></p><p>Given that I’ve pretty much publicly outlined our business plan in this article (which I don’t mind doing, since it’s all about the execution on this one, not the idea, and we’re the only ones with the deep understanding of what we’re making), it’s no step up to share our capitalization table, which is 30 + 30 + 30 + 10 (yes, we’re four co-founders, all justified), and to also say that we’re ready to offer 20 vested shares (and our eternal moral support), all negotiable.</p><p>Yes, no salary, how typical… but to clarify, I‘m not looking for an intern / a volunteer. In fact, I’ll refuse to work with somebody willing to do our chores for free, regardless of their motives. Instead, I want a person who would treat Auzom as if he was with us from day one (we’re ready to treat you like our long-time partner in return), and would have strong opinions not just about the software decisions we make, but about the business part too, and have the confidence to challenge our past choices. A true entrepreneur.</p><p>I’ll publish a short overview of our stack sometime soon, but until then:</p><ul><li>Go in the backend, minimalist framework on top of <a href="https://github.com/zenazn/goji">Goji</a>, dockerized, hosted in Amazon, a load-balanced API and a worker</li><li>Postgres for data storage, managed by <a href="https://www.compose.io/postgresql/">Compose</a>, hosted in Amazon</li><li>ES7 in the frontend, 100% React, with Redux, <a href="https://medium.com/@jeremejevs/react-suit-css-429cc4269885">styled with Sass</a>, served from Amazon, cached by CloudFlare</li></ul><p>Your background absolutely doesn’t matter to me, as long as you aren’t disgusted with Go / JavaScript / imperative languages in general / Postgres / something else from the list above for some odd reason. You just need to be ambitious and be convinced that you have what it takes to be useful in all aspects of a complicated product like ours, which are self-evident qualities if you aren’t wrong about yourself. Web development doesn’t even have to be your “thing”, it isn’t mine either. Also, I’m not attached to any single part of the stack. For example, I like Go, but I’m open to gradually migrating elsewhere if you can convince me that it’s worth it (e.g. I’d love some GraphQL, and that’s essentially a no go in Go at the moment, pun intended).</p><p><strong>And, of course, we’d be very glad to find an angel</strong></p><p>It’s the best feeling in the morning, when you wake up wanting to work on X, and… you actually can! Instead of wasting your energy and creativity on something that you aren’t personally invested into.</p><p><strong>Reach us via </strong><a href="/service/mailto:support@auzom.gg"><strong>support@auzom.gg</strong></a><strong> or </strong><a href="https://blog.auzom.gg/"><strong>any other means listed in our blog</strong></a><strong>,</strong> and if you like the pictures in this article, make sure to check out <a href="https://twitter.com/Berduu">Berduu</a>!</p><p><em>Have an auzom day!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad4a53a7100d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/auzom-entertainment/making-competitive-gaming-less-intimidating-ad4a53a7100d">Making Competitive Gaming Less Intimidating</a> was originally published in <a href="https://medium.com/auzom-entertainment">Auzom</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React + SUIT CSS = ❤]]></title>
            <link>https://medium.com/@alecmev/react-suit-css-429cc4269885?source=rss-da0a10e3fbbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/429cc4269885</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Alec Mev]]></dc:creator>
            <pubDate>Tue, 25 Aug 2015 19:21:56 GMT</pubDate>
            <atom:updated>2016-04-08T08:26:24.683Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p><a href="https://speakerdeck.com/vjeux/react-css-in-js">Inline styling is the future</a>, but that future isn’t production-ready yet [citation needed], even with fancy libraries, like <a href="http://projects.formidablelabs.com/radium/">Radium</a>. Before it is, we have to deal with making React and CSS get along, with CSS being essentially a bunch of global variables.</p><p>Best (only?) way to avoid name clashing / conflicts is to use a naming convention. For CSS, there are dozens of them out there, but most of the differences are aesthetic, so I decided to go with the most trendy / popular one — <a href="https://suitcss.github.io/">SUIT CSS</a>, a tiny bit better-looking version of <a href="https://css-tricks.com/bem-101/">BEM</a>.</p><p>Now that we’ve got ourselves a convention, it might seem like it’s all fine and dandy… until it isn’t:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/64525f2638994c7d2d83520ceca0cf39/href">https://medium.com/media/64525f2638994c7d2d83520ceca0cf39/href</a></iframe><p>Don’t know about you, but this is way too <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">WET</a> to my liking. Not to mention how verbose this could become, if we were to add some modifiers / states.</p><p>Fortunately, React + SUIT isn’t a rare combo, so there are modules for this exact situation, at very least <a href="https://github.com/acdlite/react-suitcss">react-suitcss</a> and <a href="https://github.com/brentertz/react-suitcssify">react-suitcssify</a>.</p><p>Unfortunately, they both fall short in some aspects.</p><p><em>React-suitcss</em> can be applied only to the root component (e.g. the <em>&lt;div className=’Checkbox’&gt;</em> in the snippet above), completely ignoring descendants.</p><p><em>React-suitcssify</em> is a classic case of “close but no cigar”, having no ability of <em>not</em> inheriting the classes passed to it from the parent component, even if it’s a descendant (e.g. <em>&lt;Checkbox className=’addSomePadding’ /&gt;</em> would end up applying <em>addSomePadding</em> even to <em>&lt;div className=’Checkbox-label’&gt;</em>, which likely isn’t the desired output).</p><p>Silver lining, though, is that the solution is so simple (heavily inspired by <em>react-suitcssify</em>, but leaner), that it doesn’t even warrant a whole new dependency. Just extend the Component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8e6ce4dd7b404a966ab176039ce85fa/href">https://medium.com/media/f8e6ce4dd7b404a966ab176039ce85fa/href</a></iframe><p>And then use it in place of the original:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1601075c8b9acfff18eefbc5f190dcb/href">https://medium.com/media/a1601075c8b9acfff18eefbc5f190dcb/href</a></iframe><p>So if you were to render <em>&lt;Checkbox className=’addSomePadding’ /&gt;</em>, it would look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a21fc5d85b59d3e12dd332ed85cdc78c/href">https://medium.com/media/a21fc5d85b59d3e12dd332ed85cdc78c/href</a></iframe><p>Hope this helps somebody.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=429cc4269885" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>