<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samad khalid</title>
    <description>The latest articles on DEV Community by Samad khalid (@samadkhalid_).</description>
    <link>https://dev.to/samadkhalid_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2795101%2F5e5b0a5e-88ce-4af7-9e21-e4065c6bfc51.png</url>
      <title>DEV Community: Samad khalid</title>
      <link>https://dev.to/samadkhalid_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samadkhalid_"/>
    <language>en</language>
    <item>
      <title>Stop using FlatList — Try react-native-unilist for faster list rendering in React Native</title>
      <dc:creator>Samad khalid</dc:creator>
      <pubDate>Mon, 07 Jul 2025 11:19:20 +0000</pubDate>
      <link>https://dev.to/samadkhalid_/stop-using-flatlist-try-react-native-unilist-for-faster-list-rendering-in-react-native-1kg8</link>
      <guid>https://dev.to/samadkhalid_/stop-using-flatlist-try-react-native-unilist-for-faster-list-rendering-in-react-native-1kg8</guid>
      <description>&lt;p&gt;Hi devs 👋&lt;/p&gt;

&lt;p&gt;I just published a new React Native package called react-native-unilist — a lightweight, highly-performant replacement for FlatList.&lt;/p&gt;

&lt;p&gt;🎯 Features:&lt;/p&gt;

&lt;p&gt;Ultra-fast rendering&lt;/p&gt;

&lt;p&gt;Clean and minimal API&lt;/p&gt;

&lt;p&gt;Supports custom item components&lt;/p&gt;

&lt;p&gt;📦 Install:&lt;/p&gt;

&lt;p&gt;npm install react-native-unilist&lt;/p&gt;

&lt;p&gt;🔗 GitHub: github.com/SamadK01/react-native-unilist&lt;br&gt;
📦 NPM: npmjs.com/package/react-native-unilist&lt;/p&gt;

&lt;p&gt;Would love your feedback, stars, and contributions!&lt;/p&gt;

&lt;p&gt;— Samad Khalid ✌️&lt;/p&gt;

&lt;h1&gt;
  
  
  reactnative #javascript #opensource #devcommunity #showdev #npm
&lt;/h1&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>devcommunity</category>
    </item>
    <item>
      <title>Simplify React Native API Calls with react-native-apikit: Goodbye Axios Boilerplate!</title>
      <dc:creator>Samad khalid</dc:creator>
      <pubDate>Fri, 04 Jul 2025 06:53:30 +0000</pubDate>
      <link>https://dev.to/samadkhalid_/simplify-react-native-api-calls-with-react-native-apikit-goodbye-axios-boilerplate-24n</link>
      <guid>https://dev.to/samadkhalid_/simplify-react-native-api-calls-with-react-native-apikit-goodbye-axios-boilerplate-24n</guid>
      <description>&lt;p&gt;✍️ Author: Samad khalid&lt;br&gt;
🔗 GitHub: github.com/SamadK01/apikit&lt;br&gt;
🧩 npm: react-native-apikit&lt;/p&gt;

&lt;p&gt;🤯 The Problem&lt;br&gt;
React Native developers often get stuck writing the same boilerplate:&lt;/p&gt;

&lt;p&gt;Manual loading state&lt;/p&gt;

&lt;p&gt;Repeated try/catch blocks&lt;/p&gt;

&lt;p&gt;Token headers for every request&lt;/p&gt;

&lt;p&gt;Retry logic&lt;/p&gt;

&lt;p&gt;Error formatting&lt;/p&gt;

&lt;p&gt;Example with axios:&lt;/p&gt;

&lt;p&gt;setLoading(true);&lt;br&gt;
try {&lt;br&gt;
  const res = await axios.get('/users');&lt;br&gt;
  setData(res.data);&lt;br&gt;
} catch (err) {&lt;br&gt;
  setError(err);&lt;br&gt;
} finally {&lt;br&gt;
  setLoading(false);&lt;br&gt;
}&lt;br&gt;
Now multiply that by 20 endpoints in your app. 😩&lt;/p&gt;

&lt;p&gt;🎯 The Solution: react-native-apikit&lt;br&gt;
Meet react-native-apikit, a zero-boilerplate API layer designed specifically for React Native.&lt;/p&gt;

&lt;p&gt;✅ One-time configuration&lt;br&gt;
✅ Built-in useApi() hook&lt;br&gt;
✅ Supports both axios and fetch&lt;br&gt;
✅ Auto token headers&lt;br&gt;
✅ Clean error object&lt;br&gt;
✅ Retry support&lt;/p&gt;

&lt;p&gt;📦 Installation&lt;/p&gt;

&lt;p&gt;npm install react-native-apikit&lt;br&gt;
or&lt;br&gt;
yarn add react-native-apikit&lt;/p&gt;

&lt;p&gt;🔧 Setup (Just Once!)&lt;br&gt;
In your App.tsx or startup file:&lt;/p&gt;

&lt;p&gt;import { configureApiKit, asyncStorageToken } from 'react-native-apikit';&lt;/p&gt;

&lt;p&gt;configureApiKit({&lt;br&gt;
  baseUrl: '&lt;a href="https://your-api.com" rel="noopener noreferrer"&gt;https://your-api.com&lt;/a&gt;',&lt;br&gt;
  tokenStorage: asyncStorageToken,&lt;br&gt;
  engine: 'fetch', // or 'axios'&lt;br&gt;
  timeout: 10000,&lt;br&gt;
  retry: 2,&lt;br&gt;
  headers: {&lt;br&gt;
    'X-App-Version': '1.0.0',&lt;br&gt;
  },&lt;br&gt;
  onUnauthorized: () =&amp;gt; {&lt;br&gt;
    Alert.alert('Session expired', 'Please login again');&lt;br&gt;
  },&lt;br&gt;
});&lt;br&gt;
Done. Now you're globally configured.&lt;/p&gt;

&lt;p&gt;🪝 useApi() Hook&lt;/p&gt;

&lt;p&gt;tsCopyEditconst {&lt;br&gt;
  get,&lt;br&gt;
  post,&lt;br&gt;
  put,&lt;br&gt;
  patch,&lt;br&gt;
  del,&lt;br&gt;
  loading,&lt;br&gt;
  error,&lt;br&gt;
  data,&lt;br&gt;
  reset,&lt;br&gt;
} = useApi();&lt;br&gt;
💡 Example&lt;/p&gt;

&lt;p&gt;const { get, loading, error, data } = useApi();&lt;/p&gt;

&lt;p&gt;useEffect(() =&amp;gt; {&lt;br&gt;
  get('/users');&lt;br&gt;
}, []);&lt;br&gt;
This handles everything:&lt;/p&gt;

&lt;p&gt;loading state&lt;/p&gt;

&lt;p&gt;error object&lt;/p&gt;

&lt;p&gt;data response&lt;/p&gt;

&lt;p&gt;Retries (if configured)&lt;/p&gt;

&lt;p&gt;✍️ Real-world Demo (Using JSONPlaceholder)&lt;/p&gt;

&lt;p&gt;await get('/users');&lt;br&gt;
await post('/posts', {&lt;br&gt;
  title: 'New Post',&lt;br&gt;
  body: 'Demo content',&lt;br&gt;
  userId: 1,&lt;br&gt;
});&lt;br&gt;
await put('/posts/1', { ... });&lt;br&gt;
await patch('/posts/1', { title: 'Updated' });&lt;br&gt;
await del('/posts/1');&lt;br&gt;
🔐 Token Support&lt;br&gt;
Use asyncStorageToken to manage auth tokens:&lt;/p&gt;

&lt;p&gt;await asyncStorageToken.setToken('jwt-token');&lt;br&gt;
const token = await asyncStorageToken.getToken();&lt;br&gt;
await asyncStorageToken.removeToken();&lt;br&gt;
Automatically adds Authorization: Bearer  to requests.&lt;/p&gt;

&lt;p&gt;🔄 Switching Between axios and fetch&lt;br&gt;
Want to switch engines?&lt;/p&gt;

&lt;p&gt;configureApiKit({ engine: 'axios' });&lt;br&gt;
You're in control!&lt;/p&gt;

&lt;p&gt;🧠 Error Handling&lt;br&gt;
Clean and consistent:&lt;/p&gt;

&lt;p&gt;if (error) {&lt;br&gt;
  console.log(error.message); // "Request failed"&lt;br&gt;
  console.log(error.status);  // 404, 500 etc.&lt;br&gt;
  console.log(error.data);    // Response body&lt;br&gt;
}&lt;br&gt;
🆚 Why Not Axios or Fetch Alone?&lt;br&gt;
Feature Axios/Fetch react-native-apikit&lt;br&gt;
Manual loading/error    ✅ Required    ❌ Handled internally&lt;br&gt;
Token storage support   ❌ ✅ Built-in&lt;br&gt;
Retry logic ❌ ✅ Simple config&lt;br&gt;
Switch engines  ❌ ✅ fetch/axios&lt;br&gt;
Hook integration    ❌ ✅ useApi()&lt;br&gt;
Global headers/timeouts Manual  ✅ Via configureApiKit&lt;br&gt;
🎯 Who Is This For?&lt;br&gt;
React Native devs tired of boilerplate&lt;/p&gt;

&lt;p&gt;Teams needing standard API structure&lt;/p&gt;

&lt;p&gt;Apps using fetch/axios and AsyncStorage&lt;/p&gt;

&lt;p&gt;Developers who want loading/error/data state out of the box&lt;/p&gt;

&lt;p&gt;🔥 Final Thoughts&lt;br&gt;
Stop writing the same useEffect + loading + catch block over and over.&lt;/p&gt;

&lt;p&gt;react-native-apikit helps you:&lt;/p&gt;

&lt;p&gt;Write less code&lt;/p&gt;

&lt;p&gt;Catch errors easier&lt;/p&gt;

&lt;p&gt;Keep logic clean&lt;/p&gt;

&lt;p&gt;Swap engines freely&lt;/p&gt;

&lt;p&gt;Focus on features, not boilerplate&lt;/p&gt;

&lt;p&gt;📚 Resources&lt;br&gt;
GitHub: &lt;a href="https://github.com/SamadK01/apikit" rel="noopener noreferrer"&gt;https://github.com/SamadK01/apikit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;npm: &lt;a href="https://www.npmjs.com/package/react-native-apikit" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/react-native-apikit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💬 Feedback?&lt;br&gt;
Have a suggestion or found a bug?&lt;br&gt;
Open an issue or PR on GitHub! I’d love your feedback to keep improving it for the community.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Build Faster, Cleaner Lists in React Native with react-native-unilist</title>
      <dc:creator>Samad khalid</dc:creator>
      <pubDate>Thu, 03 Jul 2025 07:23:08 +0000</pubDate>
      <link>https://dev.to/samadkhalid_/build-faster-cleaner-lists-in-react-native-with-react-native-unilist-10fb</link>
      <guid>https://dev.to/samadkhalid_/build-faster-cleaner-lists-in-react-native-with-react-native-unilist-10fb</guid>
      <description>&lt;p&gt;When working on mobile apps in React Native, developers often spend unnecessary time building list UIs — especially when dealing with repeated patterns like FlatList and ScrollView. These components are powerful but require setup, styling, and often lead to duplicated logic when reused across screens.&lt;/p&gt;

&lt;p&gt;That’s why I created react-native-unilist — a simple yet powerful wrapper component that helps you render list-based UIs quickly, with less code, and better reusability.&lt;/p&gt;

&lt;p&gt;Why I Built This Library&lt;br&gt;
As a React Native developer, I’ve worked on multiple apps where lists were a central part of the UI — from product displays to settings screens, and user profiles to dashboard overviews. I found myself repeating the same FlatList logic, with custom cards, layout props, and handlers — just to render a simple, scrollable interface.&lt;/p&gt;

&lt;p&gt;Instead of rewriting the same structure every time, I wanted a reusable, drop-in component where I could just pass in data and quickly choose the layout style I needed.&lt;/p&gt;

&lt;p&gt;That’s how react-native-unilist was born.&lt;/p&gt;

&lt;p&gt;What is react-native-unilist?&lt;br&gt;
react-native-unilist is a customizable and lightweight component that simplifies how lists are rendered in React Native. It wraps common use cases for FlatList and ScrollView but gives you layout presets like cards, horizontal lists, and minimal rows — so you can build consistent UIs faster.&lt;/p&gt;

&lt;p&gt;All you need to do is pass your data, define keys (like titleKey or subtitleKey), and choose the type of list you want — no need to configure FlatList from scratch.&lt;/p&gt;

&lt;p&gt;Key Features&lt;br&gt;
Multiple List Types: Support for card, horizontal, list, minimal, and more&lt;/p&gt;

&lt;p&gt;Fast Setup: Pass in data and props — no extra boilerplate&lt;/p&gt;

&lt;p&gt;Clean Design: Comes with ready-made styles that work out of the box&lt;/p&gt;

&lt;p&gt;Flexible &amp;amp; Reusable: Easily integrates into any React Native project&lt;/p&gt;

&lt;p&gt;Ideal for MVPs and Production Apps: Build faster with fewer bugs&lt;/p&gt;

&lt;p&gt;Installation&lt;br&gt;
You can install the library with:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
npm install react-native-unilist&lt;br&gt;
or&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
yarn add react-native-unilist&lt;br&gt;
Basic Example&lt;br&gt;
tsx&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
import { UniList } from 'react-native-unilist';&lt;/p&gt;

&lt;p&gt;const data = [&lt;br&gt;
  { id: '1', title: 'React Native', subtitle: 'Cross-platform framework' },&lt;br&gt;
  { id: '2', title: 'Expo', subtitle: 'Toolchain for quick dev' },&lt;br&gt;
];&lt;/p&gt;

&lt;p&gt;export default function App() {&lt;br&gt;
  return (&lt;br&gt;
    
      data={data}&lt;br&gt;
      type="card" // Other types: 'horizontal', 'minimal', etc.&lt;br&gt;
      titleKey="title"&lt;br&gt;
      subtitleKey="subtitle"&lt;br&gt;
      onPressItem={(item) =&amp;gt; console.log('Clicked:', item)}&lt;br&gt;
    /&amp;gt;&lt;br&gt;
  );&lt;br&gt;
}&lt;br&gt;
You don’t need to configure FlatList or apply conditional layouts — UniList handles it internally based on the type you provide.&lt;/p&gt;

&lt;p&gt;When Should You Use This?&lt;br&gt;
This library is ideal if:&lt;/p&gt;

&lt;p&gt;You need card-based or horizontal scrolling lists&lt;/p&gt;

&lt;p&gt;You're prototyping and want faster UI rendering&lt;/p&gt;

&lt;p&gt;You want cleaner, DRY code for lists&lt;/p&gt;

&lt;p&gt;You want one component to work across multiple screens with different styles&lt;/p&gt;

&lt;p&gt;Available List Types&lt;br&gt;
You can currently use:&lt;/p&gt;

&lt;p&gt;card – Material-style cards with padding&lt;/p&gt;

&lt;p&gt;horizontal – Side-scrollable rows&lt;/p&gt;

&lt;p&gt;minimal – Simple rows, ideal for settings/profile&lt;/p&gt;

&lt;p&gt;list – Traditional list with dividers&lt;/p&gt;

&lt;p&gt;What's Coming Next?&lt;br&gt;
I'm actively maintaining the project and plan to add:&lt;/p&gt;

&lt;p&gt;Custom renderers for more advanced use cases&lt;/p&gt;

&lt;p&gt;Support for image thumbnails&lt;/p&gt;

&lt;p&gt;Better accessibility and animation hooks&lt;/p&gt;

&lt;p&gt;You’re welcome to open issues or contribute directly on GitHub.&lt;/p&gt;

&lt;p&gt;Links and Resources&lt;br&gt;
📦 NPM: &lt;a href="https://www.npmjs.com/package/react-native-unilist" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/react-native-unilist&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 GitHub: &lt;a href="https://github.com/SamadK01/react-native-unilist" rel="noopener noreferrer"&gt;https://github.com/SamadK01/react-native-unilist&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👨‍💻 Author: Samad Khalid – LinkedIn&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;br&gt;
If you’re tired of duplicating FlatList code and want a simpler, more readable way to render lists in React Native, give react-native-unilist a try. It’s beginner-friendly, production-ready, and designed with flexibility in mind.&lt;/p&gt;

&lt;p&gt;I built this library to solve a problem I was personally facing — and I hope it helps you as much as it’s helped me and my team.&lt;/p&gt;

&lt;p&gt;If you like it, star the repo, contribute, or just drop feedback. Thanks for reading!&lt;/p&gt;

&lt;p&gt;Ready to try it?&lt;br&gt;
➡️ npm install react-native-unilist&lt;br&gt;
and start building faster lists today.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
