<?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: Abdullah Javed</title>
    <description>The latest articles on DEV Community by Abdullah Javed (@habdullahjaved).</description>
    <link>https://dev.to/habdullahjaved</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1737856%2Fcbc42eaa-a00a-4802-a920-cc5fa40d8d70.jpeg</url>
      <title>DEV Community: Abdullah Javed</title>
      <link>https://dev.to/habdullahjaved</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/habdullahjaved"/>
    <language>en</language>
    <item>
      <title>Fetch data with parameters from async thunk</title>
      <dc:creator>Abdullah Javed</dc:creator>
      <pubDate>Sat, 06 Jul 2024 10:19:16 +0000</pubDate>
      <link>https://dev.to/habdullahjaved/fetch-data-with-parameters-from-async-thunk-4amn</link>
      <guid>https://dev.to/habdullahjaved/fetch-data-with-parameters-from-async-thunk-4amn</guid>
      <description>&lt;p&gt;Want to fetch data by parameters unable to fetch why ??&lt;/p&gt;

&lt;p&gt;export const getdataById = createAsyncThunk(&lt;br&gt;
  "bus/getdataById",&lt;br&gt;
  async (data, { rejectWithValue }) =&amp;gt; {&lt;br&gt;
    try {&lt;br&gt;
      const response = await axios.get(&lt;code&gt;${API_Link}getdatabyId&lt;/code&gt;,  {&lt;br&gt;
        params:{&lt;br&gt;
          id: data.id,&lt;br&gt;
        },&lt;br&gt;
        headers: {&lt;br&gt;
          "Content-Type": "application/json",&lt;br&gt;
          Accept: "application/json",&lt;br&gt;
        },&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  },data.id);
  return response.data;
} catch (error) {
  return rejectWithValue(error.response.data.message || error.message);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
);&lt;/p&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
