<?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 Alex Tatarinov on Medium]]></title>
        <description><![CDATA[Stories by Alex Tatarinov on Medium]]></description>
        <link>https://medium.com/@tatarinov.alexander?source=rss-3313b56829a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WdWoID7-CqvaY98l.</url>
            <title>Stories by Alex Tatarinov on Medium</title>
            <link>https://medium.com/@tatarinov.alexander?source=rss-3313b56829a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:50:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tatarinov.alexander/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[How to Use Emoji in React?]]></title>
            <link>https://medium.com/@tatarinov.alexander/how-to-use-emoji-in-react-813810d4fbe4?source=rss-3313b56829a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/813810d4fbe4</guid>
            <category><![CDATA[emoji]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript-development]]></category>
            <dc:creator><![CDATA[Alex Tatarinov]]></dc:creator>
            <pubDate>Thu, 01 Feb 2018 07:17:08 GMT</pubDate>
            <atom:updated>2019-08-13T20:25:11.210Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3vlxneAo50hBQYOZbT_ug.jpeg" /></figure><p>Recently, I’ve been asked to implement the emoji functionality into a React chat application. Researching the subject, I came across a variety of information but none of it was particularly useful for what I was trying to do. In this post, I will show a straightforward implementation of emojis in React and the tools to accomplish it.</p><p>For this demonstration, I created a simple Slack interface clone and mimicked its emoji functionality. I’ll have a link to the repo at the end of the post.</p><p>First thing I would like to mention, is that there is a myriad of emoji npm modules for React but dealing with them and choosing the right one is not necessarily straightforward. Out of about ten, <a href="https://www.npmjs.com/package/emoji-picker-react">emoji-picker-react</a> was one of the best looking solutions and it offered an easier integration. All you need is to install the module via npm, and you are on your way to the emoji paradise.</p><p>🌴🌴🌴</p><p>The emoji picker is a separate React component that can be conveniently rendered anywhere in the app. It comes fully functioning and features all you would expect from emojis, including nice graphics and the search functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*v7IEf0NKKECCyWzmASfE0w.gif" /></figure><p>In order to use the picker, you need to render it in your application and pass to it a callback function as a prop. The callback takes two arguments: the emoji code, and the rest of the emoji data. Here you can see I have a component that renders the picker on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*Td6yAUXEFguwXQ9jXXMFmg.png" /></figure><p>We are half way there.</p><p>For my app, I needed two things to happen:</p><ul><li>I wanted to have the emoji appear inside the input bar as an actual image</li><li>I wanted the picker to be on the screen only when it is needed.</li></ul><p>I’ll talk about the conditional rendering a little later. For now, let’s focus on the second half of the emoji equation.</p><p>So far, we’ve captured the emoji that the user pressed on. Now, how do we display it in the browser? <a href="https://www.npmjs.com/package/emoji-js">emoji-js</a> library offers the most convenient conversion of the input text into images. All you need is the emoji name wrapped in colons, like so :happy:. Fortunately, the second parameter in the callback function gives us the name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*hpIbmK4viR36d6ZG8XFOgg.png" /></figure><p>Cool! Now we have the actual image. The next step is to update the state of the input bar with the emoji.</p><h4>Tip: If you have a separate event listener for the user’s input and another one for the emoji, you will be able to add emoji to the end of the message and then add additional text or emojis if needed.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5bORYSn-3fdPno-QZwW6g.png" /></figure><p>Now, let’s talk about rendering the picker only when we need it. Luckily, React makes it really easy to do.</p><p>Inside of my application state, I have a property called emojiShown which is set to false by default. When false, the emoji picker is hidden. The user can enter and send the text and not be annoyed by the unwanted picker.</p><p>When required, the snazzy dude with sunglasses is clicked, the state of emojiShown is changed to true like so: emojiShown: !this.state.emojiShown and the picker appears on the screen. When clicked again, the event listener flips the state back to false and the picker disappears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*mYS1GXOVkXt5R7OVfeUQdw.gif" /></figure><p>At this point, we have a working emoji functionality. 👍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PalbzCaKnzG4yYI9X9s8Vw.png" /></figure><p>Obviously, there is room for further improvement and a few edge cases to take care of. I hope this tutorial will be useful and if you are interested in adding emojis to your React app, it will help you to get started. 🙌</p><p>If you are interested to see the code, as well as my styling using Flexbox, checkout the repo <a href="https://github.com/atatarinov/react-emoji">here</a>.</p><p>Please leave a comment and like :) 👌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=813810d4fbe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicament Of Choice In React Native: “Create-React-Native-App” & “React-Native-Init” — Which Is…]]></title>
            <link>https://medium.com/@tatarinov.alexander/predicament-of-choice-in-react-native-create-react-native-app-react-native-init-which-is-3e856f972205?source=rss-3313b56829a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e856f972205</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Alex Tatarinov]]></dc:creator>
            <pubDate>Fri, 17 Nov 2017 04:55:05 GMT</pubDate>
            <atom:updated>2017-11-17T05:15:23.680Z</atom:updated>
            <content:encoded><![CDATA[<h3>Predicament Of Choice In React Native: “Create-React-Native-App” &amp; “React-Native-Init” — Which Is Better?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cE_HuUAP4EmANRMjrUv-Hg.png" /></figure><h4><strong>React Native</strong> is still relatively new to the arena of web development, and many issues remain ambiguous. In this post, I will take a look at <strong><em>two ways</em></strong> of initializing a React Native Application and will discuss the pros and cons of both.</h4><p>If you are not familiar with React Native, I suggest reading <a href="http://www.reactnativeexpress.com/"><strong>this</strong></a> excellent guide as a starting point and continuing to the official <a href="https://facebook.github.io/react-native/docs/getting-started.html">documentation</a> for more details.</p><h4>$ create-react-native-app</h4><p>(“CRNA”) provides the <strong><em>easiest way</em></strong> to start building a new project. It is perhaps the best and quickest way for a beginner to get an application off the ground with <em>minimal effort</em>.</p><p>CRNA is based on Dan Abramov’s “<a href="https://github.com/facebookincubator/create-react-app">create-react-app</a>” for React and does a lot of work for the developer behind the scenes. The command builds a template based on the <a href="https://expo.io/tools">Expo</a> toolkit and binds a bundle of developer tools to it. The bundle allows the use of the <strong><em>most popular native services</em></strong><em> </em>right out of the box and provides access to the device’s system functionality (such as the camera, contacts, local storage, and other hardware). In addition, CDNA substantially simplifies the setup process and alleviates the burden of configuring the services like hot reloading and Webpack/Babel.</p><p>Such freedom, however, comes with a price. CRNA is rather limiting and will not allow you to write any custom native modules or integrate libraries that depend on native code that is not included in the Expo client app.</p><p>If the application becomes complex enough and requires such modifications, Expo provides a way to eject the app from the <a href="https://docs.expo.io/versions/latest/sdk/index.html">Expo SDK</a> environment. The ejection will convert the project into a somewhat similar creature to “react-native init” but preserve access to the Expo SDK functionality. As a side note, Expo SDK makes testing and deployment very easy.</p><h4>$ react-native-Init</h4><p>Similarly to CRNA, (“RNI”) also provides a certain degree of automation — it fetches the React Native source code and dependencies and creates a new Xcode project. However, in the case of RNI, the developer is responsible for setting up the native iOS and Android environments on their computer.</p><h4>To summarize</h4><p>the “Create React Native App” provides the best approach for both inexperienced developers and applications that do not require a large number of outside sources. On the other hand, more seasoned developers will find more freedom working in “React Native Init” setting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e856f972205" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>