<?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 Omar Farouk Lakhdhar on Medium]]></title>
        <description><![CDATA[Stories by Omar Farouk Lakhdhar on Medium]]></description>
        <link>https://medium.com/@farouklakhdhar?source=rss-2992aecc4dbb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HER17-WBU3mCZew-.</url>
            <title>Stories by Omar Farouk Lakhdhar on Medium</title>
            <link>https://medium.com/@farouklakhdhar?source=rss-2992aecc4dbb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 02:50:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@farouklakhdhar/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[Another Trivia App with react-native]]></title>
            <link>https://medium.com/@farouklakhdhar/another-trivia-app-with-react-native-c6b01f95bf84?source=rss-2992aecc4dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6b01f95bf84</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[العربي-الجديد]]></category>
            <category><![CDATA[عربي]]></category>
            <category><![CDATA[ميديوم-عربي]]></category>
            <category><![CDATA[حسنة]]></category>
            <dc:creator><![CDATA[Omar Farouk Lakhdhar]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 13:52:02 GMT</pubDate>
            <atom:updated>2018-06-13T15:08:28.593Z</atom:updated>
            <content:encoded><![CDATA[<p>I just published another Android Trivia application called <a href="https://play.google.com/store/apps/details?id=com.oflarcade.hasana">“حسنة”</a>, meaning good deeds in Arabic. The application is dedicated to the MENA region, so it is entirely in arabic language.</p><p>Hasana was in the making in 2015 with unity 3D, I figured, I already published an app using unity for windows phone ‘Dope Wars Ultimate’, long story short, I didn’t finish it, and I lost all the files.</p><p>So, Here we are 2018, and I finished making an app thanks to <a href="https://facebook.github.io/react-native/">react-native </a>and the <a href="https://docs.expo.io/versions/latest/">expo SDK</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ddkg-icGXxY1b71Id7mDA.png" /><figcaption>“حسنة” : Good deeds</figcaption></figure><h3>Was it possible with react-native ?</h3><p>Yes, it was, the tech provide a quick and a cross-platform solution for this kind of applications, and the community support is huge.</p><ul><li>react-navigation</li><li>redux</li><li>native-base</li><li>sqlite</li></ul><p>By the time, I almost finished the app, react-navigation 2.0 was out and the only change I felt i need to do was to change StackNavigator to CreateStackNavigator, Also I used redux to create a store to hold all the states in the application. Coming to the design part of it, there is on the internet loads of them; <a href="https://nativebase.io/">native-base</a> &amp; <a href="https://avocode.com/nachos-ui/">nachos-ui</a> gave what I just needed as components, and for the database and data-persistance, sqlite provided a trick that simplified my code and came with 2 in 1 solution.</p><p>So, For the arab readers, check it out, I am looking forward for your reviews and comments. Also if you liked it don’t to forget to share it with your friends.</p><blockquote><a href="https://play.google.com/store/apps/details?id=com.oflarcade.hasana"><strong>حسنة</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6b01f95bf84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firebase& React Native: { how to fix Firebase App named ‘[DEFAULT]’ already exists}]]></title>
            <link>https://medium.com/@farouklakhdhar/firebase-react-native-how-to-fix-firebase-app-named-default-already-exists-9353281076e3?source=rss-2992aecc4dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9353281076e3</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Omar Farouk Lakhdhar]]></dc:creator>
            <pubDate>Sun, 29 Apr 2018 11:39:38 GMT</pubDate>
            <atom:updated>2018-04-29T11:40:20.531Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F11JeH5lk2G494A%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ffallontonight-reaction-gif-brace-yourself-11JeH5lk2G494A&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2F11JeH5lk2G494A%2Fgiphy.gif%3Fcid%3D790b76111f6069b037d83bfccaf314a68a544867625cde70%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="214" frameborder="0" scrolling="no"><a href="https://medium.com/media/255b5a5581dd2d09bf20780c6f89d596/href">https://medium.com/media/255b5a5581dd2d09bf20780c6f89d596/href</a></iframe><p>So, I have been working with react-native for quite sometime now, and in the project i am developing now, I chose to go with firebase for authentication and database storage, and if you are like, at some phase when you are testing your authentication flow, specially when redirecting the user to the login screen after signing out, and if you have initialized firebase on that screen, you will most definitely encounter this red screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*63KgUhTpQ6J5liRqUvUDtQ.png" /></figure><p>You get this error, simply because you are trying to initialize firebase multiple times in your project, example:</p><blockquote>componentWillMount(){</blockquote><blockquote>firebase.initializeApp({</blockquote><blockquote>apiKey: “YOUR_API_KEY”,</blockquote><blockquote>authDomain: “something.firebaseapp.com”,</blockquote><blockquote>databaseURL: “https://something.firebaseio.com&quot;,</blockquote><blockquote>projectId: “PROJECT_ID”,</blockquote><blockquote>storageBucket: “”,</blockquote><blockquote>messagingSenderId: “SENDER_ID”,</blockquote><blockquote>})}</blockquote><p>To fix this it is quite simple, make a file called firebase.js in your directory and use this approach:</p><blockquote>import firebase from ‘firebase’;</blockquote><blockquote>const config={</blockquote><blockquote>apiKey: “YOUR_API_KEY”,</blockquote><blockquote>authDomain: “something.firebaseapp.com”,</blockquote><blockquote>databaseURL: “https://something.firebaseio.com&quot;,</blockquote><blockquote>projectId: “PROJECT_ID”,</blockquote><blockquote>storageBucket: “”,</blockquote><blockquote>messagingSenderId: “SENDER_ID”,</blockquote><blockquote>}</blockquote><blockquote>const Firebase = firebase.initializeApp(config);</blockquote><blockquote>export default Firebase;</blockquote><p>Now, whenever you need to do something related to firebase, simply:</p><p>Import Firebase from ‘./yourdirectory/Firebase’</p><p>in where-ever screen/component you want and use it like you normally use firebase.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o6Zt9fevSRznTSHtK%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsnl-saturday-night-live-1980s-stevie-wonder-3o6Zt9fevSRznTSHtK&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o6Zt9fevSRznTSHtK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="335" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4f8d690b9a33a09e4d2fb0e6eac7f55/href">https://medium.com/media/c4f8d690b9a33a09e4d2fb0e6eac7f55/href</a></iframe><p>I hope this article help anyone starting with react native and decided to use firebase for authentication or database storage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9353281076e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>