<?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: RaFi</title>
    <description>The latest articles on DEV Community by RaFi (@frontendrafi).</description>
    <link>https://dev.to/frontendrafi</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%2F1008775%2Fd52aca23-b919-489d-8661-378edbf24ad4.png</url>
      <title>DEV Community: RaFi</title>
      <link>https://dev.to/frontendrafi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/frontendrafi"/>
    <language>en</language>
    <item>
      <title>How to fix "Expression produces a union type that is too complex to represent. ts(2590)"?</title>
      <dc:creator>RaFi</dc:creator>
      <pubDate>Mon, 13 Mar 2023 20:22:04 +0000</pubDate>
      <link>https://dev.to/frontendrafi/how-to-fix-expression-produces-a-union-type-that-is-too-complex-to-represent-ts2590-dk2</link>
      <guid>https://dev.to/frontendrafi/how-to-fix-expression-produces-a-union-type-that-is-too-complex-to-represent-ts2590-dk2</guid>
      <description>&lt;h2&gt;
  
  
  the short solution
&lt;/h2&gt;

&lt;p&gt;__&lt;em&gt;For anyone that doesn't work the accepted solution try to delete the **node_modules **folder in your project and run again _npm install&lt;/em&gt; or yarn install&lt;/p&gt;

&lt;p&gt;Running both commands was triggering the issue for me._&lt;/p&gt;

&lt;h2&gt;
  
  
  and long solution
&lt;/h2&gt;

&lt;p&gt;the problem is after define chakra/ui tag has a red line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Flex } from '@chakra-ui/react';
  &amp;lt;Flex bg="white" height="42px" padding="6px 12px"&amp;gt;
Navbar

    &amp;lt;/Flex&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Open a JavaScript or TypeScript file in VS Code.
In the VS Code command palette (F1 is the shortcut by default), run the TypeScript: Select TypeScript version command.
Make sure you have Use workspace version selected&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also you could check this answer for @mui/material relative error&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unhandled Rejection (FirebaseError): No document to update</title>
      <dc:creator>RaFi</dc:creator>
      <pubDate>Mon, 06 Mar 2023 17:50:25 +0000</pubDate>
      <link>https://dev.to/frontendrafi/unhandled-rejection-firebaseerror-no-document-to-update-4agf</link>
      <guid>https://dev.to/frontendrafi/unhandled-rejection-firebaseerror-no-document-to-update-4agf</guid>
      <description>&lt;p&gt;When i creating my twitter clone with nextjs i got this error and it takes my 10 hours ,but luckily i got solution in my mind &lt;br&gt;
my code was&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const imageRef = ref(storage, `posts/${docRef.id}/image`);
 //setselctedfile is an error
 if(selectedFile){
  await uploadString(imageRef, selectedFile ,"data_url").then(async()=&amp;gt;{
    const downloadURL = await getDownloadURL(imageRef);
  await updateDoc(doc(db, "posts", docRef.id),{
    image:downloadURL
  }

  );
  });
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then i change updateDoc to onSnapshot&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const imageRef = ref(storage, `posts/${docRef.id}/image`);
 //setselctedfile is an error
 if(selectedFile){
  await uploadString(imageRef, selectedFile ,"data_url").then(async()=&amp;gt;{
    const downloadURL = await getDownloadURL(imageRef);
  await onSnapshot(doc(db, "posts", docRef.id),{
    image:downloadURL
  }

  );
  });
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;that's work for me .&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
