<?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 Salih Ugur on Medium]]></title>
        <description><![CDATA[Stories by Salih Ugur on Medium]]></description>
        <link>https://medium.com/@salihhugurr?source=rss-5fe69337334e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wQB-_3NpRLSLY2ia2kr2Rw.png</url>
            <title>Stories by Salih Ugur on Medium</title>
            <link>https://medium.com/@salihhugurr?source=rss-5fe69337334e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:53:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salihhugurr/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[Writing Clean Code in React Native: A Comprehensive Guide]]></title>
            <link>https://medium.com/@salihhugurr/writing-clean-code-in-react-native-a-comprehensive-guide-0a891ccc01ee?source=rss-5fe69337334e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a891ccc01ee</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Salih Ugur]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 21:34:04 GMT</pubDate>
            <atom:updated>2024-01-04T06:23:22.992Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*G39DKbuF_bsnQiNc.jpeg" /></figure><p>Writing clean and maintainable code is crucial for the success of any software project. React Native, being a popular framework for building cross-platform mobile applications, benefits greatly from clean coding practices. In this guide, we’ll explore best practices for writing clean code in React Native, helping you and your team build more scalable and maintainable applications.</p><h3>1. Consistent Code Formatting with Prettier and ESLint</h3><p>Maintaining a consistent code style is essential for readability and collaboration. Use tools like Prettier for code formatting and ESLint for catching potential issues. Set up these tools in your project and establish a configuration that aligns with your team’s preferences.</p><pre># Prettier<br>yarn add --dev prettier<br><br># ESLint<br>yarn add --dev eslint</pre><h3>Configuration:</h3><p>Create a .prettierrc and .eslintrc.js file to configure Prettier and ESLint, respectively.</p><pre>// .prettierrc<br>{<br>  &quot;singleQuote&quot;: true,<br>  &quot;semi&quot;: false,<br>  &quot;printWidth&quot;: 80,<br>}</pre><pre>// .eslintrc.js<br>module.exports = {<br>  extends: [&#39;@react-native-community&#39;, &#39;prettier&#39;],<br>};</pre><h3>2. Use Functional Components and Hooks</h3><p>Embrace functional components and React Hooks for state and side-effect management. This modern approach to React development improves code readability and promotes the reuse of logic.</p><pre>import React, { useState, useEffect } from &#39;react&#39;;<br><br>const MyComponent = () =&gt; {<br>  const [data, setData] = useState(null);<br><br>  useEffect(() =&gt; {<br>    fetchData();<br>  }, []);<br><br>  const fetchData = async () =&gt; {<br>    setData(result);<br>  };<br><br>  return &lt;div&gt;{data &amp;&amp; &lt;p&gt;{data}&lt;/p&gt;}&lt;/div&gt;;<br>};</pre><h3>3. Component Modularization</h3><p>Break down complex UI components into smaller, reusable components. This approach enhances maintainability, facilitates testing, and improves collaboration among team members.</p><pre>// Bad<br>const UserProfile = () =&gt; {<br>  // ... complex UI logic<br>};<br><br>// Good<br>const UserInfo = () =&gt; {<br>  // ... simple user information display<br>};<br><br>const UserActivity = () =&gt; {<br>  // ... user activity section<br>};<br><br>const UserProfile = () =&gt; {<br>  return (<br>    &lt;div&gt;<br>      &lt;UserInfo /&gt;<br>      &lt;UserActivity /&gt;<br>    &lt;/div&gt;<br>  );<br>};</pre><h3>4. State Management Best Practices</h3><p>Choose an appropriate state management solution for your application (e.g., React Context, Redux). Follow best practices for organizing and updating state to avoid unnecessary re-renders.</p><h3>Example with React Context:</h3><pre>import React, { createContext, useContext, useReducer } from &#39;react&#39;;<br><br>const initialState = { count: 0 };<br><br>const CounterContext = createContext();<br><br>const CounterProvider = ({ children }) =&gt; {<br>  const reducer = (state, action) =&gt; {<br>    switch (action.type) {<br>      case &#39;INCREMENT&#39;:<br>        return { count: state.count + 1 };<br>      case &#39;DECREMENT&#39;:<br>        return { count: state.count - 1 };<br>      default:<br>        return state;<br>    }<br>  };<br><br>  const [state, dispatch] = useReducer(reducer, initialState);<br><br>  return (<br>    &lt;CounterContext.Provider value={{ state, dispatch }}&gt;<br>      {children}<br>    &lt;/CounterContext.Provider&gt;<br>  );<br>};<br><br>const useCounter = () =&gt; {<br>  const context = useContext(CounterContext);<br>  if (!context) {<br>    throw new Error(&#39;useCounter must be used within a CounterProvider&#39;);<br>  }<br>  return context;<br>};<br><br>export { CounterProvider, useCounter };</pre><h3>5. Optimize Component Rendering</h3><p>Improve the performance of your React Native application by optimizing component rendering. Use techniques such as React.memo for functional components and shouldComponentUpdate for class components.</p><pre>// Functional Component with React.memo<br>const MyMemoizedComponent = React.memo(({ data }) =&gt; {<br>  // Component logic<br>});<br><br>// Class Component with shouldComponentUpdate<br>class MyComponent extends React.Component {<br>  shouldComponentUpdate(nextProps, nextState) {<br>    // Check if a re-render is necessary based on nextProps and nextState<br>    return this.props.data !== nextProps.data;<br>  }<br><br>  render() {<br>    // Component logic<br>  }<br>}</pre><h3>Conclusion</h3><p>Writing clean code in React Native is not only about aesthetics but also about improving collaboration, minimizing bugs, and making your application more maintainable. Adopting these best practices will contribute to a more enjoyable and efficient development process.</p><p>Remember, clean code is a journey, not a destination. Regularly review and refactor your codebase to ensure it remains clean and scalable throughout the development lifecycle.</p><p>Happy coding! 👩‍💻🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a891ccc01ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Projelerinde Context API mı, Redux mı?]]></title>
            <link>https://medium.com/@salihhugurr/react-projelerinde-context-api-m%C4%B1-redux-m%C4%B1-0b7a14345ad5?source=rss-5fe69337334e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b7a14345ad5</guid>
            <category><![CDATA[context-api]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Salih Ugur]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 20:47:13 GMT</pubDate>
            <atom:updated>2024-01-03T20:47:13.327Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Proje Büyüklüğü</h3><h4>Context API</h4><p>Küçük ve orta büyüklükteki projeler için Context API genellikle yeterlidir. Projenizde birkaç bileşen arasında veri paylaşımı yapmanız gerekiyorsa, Context API kullanımı basit ve etkili olabilir.</p><h4>Redux</h4><p>Büyük ölçekli projelerde, çok sayıda bileşen arasında durumu yönetmek için Redux gibi bir durum yönetim kütüphanesi kullanmak daha avantajlı olabilir. Redux, büyük uygulamalarda bileşenler arasında veri akışını düzenlemeye yardımcı olur.</p><h3>2. Veri Karmaşıklığı</h3><h4>Context API</h4><p>Eğer uygulamanızdaki durum karmaşıksızsa ve sadece birkaç bileşen arasında paylaşılıyorsa, Context API kullanmak mantıklı olabilir.</p><h4>Redux</h4><p>Eğer uygulamanız büyük ve veri karmaşıksa, Redux’ın sağladığı merkezi durum yönetimi, gelişmiş eylem ve reducer yapıları size daha fazla esneklik sağlayabilir.</p><h3>3. Performans İhtiyacı</h3><h4>Context API</h4><p>Küçük projelerde genellikle performans sorunları yaşanmaz ve Context API kullanımı yeterlidir.</p><h4>Redux</h4><p>Redux, özellikle büyük projelerde performansı artırmak için gelişmiş bir yapı sağlar. Redux’ın bağlamdan daha iyi performans gösterdiği durumlar olabilir.</p><h3>4. Öğrenme Kolaylığı</h3><h4>Context API</h4><p>Context API, React içinde yer aldığından, React kullanıcıları için öğrenmesi daha kolaydır. Ek bir kütüphane kurma zorunluluğu yoktur.</p><h4>Redux</h4><p>Redux, ayrı bir kütüphanedir ve ayrıca Redux’ta öğrenilmesi gereken birkaç kavram vardır. Bu, başlangıçta biraz daha karmaşıktır, ancak büyük projelerde avantaj sağlar.</p><h3>Sonuç</h3><p>Bu faktörleri değerlendirdikten sonra, projenizin ihtiyaçlarına en uygun olanı seçebilirsiniz. Eğer küçük bir proje üzerinde çalışıyorsanız ve öğrenme eğrisini düşük tutmak istiyorsanız Context API, büyük bir uygulama üzerinde çalışıyorsanız ve merkezi durum yönetimi gerekiyorsa Redux tercih edilebilir.</p><p>Her ikisi de güçlü araçlardır ve projenizin gereksinimlerine bağlı olarak seçim yapabilirsiniz. Unutmayın, her iki yaklaşım da uygun durumlarda kullanıldığında etkili olabilir.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b7a14345ad5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native’de FlatList ve Infinite Scrolling]]></title>
            <link>https://medium.com/@salihhugurr/react-nativede-flatlist-ve-infinite-scrolling-6a38f2654420?source=rss-5fe69337334e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a38f2654420</guid>
            <category><![CDATA[infinite-scroll]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[infinite-scrolling]]></category>
            <category><![CDATA[flatlist]]></category>
            <dc:creator><![CDATA[Salih Ugur]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 12:40:16 GMT</pubDate>
            <atom:updated>2023-06-29T12:43:42.867Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>FlatList Temel Kullanımı: FlatList bileşenini temel olarak kullanarak veri listelerini görüntüleyebilirsiniz. Örnek olarak;</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*Umgr-G3QmoGnZKqcbQ_QVQ.png" /><figcaption>Klasik Kullanım</figcaption></figure><p>Yukarıdaki örnekte, useState hook’u kullanarak bir veri dizisi tanımlıyoruz. FlatList bileşenini kullanarak bu veri dizisini görüntülüyoruz.</p><p>Flatlist componentinin zorunlu olarak beklediği 2 adet propumuz bulunuyor. Bunun yanında da performans olarak eklemenizi önerdiğim diğer bir prop ise keyExtractor.</p><blockquote><strong><em>data </em></strong>: Bu prop listelemek istediğimiz veriyi array (dizi) formatında istiyor.</blockquote><blockquote><strong><em>renderItem</em></strong> : Bu prop bu listedeki her bir elemanın nasıl görüntülenmesini istiyorsak ona uygun bir şekilde JSX veya başka bir bileşen döndürmemizi bekliyor. Yukarıdaki kodda da tanımladığımız gibi renderItem fonksiyonu, iki parametre alır: ({ item, index }). “item”, FlatList’teki öğenin kendisidir ve “index”, öğenin sırasını temsil eden bir sayıdır.</blockquote><blockquote><strong><em>keyExtractor</em></strong>: FlatList bileşeninin her bir öğenin benzersiz bir kimlik değeri (key) gerektirdiği durumlarda kullanılır. Her bir öğenin benzersiz bir key değerine sahip olması, FlatList’in verileri etkin bir şekilde yönetmesine ve performansı artırmasına yardımcı olur.</blockquote><blockquote>keyExtractor, FlatList’e bir işlev olarak iletilir ve her bir öğe için benzersiz bir key değeri döndürmelidir. Bu key değeri, öğenin benzersiz kimliğini temsil eder.</blockquote><blockquote>Örneğin, FlatList’te bir dizi nesne kullanıyorsanız ve bu nesnelerin “id” özelliği benzersiz kimlik değerini temsil ediyorsa, keyExtractor kullanarak bu özelliği belirtebilirsiniz.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*aEHb5ac_U0qof2NcueokHQ.png" /><figcaption>Görüntü 1</figcaption></figure><p><strong>Şimdi geçici olarak tanımladığımız bu veriyi bir api’dan alalım ve görsel olarak biraz güncellemeler yapalım. Bunun için </strong><a href="https://randomuser.me/api/"><strong>https://randomuser.me/api/</strong></a><strong> kullanacağım.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*zO5wejkAcxRhyF9JG4Mwaw.png" /><figcaption>Axios ile veri işlemleri</figcaption></figure><p>Verileri bir api’dan çektikten sonra sıra geldi loadMore işlevselliğine. Load more sayesinde Infinite Scrolling (Sonsuz Kaydırma) işlemlerinizi yapabilirsiniz. Bu kullanım oldukça User Friendly bir kullanımdır.</p><p>Öncelikle bir page state’i ve isLoadingMore state’i tanımlayalım başlangıç olarak page 1 değerini alsın, isLoadingMore false değerini alsın.</p><p>Sonrasında fetchData fonksiyonumuzu aşağıdaki koddaki gibi değiştirelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*tQwco_YLTrVcJ4ArGIcIfQ.png" /><figcaption>fetchData</figcaption></figure><p>Burda öncelikle yaptığımız şey artık bu fonksiyonu çağırırken page değerini de göndermemiz gerekiyor. Bu page değeriyle de api’nin sağlamış olduğu pagination querysi ile `` kullanarak son kısmında results= den sonra bir işlem oluşturuyoruz. Bu işlem sayesinde sayfalar arttıkça gelen veriler de 20 şer olarak artacak.</p><p>İlk açılışta daha hiç loadMore yapmadığımız için önce ilk 20 veri yüklenecek, ilk loadMore sonrasında 20&#39;den 40&#39;a kadar olan veriler yüklenecek ve bu şekilde veri kalmayana kadar devam edecek.</p><p>Bu gelen veriler her zaman 20&#39;li olarak geleceği için; geçmişte elimizde olan veri state’ini güncel tutarak sonradan gelen 20 veriyi bu listeye eklememiz gerekiyor. Burda da setData hook’unun içerisinde bir arrow function oluşturuyoruz. Bu sayede geçmişte elimizde olan veriyi alabiliyoruz. Sonrasında geçmişte elimizde olan data’ya concat (birleştirme) yapıyoruz.</p><p>Bir sonraki adımda da güncel olan sayfayı 1 arttırmamız ve loading state’imizi false’a çekmemiz gerekiyor.</p><h4>Peki sayfanın en aşağısına inince fetchData fonksiyonunu çağırmak için neler eklememiz gerekiyor ?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*fVUh4_hij-rjNUCst2F4zA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*Kz-cF_MwH9JSPcAU7jzzLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*lpCP98PaHR9DOhQxIHk1cw.png" /></figure><p>Öncelikle FlatList componentinin içerisine 3 adet prop daha ekliyoruz.</p><h3><strong>onEndReached</strong></h3><blockquote>Bu prop’ta listenin sonuna ulaştığınızda hangi fonksiyonu çağırmak istiyorsak onu vermemiz gerekiyor.</blockquote><blockquote>İlk olarak, isLoadingMore state’inin değerini kontrol eder. Eğer<br> isLoadingMore false ise, yeni bir load more işlemi başlatılır.</blockquote><blockquote>isLoadingMore state’i true olarak güncellenir, böylece tekrar load more işlemi yapılmaz. Daha sonra fetchData fonksiyonu çağrılırken, bir sonraki sayfayı belirlemek için page state’inin değerine 1 eklenir. Bu sayede, daha önce görüntülenen verilerden farklı olan yeni verileri almak için kullanılır.</blockquote><h3><strong>onEndReachedTreshold</strong></h3><blockquote>Genel olarak, onEndReachedThreshold değeri, 0.0 ile 1.0 arasında bir yüzdelik değeri olarak belirtilir. Örneğin, 0.5 değeri kullanılırsa, kullanıcı FlatList’in yüzde 50&#39;sine (tam ortasına) kadar ilerlediğinde onEndReached olayı tetiklenir.</blockquote><blockquote>Bu prop, kullanıcının daha fazla içeriği yüklemek için listenin sonuna yaklaştığını belirlemek için kullanılır. Bu şekilde, kullanıcı listenin sonuna yaklaştıkça, önceden belirlenmiş bir eşiğe ulaştığında onEndReached olayı tetiklenir ve belirtilen bir işlev çağrılır. Bu işlev, yeni verileri yüklemek veya diğer uygun işlemleri gerçekleştirmek için kullanılabilir.</blockquote><blockquote>Örneğin, onEndReachedThreshold değeri 0.5 olarak belirlenmişse, kullanıcı listenin yarı noktasına geldiğinde (yüzde 50) onEndReached olayı tetiklenir. Bu, kullanıcıya listenin sonuna yaklaştığını ve daha fazla içeriği yüklemek için uygun bir zaman olduğunu gösterir. Böylece, dinamik olarak veri yüklemesi yapılabilir ve kullanıcı deneyimi iyileştirilebilir.</blockquote><blockquote>Bu nedenle, onEndReachedThreshold prop’u, kullanıcının listenin sonuna yaklaştığını belirlemek için kullanılır ve onEndReached olayının tetiklenme zamanını kontrol eder.</blockquote><h3><strong>renderFooter</strong></h3><blockquote>renderFooter FlatList component’inin en altında ne göstermek istiyorsak göstermemize yarayan bir proptur. Genelde de yüklemeleri göstermek için kullanılır.</blockquote><blockquote>Yukarıda da gördüğünüz gibi eğer isLoadingMore false ise yani herhangi bir yükleme işlemi yapılmıyorsa return null; diyerek listemizin altında herhangi bir şey göstermiyoruz.</blockquote><blockquote>Eğer loading işlemi varsa da &lt;ActivityIndicator/&gt; kullanarak animasyonlu bir loading görseli dönderiyoruz.</blockquote><figure><img alt="Uygulama Videosu" src="https://cdn-images-1.medium.com/max/400/1*uYcxDywG3xEXnZ9nrNe4kg.gif" /></figure><h4>Başarılı bir şekilde React Native’de FlatList ve Infinite Scrolling konusunu ele aldık. FlatList, büyük miktarda veriyi hızlı ve verimli bir şekilde görüntülememizi sağlayan güçlü bir bileşendir. Infinite Scrolling ise kullanıcının daha fazla içeriği yüklemek için listenin sonuna yaklaştıkça otomatik olarak yeni verileri getirerek kullanıcı deneyimini geliştiren bir özelliktir.</h4><h4>Umuyorum ki bu yazı, React Native geliştiricilerine FlatList ve Infinite Scrolling konusunda değerli bilgiler sağlamıştır. React Native projelerinizde bu özellikleri kullanarak, kullanıcılarınıza akıcı ve etkileyici bir deneyim sunabilirsiniz.</h4><p><strong><em>Kodlara şu linkten ulaşabilirsiniz: </em></strong><a href="https://github.com/salihhugurr/medium-salihhugurr"><strong><em>https://github.com/salihhugurr/medium-salihhugurr</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a38f2654420" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native’de Custom Hook Nasıl Yazılır?]]></title>
            <link>https://medium.com/@salihhugurr/react-nativede-custom-hook-nas%C4%B1l-yaz%C4%B1l%C4%B1r-be5bf7038027?source=rss-5fe69337334e------2</link>
            <guid isPermaLink="false">https://medium.com/p/be5bf7038027</guid>
            <category><![CDATA[custom-hook]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Salih Ugur]]></dc:creator>
            <pubDate>Wed, 28 Jun 2023 10:24:46 GMT</pubDate>
            <atom:updated>2023-06-28T10:24:46.639Z</atom:updated>
            <content:encoded><![CDATA[<p>React Native projelerinde, tekrar tekrar kullanılan mantıkları birleştirmek ve kodunuzu daha düzenli hale getirmek için custom hook’lar oldukça kullanışlıdır. Bu makalede, React Native’de custom hook’ların nasıl yazılacağını adım adım açıklayacağız.</p><h3><strong><em>Custom Hook Nedir?</em></strong></h3><blockquote>Öncelikle, custom hook’ların ne olduğunu anlamak önemlidir. Custom hook’lar, <strong>React Hooks</strong> yapısını kullanarak belirli bir işlevselliği veya durumu soyutlayan ve tekrar kullanılabilir hale getiren fonksiyonlardır. Bu, kodunuzda tekrar eden mantıkları merkezi bir yerde toplayarak temiz ve sade bir yapı oluşturmanızı sağlar.</blockquote><h3><strong>Custom Hook Oluşturma</strong></h3><blockquote>Custom hook oluşturmak oldukça basittir. Bir fonksiyonu, “use” ile başlayan bir isim vererek bir custom hook haline getirebilirsiniz. Örneğin, bir tema işlevselliği oluşturmak istediğinizi varsayalım. Aşağıdaki gibi bir custom hook oluşturabilirsiniz:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*Fo0j0hhFhBdWf7HZM9I8bA.png" /><figcaption>hooks/useTheme.js</figcaption></figure><blockquote>Bu örnekte, `useTheme` adında bir custom hook oluşturduk. İçinde, `useState` hook’unu kullanarak tema durumunu yönetiyoruz. Ayrıca, temayı istediğimiz bir sayfadan değiştirebilmek için `toggleTheme` adında bir fonksiyon da döndürüyoruz. Bu custom hook’u, ihtiyaç duyduğunuz herhangi bir bileşende kullanabilirsiniz.</blockquote><h3><strong>Custom Hook’u Kullanma</strong></h3><blockquote>Custom hook’u kullanmak da oldukça basittir. İstediğiniz bileşende import edip kullanabilirsiniz. Örneğin:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*-ppMZhYwjImaSzbwTxjjxg.png" /><figcaption>App.js</figcaption></figure><blockquote>Yukarıdaki örnekte, `useTheme` custom hook’umuzu import ediyoruz. Ardından, hook’tan dönen değerleri kullanarak tema durumunu ve tema değiştirme işlevselliğini gösteriyoruz. Bu şekilde, tema yönetimini birçok bileşende tekrar etmek zorunda kalmadan kullanabilirsiniz.</blockquote><h3><strong>Uygulamadan Görüntüler</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*UqFAqJ_sEG9eG7tyWFOl2g.png" /><figcaption>Theme Light</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*HF7GWxW966788g9p9dvP5Q.png" /><figcaption>Theme Dark</figcaption></figure><h3><strong>Sonuç</strong></h3><blockquote>Bu makalede, React Native’de custom hook’lar oluşturmanın temellerini öğrendik. Custom hook’lar, kodunuzun düzenli ve tekrar kullanılabilir olmasını sağlar. Artık kendi custom hook’larınızı oluşturabilir ve projelerinizdeki tekrar eden mantıkları daha iyi yönetebilirsiniz.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be5bf7038027" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to the MERN Stack]]></title>
            <link>https://medium.com/@salihhugurr/a-beginners-guide-to-the-mern-stack-e7b591b7e1ea?source=rss-5fe69337334e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7b591b7e1ea</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mern]]></category>
            <category><![CDATA[mern-stack]]></category>
            <dc:creator><![CDATA[Salih Ugur]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 14:45:09 GMT</pubDate>
            <atom:updated>2023-04-30T14:45:09.880Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you interested in web development but don’t know where to start? If you’re looking for a full-stack framework that can help you build modern web applications, you might want to check out the MERN stack. In this post, I’ll introduce you to the MERN stack and show you how to get started with it.</p><blockquote><strong>What is the MERN stack?</strong></blockquote><p>The MERN stack is a popular open-source web development stack that consists of four technologies: MongoDB, Express, React, and Node.js. These technologies are all built using JavaScript, which makes the MERN stack a great choice for developers who are already familiar with the language.</p><p><strong>Here’s a brief overview of each component of the MERN stack:</strong></p><ul><li>MongoDB: a document-based NoSQL database that stores data in JSON-like documents. MongoDB is known for its flexibility and scalability, and it’s a great choice for applications that need to handle large amounts of unstructured data.</li><li>Express: a minimalist web application framework for Node.js. Express provides a set of features for building web applications, such as routing, middleware, and error handling.</li><li>React: a JavaScript library for building user interfaces. React is known for its simplicity and performance, and it’s a great choice for building modern single-page applications.</li><li>Node.js: a JavaScript runtime that allows you to run JavaScript code outside of a web browser. Node.js is built on top of the V8 JavaScript engine, and it’s a great choice for building server-side applications.</li></ul><p>When you combine these four technologies, you get a full-stack framework that allows you to build modern web applications from scratch. Here’s how the MERN stack fits together:</p><ol><li>Node.js and Express handle the server-side logic and provide an API for the client-side code.</li><li>MongoDB stores the data for your application.</li><li>React handles the client-side rendering and provides a dynamic user interface.</li></ol><blockquote><strong>Why use the MERN stack?</strong></blockquote><p>There are many reasons why you might want to use the MERN stack for your next web development project. Here are a few of the most compelling reasons:</p><ul><li>It’s all JavaScript: If you’re already familiar with JavaScript, you’ll find it easy to learn the MERN stack. Plus, you can reuse code between the server and the client, which can save you a lot of time and effort.</li><li>It’s flexible: The MERN stack allows you to build applications that can handle a wide range of use cases. Whether you’re building a simple blog or a complex e-commerce site, the MERN stack has you covered.</li><li>It’s scalable: The MERN stack is designed to handle large amounts of data and traffic, so you can be confident that your application will be able to handle whatever comes its way.</li></ul><blockquote><strong>Getting started with the MERN stack</strong></blockquote><p>Ready to get started with the MERN stack? Here’s a brief overview of the steps you’ll need to take:</p><ol><li>Install Node.js: You’ll need to install Node.js on your computer if you haven’t already. You can download it from the official website.</li><li>Install MongoDB: You’ll also need to install MongoDB on your computer. You can download it from the official website.</li><li>Create a new project: Use the create-react-app tool to create a new project with React. This will give you a basic structure for your application.</li><li>Add Express: Install the express package and set up a simple server with some basic routes.</li><li>Connect to MongoDB: Install the mongoose package and connect to your MongoDB database.</li><li>Build your application: Use React to build the client-side of your application, and use Express to handle the server-side logic.</li><li>Deploy your application: Once your application is complete, you can deploy it to a hosting service like Heroku or AWS.</li></ol><p>Of course, this is just a very brief overview of the steps involved in building a MERN stack application. There are many more details to consider, such as how to handle authentication and how to structure your code for scalability.</p><p>Luckily, there are many great resources available online that can help you learn more about the MERN stack. Here are a few that I recommend:</p><ul><li>The official documentation for each technology in the stack: MongoDB, Express, React, and Node.js.</li><li>Tutorials on YouTube or Udemy: There are many video tutorials available online that can walk you through the process of building a MERN stack application.</li><li>Online communities: Join online communities like Reddit or Stack Overflow to ask questions and get help from other developers who are working with the MERN stack.</li></ul><blockquote><strong>Conclusion</strong></blockquote><p><strong>The MERN stack is a powerful and flexible full-stack web development framework that can help you build modern web applications from scratch. Whether you’re a beginner or an experienced developer, the MERN stack is a great choice for building fast, scalable, and flexible web applications.</strong></p><h4>If you’re interested in learning more about the MERN stack, I encourage you to explore the resources I’ve listed above and start building your own MERN stack application today. Good luck!</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7b591b7e1ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>