<?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 Next Dev on Medium]]></title>
        <description><![CDATA[Stories by Next Dev on Medium]]></description>
        <link>https://medium.com/@nextdev1111?source=rss-898139d30721------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kD5AJk-5HnPg2kMZXaJhNw.png</url>
            <title>Stories by Next Dev on Medium</title>
            <link>https://medium.com/@nextdev1111?source=rss-898139d30721------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:40:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nextdev1111/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[What things I learned in 2022 as a full stack developer]]></title>
            <link>https://nextdev1111.medium.com/what-things-i-learned-in-2022-as-a-full-stack-developer-1015cd49ef31?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/1015cd49ef31</guid>
            <category><![CDATA[opportunity]]></category>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[content-creation]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Fri, 13 Jan 2023 16:20:10 GMT</pubDate>
            <atom:updated>2023-01-13T16:20:10.918Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJK3Md6fB68xtXEuz5M1xQ.jpeg" /></figure><p>2022 was a year that taught me various things about various topics like startups, the stock market, coding, etc. Genuinely talking, I improved this year as I realized that reality is very different from what one thinks. Read till the end and I will tell you my amazing story.</p><h3>🧐Connecting Dots</h3><p>In these 5 months, I spent most of my time making videos and blogs on self-help topics such as <em>how to deal with anxiety.</em> I gained a lot of experience in writing content and also structuring my content in a way which is simple for viewers to understand and learn from it. I didn’t know that making videos on self-help videos will help me while I was making videos on coding topics such as How to use supabase auth.</p><blockquote>You cannot connect dots looking forward, you can only connect them looking backward. — Steve Jobs</blockquote><p>During these months, my board exams (exams conducted in India for high school students) were also conducted in which I performed lethargically (badly) and you can imagine how I performed with the example that when I was having a science exam the day after, I was learning MongoDB. I was interested in scoring the highest marks in the exams as others do as I don’t find any practical knowledge in those exams. But I learned it hard way that I needed to score high but no worries about the past 🤓.</p><h3>💪Startup trap</h3><p>I was one of those who were building a startup without even having an idea. It sounds pretty unobvious but having spent time in that trap I learned many things which would have wasted my time in the future. The lessons I learned are written below:</p><ol><li>💪 It’s not easy to do a startup.</li><li>🧮 If your startup is not solving any real problem, you are just wasting your time.</li><li>❓If you have self-doubt about your startup then you need to analyze it before it’s too late.</li><li>🎥 Many influencers didn’t do any business themselves but they will try to teach you how to do business.</li><li>📚 Practical knowledge is equal to or more important than the knowledge we gain from books. Eg If you went to a place, you can better understand it than the person who read about it.</li><li>💰 If it was so easy to make money, why didn’t the whole world become rich?</li></ol><blockquote>Your idea doesn’t matter until you execute it in the right manner. — Ashneer Grover</blockquote><h3>🤩Youtube</h3><p>In May, I finally decided to open a YouTube channel and blogging website (on hashnode, medium, <a href="http://dev.to/">dev.to</a>) through which we help people learn to code. I was facing a problem with setting up supabase auth in my app so I thought why not make a video about it in Hindi? That’s where I got started.</p><p>My channel’s growth was amazing compared to my previous YouTube channels. So I just started putting more videos on it. I also started learning new things such as railway (for Postgres database hosting) to upload its videos on YouTube. In simple words, opening a channel on YouTube also improved my development skills. Moreover, if I want to teach something, I first deep dive into it. This habit of diving deep into a topic and then explaining it to the viewers helps me a lot in becoming a better researcher.</p><h3>😍Career</h3><p>It does not matter what skill I know, my parents wanted me to have a degree. So, I decided commerce with maths as my stream. Now, many of you will be thinking 💭 why did he choose that stream even having spent so much time coding? Your question is obvious and the following are the reasons:</p><ol><li>🏦 I wanted to become a stock market investor and spend some part of my life researching markets and businesses.</li><li>🌴 Economics attracts me. Seriously, this subject just made me hook into this stream. Apart of the school syllabus I am used to reading books like (Principles for dealing with world changing order)<a href="https://amzn.to/3GEl49y">https://amzn.to/3GEl49y</a>.</li><li>💰 As I have told you, I was trapped in a startup trap which also influenced me to take this stream. I wanted to have adequate time for building my startup but when I got into the section, I realized the reality and changed myself as soon as possible.</li></ol><h3>🥳Opportunities</h3><p>After reading till here, you can judge that my interests are finance, economics (including history, psychology) and the most important one that is engineering. By the way, for me, engineering is creating a valuable solution that helps people rather than getting a degree.</p><p>So for me, I see opportunities for myself in the following areas:</p><ol><li>Data Scientist</li><li>Machine Learning expert</li><li>Fund Manager</li><li>Blockchain developer</li><li>Business around any of these things: <strong>AI, Investing, Blockchain</strong></li></ol><h3>⛓️Why am I learning blockchain?</h3><p>Blockchain can be a future technology as it can be used to solve many industrial problems such as resource allocation and corruption. I am betting on this technology’s usability in the industry. If this technology works out, then I am going to rock in the industry. By the way, at the time of writing this blog, I am learning blockchain from a blockchain expert (NOT sponsored) — <a href="https://www.algoexpert.io/content#blockchainexpert">https://www.algoexpert.io/content#blockchainexpert</a>.</p><p>I hope you have liked this blog. This blog doesn’t include all of my 2022’s events but I tried to teach you the most important lessons that I learned in the year.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1015cd49ef31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Arrays in JavaScript ️]]></title>
            <link>https://nextdev1111.medium.com/understanding-arrays-in-javascript-%EF%B8%8F-df901f45320e?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/df901f45320e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[arrays]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Fri, 23 Dec 2022 07:38:10 GMT</pubDate>
            <atom:updated>2022-12-23T07:38:10.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-hxOLooGVHGZL1eS5-a9w.jpeg" /></figure><p>If you understand Hindi 👇</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fg1lLjD6Vj2w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dg1lLjD6Vj2w&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fg1lLjD6Vj2w%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/251b6883f14125e4f9ec02f2f7917b14/href">https://medium.com/media/251b6883f14125e4f9ec02f2f7917b14/href</a></iframe><p>Let’s start the blog 🎯🎯🎯🎯</p><h4>🤔What are Arrays?</h4><p>Arrays are simply lists. Basically an array is an object which is used to store multiple values with their indexes in a single variable.</p><p>The values inside an array is known as <strong>Elements.</strong></p><h4>🍌Why do we need it?</h4><p>Let’s suppose you are going to a super market to buy fruits. You want to declare a variable <em>in JavaScript </em>which stores the name of the fruit you have bought, with that stored, you also want to store which fruit you have bought at which order. Eg: You first bought oranges, then apples, then bananas. So how will you tackle this problem?</p><p>🥳You can create an array for that.</p><pre>// 👇 array with Element --&gt; &#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>console.log(fruits)<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39; ]<br>*/</pre><h4>🏵️Understanding Arrays</h4><p>Each element in an array have an index number. The catch here is that the index number start from 0.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]</pre><p>👆In the code, oranges will have 0 index number, apples will have 1 index number, bananas will have 2 index number.</p><p>You can get an element in the array by giving it’s index number.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>console.log(fruits[0])</pre><h4>😏Spread Function in Arrays</h4><p>Spread function works in arrays same way it works in objects</p><pre>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;grapes&#39;]<br><br>// 👇 ... will spread the elements of fruits in moreFruits<br>const moreFruits = [&#39;bananas&#39;, &#39;watermelons&#39;, ...fruits]<br><br>console.log(moreFruits);</pre><h4>🔪Destructuring in Arrays</h4><pre>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;grapes&#39;]<br><br>const [oranges, apples, grapes] = fruits;<br><br>console.log(oranges, apples, grapes);</pre><h3>🫠Methods in arrays</h3><h4>BASIC1️⃣toString()</h4><p>What if you want to convert your array into a string.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 toString() will convert array into a string<br>console.log(fruits.toString())<br><br>/*<br>Output<br>--&gt; oranges,apples,bananas<br>*/</pre><h4>BASIC2️⃣join()</h4><p>What if you want to print these fruit’s name and have a symbol between them.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 join() will put &#39; + &#39; between the elements of an array.<br>console.log(fruits.join(&#39; + &#39;))<br><br>/*<br>Output<br>--&gt; oranges + apples + bananas<br>*/</pre><h4>BASIC3️⃣pop()</h4><p>What if you want to remove the <strong>last </strong>element of the array.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 pop() will remove the last element from the array<br>fruits.pop()<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;oranges&#39;, &#39;apples&#39;]<br>*/</pre><h4>BASIC4️⃣push()</h4><p>What if you want to add a new element in your array</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 push() will add a new element &#39;grapes&#39; in the array<br>fruits.push(&#39;grapes&#39;)<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;oragnes&#39;,&#39;apples&#39;, &#39;bananas&#39;, &#39;grapes&#39;]<br>*/</pre><p>🛑Notice: It is to be noticed that you can add multiple elements in the push() parameters.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 push() will add a new element &#39;grapes&#39; in the array in the last<br>fruits.push(&#39;grapes&#39;, &#39;peaches&#39;)<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;grapes&#39;, &#39;peaches&#39;]<br>*/</pre><h4>BASIC4️⃣shift()</h4><p>Imagine that you reach your home and your mother shouts at you that the fruit you bought first is not needed. Then what will you do</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 shift() will remove the first element and shift all the other elements with a lower index<br>fruits.shift()<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;apples&#39;, &#39;bananas&#39;]<br>*/</pre><h4>BASIC5️⃣unshift()</h4><p>Now imagine that you forgot to bring a fruit which your girlfriend likes, now 🙄 what will you do</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 unshift() will add a new element &#39;strawberries&#39; as the first elemtn and shift all the other elements to a higher index number<br>fruits.unshift(&#39;strawberries&#39;)<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;strawberries&#39;,&#39;apples&#39;, &#39;bananas&#39;]<br>*/</pre><p>🛑Notice: It is to be noticed that you can add multiple elements in the unshift() parameters.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 unshift() will add a new element &#39;strawberries&#39; as the first elemtn and shift all the other elements to a higher index number<br>fruits.unshift(&#39;strawberries&#39;, &#39;peaches&#39;)<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;strawberries&#39;,&#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;]<br>*/</pre><h4>BASIC6️⃣length</h4><p>What if your father asks you how many fruits you have brought</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 length will return the total number of elements in the array<br>console.log(fruits.length);<br><br>/*<br>Output<br>--&gt; 3<br>*/</pre><h4>BASIC8️⃣Changing elements</h4><p>Suppose your sweet young sister want you to carry peaches instead apples (which is a 2nd element) in your bag then how will you replace the 2nd element with peaches.</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 Notice here, if I wanted to change 2nd element,<br>// I have to change element with index number 1<br>// ,because index numbers start from 0.<br>fruits[1] = &#39;peaches&#39;<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;peaches&#39;, &#39;bananas&#39; ]<br>*/</pre><p>🛑Notice: It is to be noticed that you can replace any element at any index number with this method. Just put the index number of the element.</p><h4>BASIC9️⃣delete</h4><p>we need to have an ability to delete an element in the array</p><pre>// 👇 array<br>const fruits= [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 delete the element at the given index number<br>delete fruits[0]<br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &lt;1 empty item&gt;, &#39;apples&#39;, &#39;bananas&#39; ]<br>*/</pre><p>🛑Notice: It is to be noticed that the other elements won’t change their index numbers which means that if we delete an element in between the arrays, the value at the index number of the element will be emtpy.</p><h4>BASIC🔟concat()</h4><p>What if you have two bags of fruits and you want to put fruits from one bag to another in JavaScript.</p><pre>// 👇 array 1<br>const fruits1 = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br>// 👇 array 2<br>const fruits2 = [&#39;peaches&#39;, &#39;watermelon&#39; , &#39;grapes&#39;]<br><br>// 👇 conact() will add elements of fruits 2 in fruits 1.<br>const bucket = fruits1.concat(fruits2)<br><br>console.log(bucket);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;, &#39;watermelon&#39;, &#39;grapes&#39; ]<br>*/</pre><pre>// 👇 array 1<br>const fruits1 = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br>// 👇 array 2<br>const fruits2 = [&#39;peaches&#39;, &#39;watermelon&#39; , &#39;grapes&#39;]<br>// 👇 array 3<br>const fruits3 = [&#39;muskmelon&#39;]<br><br>// 👇 conact() will add elements of fruits 2 and fruits 3 in fruits 1.<br>const bucket = fruits1.concat(fruits2, fruits3)<br><br>console.log(bucket);<br><br>/*<br>Output<br>--&gt; [<br>  &#39;oranges&#39;,<br>  &#39;apples&#39;,<br>  &#39;bananas&#39;,<br>  &#39;peaches&#39;,<br>  &#39;watermelon&#39;,<br>  &#39;grapes&#39;,<br>  &#39;muskmelon&#39;<br>]<br>*/</pre><pre>// 👇 array<br>const fruits1 = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 conact() will add &#39;peaches&#39; in fruits 1.<br>const bucket = fruits1.concat(&#39;peaches&#39;)<br><br>console.log(bucket);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39; ]<br>*/</pre><h4>Medium1️⃣splice()</h4><p>With splice you can <strong>add </strong>or <strong>remove </strong>any element in an array.</p><p><em>Parameters</em></p><ol><li>start number — The first parameter takes an index number at which you want to add or remove the elements.</li><li>delete count — The second parameter takes a count of how many numbers should be deleted from the array at the <strong>start number</strong>(first parameter).</li><li>items — The list of items that will be added after the deletion of elements (depending on<strong> deletion count</strong>) at <strong>start number</strong></li></ol><p>👇 This is an example in which we will remove the bananas from the array.</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 here, at index 2, which is bananas in our array, 1 (deletion count)<br>// element will be deleted.<br>fruits.splice(2, 1)<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39; ]<br>*/</pre><p>👇 This is an example in which we will remove the bananas as well as add peaches to the array</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 here, at index 2, which is bananas in our array, 1 (deletion count)<br>// element will be deleted.<br>fruits.splice(2, 1, &#39;peaches&#39;)<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39;, &#39;peaches&#39; ]<br>*/</pre><p>What if you don’t want to delete anything but add something. Just make the delete count to be 0.</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 here, at index 2, which is bananas in our array, 1 (deletion count)<br>// element will be deleted.<br>fruits.splice(2, 0, &#39;peaches&#39;)<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39; ]<br>*/</pre><h4>Medium2️⃣slice()</h4><p>Slice is used to make a new array which contains some of the elements from the given array.</p><p>Parameters</p><ol><li>Start — The first parameter will decide from which index number, elements should be selected for the new array.</li><li>End — <strong>This is an optional parameter. </strong>This 2nd parameter will decided till which index number, elements should be selected for the new array.</li></ol><p>Notice that start index number will also be included in the new array where as end index number will not be included in the new array.</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;]<br><br>// 👇 slice will select the elements from the index number 1.<br>// As we have not mentioned any end then it will select the elements till the end.<br>const last2elements = fruits.slice(1)<br><br>console.log(last2elements);<br><br>/*<br>Output<br>--&gt; [&#39;apples&#39;, &#39;bananas&#39;]<br>*/</pre><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;, &#39;grapes&#39;]<br><br>// 👇 slice will select the elements from the index number 1 till 2 index number.<br>const elementsSelected = fruits.slice(1,4)<br><br>/*<br>Output<br>--&gt; [&#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;]<br>*/</pre><h4>Easy1️⃣sort()</h4><p>What if you want to sort your fruits alphabetically.</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;, &#39;grapes&#39;]<br><br>fruits.sort()<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [&#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;]<br>*/</pre><h4>Easy2️⃣reverse()</h4><p>What if you want to reverse the order of your fruits.</p><pre>// 👇 array<br>const fruits = [&#39;oranges&#39;, &#39;apples&#39;, &#39;bananas&#39;, &#39;peaches&#39;, &#39;grapes&#39;]<br><br>fruits.reverse()<br><br>console.log(fruits);<br><br>/*<br>Output<br>--&gt; [ &#39;grapes&#39;, &#39;peaches&#39;, &#39;bananas&#39;, &#39;apples&#39;, &#39;oranges&#39; ]<br>*/</pre><h4>🥸Iterations</h4><p>In arrays, if we want to go to every element and do some operation, then we can use <strong>iterations</strong>. It’s basically a loop in which, our function goes and perform some kind of operation.</p><h4>1️⃣forEach()</h4><p>With the help of forEach, we can perform an operation by going to each element of the array.</p><pre>// 👇 array<br>const names = [&#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39;]<br><br>// foreach<br>names.forEach((value, index, array) =&gt; {<br>    console.log(index + &#39; -&gt; &#39; + value);<br>    console.log(array)<br>})<br><br>/*<br>Output<br>--&gt; 0 -&gt; Dhruv<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>1 -&gt; Harshil<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>2 -&gt; Anurag<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>3 -&gt; Mayank<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>*/</pre><h4>🥰Concept</h4><p>What is happening behind forEach() is that the function goes to index number 0 and return us the value, then it goes to index number 1 and returns the value at that index, and so on.</p><p>ForEach() returns a callback function (it is a function which is passed into another function as an argument) which have the parameter as —</p><p>Value — The value at a the index number.</p><p>Index — It is the index number of the value.</p><p>Array — It returns an array on which we are providing iteration.</p><h4>2️⃣Map()</h4><pre>// 👇 array<br>const names = [&#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39;]<br><br>// map<br>names.map((value, index, array) =&gt; {<br>    console.log(index + &#39; -&gt; &#39; + value);<br>    console.log(array)<br>})<br><br>/*<br>Output<br>--&gt; 0 -&gt; Dhruv<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>1 -&gt; Harshil<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>2 -&gt; Anurag<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>3 -&gt; Mayank<br>[ &#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39; ]<br>*/</pre><h4>🥸Difference between map and forEach</h4><p>map() is similar to forEach() but map() has the ability to return something. If you try to use return in forEach() , it won’t work.</p><pre>// 👇 array<br>const names = [&#39;Dhruv&#39;, &#39;Harshil&#39;, &#39;Anurag&#39;, &#39;Mayank&#39;]<br><br>// map<br>const nameMap = names.map((value, index, array) =&gt; {<br>    return index + &#39;-&gt;&#39; + value<br>})<br><br>console.log(nameMap);<br><br>/*<br>Output<br>--&gt; 0 -&gt; Dhruv<br>[ &#39;0-&gt;Dhruv&#39;, &#39;1-&gt;Harshil&#39;, &#39;2-&gt;Anurag&#39;, &#39;3-&gt;Mayank&#39; ]<br>*/</pre><h4>3️⃣Reduce()</h4><p>What if you created a list of numbers and you want that all the numbers in your list should be added and one single number should be returned.</p><p><strong>Parameters</strong></p><p>a. Callback function — It has following parameters</p><ol><li>Previous number — It works as an accumulator.</li><li>Current Value</li><li>current Index</li><li>array</li></ol><p>b. Default value of previous number — This is the value which you provide as default value for the previous number.</p><pre> // 👇 array<br>const numbers = [1, 2, 10, 25]<br><br>// reduce<br>const sum = numbers.reduce((previousNumber, currentValue, currentIndex, array) =&gt; {<br>    console.log(previousNumber, currentValue)<br>    return previousNumber + currentValue;<br>}, 0) // 👈 0 is the default value<br><br>console.log(&#39;--&#39;);<br>console.log(sum);<br><br>/*<br>Output<br>--&gt; 0 1<br>1 2<br>3 10<br>13 25<br>--<br>38<br>*/</pre><p>🛑Notice: If you don’t provide a default value to the previous number, which is in our case is 0. Then the reduce function will take first element of the array as the default value and will start looping through from 2nd element.</p><h4>4️⃣IndexOf</h4><p>What if your mother ask you to find index number of a fruit in your bag.</p><pre>// 👇 array<br>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;,&quot;Durian&quot;];<br><br>// indexOf<br>const index = fruits.indexOf(&#39;Hi&#39;)<br>const index2 = fruits.indexOf(&#39;Apple&#39;)<br><br>console.log(index);<br>console.log(index2);<br><br>/*<br>Output<br>--&gt; -1<br>0<br>*/</pre><p>You can notice that if an element doesn’t exit in the array, then the function will return <strong>-1</strong>.</p><h4>5️⃣find</h4><p>Imagine your sister has designed a test in which every fruit will participate and only the fruit which passes the test will be returned.</p><pre>// 👇 array<br>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;,&quot;Durian&quot;, &#39;Apple&#39;];<br><br>// find<br>const apple = fruits.find((value) =&gt; value === &#39;Apple&#39;)<br>const apple2 = fruits.find((value) =&gt; value === &#39;Appl&#39;)<br>console.log(apple);<br>console.log(apple2);<br><br>/*<br>Output<br>--&gt; Apple<br>undefined<br>*/</pre><p>What if you want to find index of these values</p><pre>// 👇 array<br>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;,&quot;Durian&quot;, &#39;Apple&#39;];<br><br>// findIndex<br>const apple = fruits.findIndex((value) =&gt; value === &#39;Apple&#39;)<br>const apple2 = fruits.findIndex((value) =&gt; value === &#39;Appl&#39;)<br>console.log(apple);<br>console.log(apple2);<br><br>/*<br>Output<br>--&gt; 0<br>-1<br>*/</pre><p>You can see that if no element passes the test, then undefined is returned.</p><h4>6️⃣Filter</h4><p>As we saw how find just returns a single element, what if you want a test in which those elements should be removed from the array which <strong>passes </strong>the test.</p><pre>// 👇 array<br>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;,&quot;Durian&quot;, &#39;Apple&#39;];<br><br>// filter <br>const fruitsWithA = fruits.filter((value ) =&gt; value.startsWith(&#39;A&#39;))<br>// 👆 startsWith checks the first letter of the string.<br><br>console.log(fruitsWithA);<br><br>/*<br>Output<br>--&gt; [ &#39;Apple&#39;, &#39;Apple&#39; ]<br>*/</pre><h4><strong>7️⃣includes</strong></h4><p>What if you have bought so many furits and your father asks you if you have brought an apple for him. How will you check that</p><pre>// 👇 array<br>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;,&quot;Durian&quot;, &#39;Apple&#39;];<br><br>// includes<br>const apple = fruits.includes(&#39;Apple&#39;)<br>const grapes = fruits.includes(&#39;grapes&#39;)<br><br>console.log(apple);<br>console.log(grapes);<br><br>/*<br>Output<br>--&gt; true<br>false<br>*/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*QOyjLXjtjM57R5Om" /></figure><p>Thanks for reading this blog.</p><p><a href="https://nextdev1111.hashnode.dev/what-are-objects-and-why-are-they-essential-in-javascript">What are Objects and why are they essential in JavaScript 🤔?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df901f45320e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are Objects and why are they essential in JavaScript ?]]></title>
            <link>https://nextdev1111.medium.com/what-are-objects-and-why-are-they-essential-in-javascript-d5d8b04fc0fe?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5d8b04fc0fe</guid>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[objects]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Mon, 19 Dec 2022 06:46:11 GMT</pubDate>
            <atom:updated>2022-12-20T15:45:02.768Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you know Arrays, null, etc are objects. But they are also different data types. Every object has a prototype by which JavaScript compiler gets to know which properties they inherit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTH9SrBpNTAExL8LJHwmdA.jpeg" /></figure><p>If you understand Hindi, then you can watch 👇 video</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9zeYqTEEqnM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9zeYqTEEqnM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9zeYqTEEqnM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/624232a046d6166781b61c048c2ce65d/href">https://medium.com/media/624232a046d6166781b61c048c2ce65d/href</a></iframe><h4>🤥What is a prototype ?</h4><p>Just go to your browser console and write this following command:</p><pre>const obj = {<br>    name: &#39;Taran&#39;<br>}<br><br>console.log(obj); </pre><p>Most of you would know what would be the output. But most of you also missed something important that was <strong>Prototype.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*n_0pYv1yQSQaeCz7sraqvg.jpeg" /></figure><p>You can see <em>[[Prototype]]. </em>What is it?</p><p>The prototype of an object gives it the inherited properties such as <em>toString</em>, <em>valueOf</em>, etc.</p><h4>🏵️How to get prototype of an object?</h4><p>But how do we add more properties with the existing properties of an object.</p><pre>const obj = {<br>    name: &#39;Taran&#39;<br>}<br><br>// getPrototypeOf will return the prototype of the object.<br>Object.getPrototypeOf(obj).show = &#39;Taran&#39;<br>console.log(obj);</pre><h4><strong>🙋‍♂️Can we make our own property in this prototype?</strong></h4><p>Yes sure you can. But how?</p><pre>const obj = {<br>    name: &#39;Taran&#39;<br>}<br><br>console.log(obj);<br><br><br>// This 👇 will add a new property to your all object&#39;s prototype.<br>Object.prototype.show = &#39;Taran&#39;<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*ttHCzEW9DcRUb682_vYXDA.jpeg" /></figure><p>As you can see that we got a new property in the object.</p><h4>But what if I want to change prototype of a single object.</h4><p>we can do it with</p><pre>const obj = {<br>    name: &#39;Taran&#39;,<br>    /*<br>    👇 We are changing the full prototype which means all the propertie<br>     of an object will be replaced by the following. */<br>    __proto__: {<br>        show: &#39;Hi&#39;,<br>    }<br>}<br><br>console.log(obj);</pre><h4>By the way, 🤔What is prototype chain?</h4><p>As we saw how we can add a new property in the prototype of objects. Now we will see how we can inherient an object as our prototype.</p><p>Now, you can make a chain of prototype inheritence like this.</p><pre><br>const obj = {<br>    name: &#39;Taran&#39;<br>}<br><br>const obj_2 = {<br>    __proto__ : obj<br>}<br><br>// or <br><br>const obj_2_sim = {<br><br>}<br><br>Object.setPrototypeOf(obj_2, obj)<br><br>console.log(obj2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*qAV79dpRDI0UCku0koN4-A.jpeg" /></figure><p>As you can see that prototype of <em>obj1</em> is inherited by prototype of <em>obj2.</em></p><p>I also want to show you something very special.</p><pre>const obj = {<br>    name: &#39;Taran&#39;<br>}<br><br>const obj_2 = {<br>    __proto__ : obj,<br>    getName() {<br>        return this.name // Taran<br>    }<br>}<br><br>obj_2.getName()</pre><p>But what happens when we have one property in two prototypes which are inhereted in a single object. What ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*LJ0-fwVgRdRkVIc62lkcqw.jpeg" /></figure><p>Hey !!, why did it gave ‘Vivek’ as output even though prototype of the obj_2 is having name as ‘Taran’</p><p>This is because everytime we return something, compiler will first check if the top most object which is in our case is obj_2 is having name property of not. If it does, then it returns it else it checks the prototype of the obj.</p><p>In simple words, it’s a chain. Chain starts from top most object to downwards object.</p><p>If you are not able to understand it so deeply, consider being patient and leave it for now. You can always learn it again.</p><h4>🔪What is destructuring?</h4><pre>const person = {<br>    name: &#39;Taran&#39;,<br>    age: 16,<br>    married: false<br>}<br><br>const {name, age} = person<br><br>console.log(name, age); // Taran, 16<br><br><br>// Ojbect destructuring with alias<br><br>const {name: firstName, age: years} = person<br><br>console.log(firstName, years); // Taran, 16</pre><h4>🍌Spread Function</h4><pre>const obj = {<br>    name: &#39;Mayank&#39;,<br>    wife: &#39;Dhruvi&#39;<br>}<br><br>const obj2 = {<br>    obj: obj,<br>    child: &#39;xyz&#39;<br>}<br><br>console.log(obj2); // { obj: { name: &#39;Mayank&#39;, wife: &#39;Dhruvi&#39;}, child: &#39;xyz&#39; }</pre><p>👆 What if you want to combine 2 different objects together. How do we do that?</p><p>We do it with ‘…’ function.</p><pre>const obj = {<br>    name: &#39;Mayank&#39;,<br>    wife: &#39;Dhruvi&#39;<br>}<br><br>const obj2 = {<br>    ...obj,<br>    child: &#39;xyz&#39;<br>}<br><br>console.log(obj2); // { name: &#39;Mayank&#39;, wife: &#39;Dhruvi&#39;, child: &#39;xyz&#39; }</pre><h4>🔗Optional Chaining</h4><p>Before understanding optional chaining. We need to understand chaining.</p><p>example of <strong>Chaining</strong></p><pre>const obj = {name: &#39;Taran&#39;}<br><br>console.log(obj.name) // Taran</pre><p>but what if obj.name is not defined.</p><p>You will get error if you didn’t defined a property but want to get it.</p><p>🤔What’s the solution for it?</p><pre>const obj = {}<br><br>// 👇 `?` will ensure that you don&#39;t get error if name property doesn&#39;t exists.<br>console.log(obj?.name) // undefined</pre><p>🛑Notice: You will get undefined if you try to write obj.name even though you didn’t mention any ‘name’ property in the obj. But when you will make big projects. It will be very useful there.</p><p>If you have any questions regarding any topic in javascript: Feel free to ask here 👇</p><p><a href="https://discord.com/channels/978950292357914695/1050646101126041661">https://discord.com/channels/978950292357914695/1050646101126041661</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5d8b04fc0fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Prisma with express, postgress, and Graphql?]]></title>
            <link>https://nextdev1111.medium.com/how-to-use-prisma-with-express-postgress-and-graphql-d5fb978d9ba3?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5fb978d9ba3</guid>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Mon, 10 Oct 2022 14:01:26 GMT</pubDate>
            <atom:updated>2022-10-19T05:50:38.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8I31oYxt1j8sDSQcrw_LSg.jpeg" /></figure><p>Welcome friends to this new blog. In this blog, you will learn how to set up APIs with the help of an express server. You will learn how to integrate graphql in the express server.</p><p>GitHub link — <a href="https://github.com/nextdev1111/prisma-postgres-graphql-express">https://github.com/nextdev1111/prisma-postgres-graphql-express</a></p><p>Youtube Video in <strong>Hindi — </strong><a href="https://youtu.be/AhNPzf8fHX4">https://youtu.be/AhNPzf8fHX4</a></p><h4>📒Notes</h4><ol><li>I will be using <a href="https://pnpm.io/"><strong>pnpm </strong></a>for this project but the tutorial will show you how to do it with <strong>npm.</strong></li><li>We will be using <strong>typescript </strong>for this project.</li></ol><h4>Step1: 📦 Setup</h4><p>Make a folder by whichever name you want<strong> but you need to consider npm naming restrictions.</strong></p><p>Then run this command</p><pre>npm init -y</pre><p>Make another folder named <strong>src</strong>. Make a file named <strong>index.ts </strong>in the src folder.</p><pre>[root folder]</pre><pre>--- src<br>--- --- index.ts</pre><h4>To install dependencies and setup typescript</h4><p>This will install dependencies 👇</p><pre>npm i @graphql-tools/schema @prisma/client dotenv express graphql express-graphql</pre><p>This will install dev dependencies 👇</p><pre>npm i -D <a href="http://twitter.com/types/dotenv">@types/dotenv</a> <a href="http://twitter.com/types/express">@types/express</a> <a href="http://twitter.com/types/node">@types/node</a> prisma ts-node typescript</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55d7d6cfc3c4a15c3dc2a93170d7fe3b/href">https://medium.com/media/55d7d6cfc3c4a15c3dc2a93170d7fe3b/href</a></iframe><p>Then type 👇 to create a <strong>tsconfig </strong>file.</p><pre>npm install -g typescript</pre><pre>tsc --init</pre><h4>Step2: 🗃️ Prisma Setup with postgress database</h4><p>Type this command in your terminal</p><pre>npm prisma init</pre><p>Prisma will set up two things in your root folder.</p><ol><li>Prisma folder</li><li>.env file</li></ol><p>In the prisma folder, you can find schema.prisma file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4739780db39b7dde077fc9396ad5975e/href">https://medium.com/media/4739780db39b7dde077fc9396ad5975e/href</a></iframe><p>Let’s add a database now.</p><p>go to <a href="https://railway.app/">https://railway.app/</a></p><p>Click on start new project</p><p>You can set up a PostgreSQL database. If you find any problem, you can also watch the youtube video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wman-o5A8gY5apasHoeYiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibCjSmzVRYCvYgxHK6t7DA.png" /></figure><p>Then, you should copy the postgresql database connection key</p><p>Then go to .env your project’s root folder.</p><p>Then change the connection string in your .env file.</p><p>→ Remember to also include the password in the connection string.</p><p>Then type</p><pre>prisma db push</pre><p>⚠️Errors</p><p>If you face any errors, you should check the <strong>connection string.</strong></p><h4>Step3: ✨Express Server</h4><p>This is the basic express server</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3309b172c02e355f1ac5540acc608796/href">https://medium.com/media/3309b172c02e355f1ac5540acc608796/href</a></iframe><p>If you want to add an entry to your database.</p><p>You can also use prisma studio</p><pre>npm prisma studio</pre><h4>Step4: 💪Grahpql Integration</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0936de7eb6348aacc52920fab9edfa0/href">https://medium.com/media/b0936de7eb6348aacc52920fab9edfa0/href</a></iframe><p>You can use graphiql on this path</p><pre><a href="http://localhost:3000/graphql">http://localhost:3000/graphql</a></pre><p>If you want to ask any questions, feel free to ask 👇</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5fb978d9ba3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter:  How to Update and Delete Data in Supabase || Part — 4]]></title>
            <link>https://nextdev1111.medium.com/flutter-how-to-update-and-delete-data-in-supabase-part-4-675bf3f8fcbc?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/675bf3f8fcbc</guid>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[supabase]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Sun, 31 Jul 2022 07:11:26 GMT</pubDate>
            <atom:updated>2022-07-31T07:11:26.498Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter: 🔴 How to Update and Delete Data in Supabase || Part — 4</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RN91u85YBduRm78B_VQA-Q.jpeg" /></figure><p>Hey there 👋, in this blog post, you will learn how to <strong>update </strong>and <strong>delete </strong>the data in supabase using flutter packages (supabase_flutter).</p><p>If you want to know how to use supabase in flutter</p><p><a href="https://medium.com/@nextdevelopment1111/list/0ab24501c08f">Flutter Supabase</a></p><p>If you understand Hindi 👇</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0XrdfXh3O0c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0XrdfXh3O0c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0XrdfXh3O0c%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2853299b2d385c2db774e55249400873/href">https://medium.com/media/2853299b2d385c2db774e55249400873/href</a></iframe><p>Now, let’s begin with update and delete functions</p><p>Please continue this blog if you are familiar with this one 👇</p><p><a href="https://medium.com/@nextdevelopment1111/flutter-how-to-create-and-read-data-future-builder-part-3-15554b0afbb8">Flutter: 🔴 How to Create and Read data || Future Builder || Part — 3</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/82529232c2a379f65a12eab30bbc162d/href">https://medium.com/media/82529232c2a379f65a12eab30bbc162d/href</a></iframe><p>This is the read screen.</p><p>In the part -3 , I just showed how to load the data. But in this part, you will learn how to delete and update the data.</p><p>Delete Button → You can see Delete button in the <strong>trailing </strong>of the list tile.</p><p>Update Button → You can see this in <strong>onTap </strong>of the list tile.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec93000a9da34ba0aa3084e37f6400d2/href">https://medium.com/media/ec93000a9da34ba0aa3084e37f6400d2/href</a></iframe><p>Now comes, the edit screen</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b7a1cfe9005520833c95cc22eb6fc4a/href">https://medium.com/media/9b7a1cfe9005520833c95cc22eb6fc4a/href</a></iframe><p>If you have any question, feel free to ask here 👇</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=675bf3f8fcbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter:  How to Create and Read data || Future Builder || Part — 3]]></title>
            <link>https://nextdev1111.medium.com/flutter-how-to-create-and-read-data-future-builder-part-3-15554b0afbb8?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/15554b0afbb8</guid>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[nextdev]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 13:20:16 GMT</pubDate>
            <atom:updated>2022-07-31T07:13:14.564Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter: 🔴 How to Create and Read data || Future Builder || Part — 3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uIvwF5zrCx5LVVXRdD0M0A.jpeg" /></figure><p>Hey there 👋, in this blog post, you will learn how to create and read the data in supabase using flutter packages (supabase_flutter).</p><p>If you understand Hindi 👇</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLIwo8ylJElc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLIwo8ylJElc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLIwo8ylJElc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/66e0595bd8b89d665f49caa902442a25/href">https://medium.com/media/66e0595bd8b89d665f49caa902442a25/href</a></iframe><p>Firstly, you need to set up supabase in a flutter. So for that, you need to read this 👇 article.</p><p><a href="https://medium.com/@nextdevelopment1111/how-to-use-supabase-database-in-flutter-part-1-56c87668d0f0">How to use supabase database in flutter || 🔴 Part — 1</a></p><p>Step1: You need to make a table for the supabase database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndGHIMFbah3yJf_9v36jVw.png" /></figure><p>Step2: Now you need to make a todo.dart file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52f995fab3fedcc70cf87862c8948917/href">https://medium.com/media/52f995fab3fedcc70cf87862c8948917/href</a></iframe><p>You can make models.dart file in the <strong>model </strong>folder.</p><pre>export &#39;todo.dart&#39;;</pre><p>Step3: Now, you need to make a supabase_data_manager.dart’ in the <strong>data folder</strong> in the <strong>utils folder. eg 👇</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QE2W5YQrTzYUUWx28utshg.jpeg" /></figure><p>Now you can use this code 👇</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7aa458e1f1f360545b1a66c071850646/href">https://medium.com/media/7aa458e1f1f360545b1a66c071850646/href</a></iframe><p>Then you can make a utils.dart file in the utils folder.</p><pre>// from data</pre><pre>export &#39;data/supabase_data_manager.dart&#39;;</pre><p>Now, you need to make a screens folder.</p><p>there are 3 files in the screens folder</p><ol><li>Create Screen — ‘create_screen.dart’</li><li>Read Screen — ‘read_screen.dart’</li><li>screens.dart for exporting the above screens</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aa9701d92d42ae7388984f20d181782a/href">https://medium.com/media/aa9701d92d42ae7388984f20d181782a/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/223c4a3ceda780b0a409bba58b91f618/href">https://medium.com/media/223c4a3ceda780b0a409bba58b91f618/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d12c3fc02a2de634461675c720f7a0c7/href">https://medium.com/media/d12c3fc02a2de634461675c720f7a0c7/href</a></iframe><p>Now, you can switch the screens in the main. dart.</p><p>Example</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0f2d0a3e865e30880c23c310b9b639a6/href">https://medium.com/media/0f2d0a3e865e30880c23c310b9b639a6/href</a></iframe><p>Thanks for reading this blog. You can now try it out.</p><p>If you want to how to update and delete data 👇</p><p><a href="https://medium.com/@nextdevelopment1111/flutter-how-to-update-and-delete-data-in-supabase-part-4-675bf3f8fcbc">Flutter: 🔴 How to Update and Delete Data in Supabase || Part — 4</a></p><p>If you have any questions, feel free to ask here 👇</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15554b0afbb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup supabase authentication in a flutter app with deep linking||  Part — 2]]></title>
            <link>https://nextdev1111.medium.com/how-to-setup-supabase-authentication-in-a-flutter-app-with-deep-linking-part-2-90625974a6a6?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/90625974a6a6</guid>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[deep-linking]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[supabase]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Sun, 17 Jul 2022 04:41:28 GMT</pubDate>
            <atom:updated>2022-07-17T04:41:28.434Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to setup supabase authentication in a flutter app with deep linking|| 🔴 Part — 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z23IjETabtmVE9ThHvnrlg.jpeg" /></figure><p>Welcome friends to this blog post where you will learn how to set up the supabase authentication in the flutter app. Moreover, the deep link is also available.</p><p>The people who understand Hindi 👇</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDLyp4g4yvwY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDLyp4g4yvwY&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/58561651530005376a00a7aa5e625d27/href">https://medium.com/media/58561651530005376a00a7aa5e625d27/href</a></iframe><p>If you didn’t setup the supabase in your app, then follow this previous blog where you learn how to setup supabase 👇</p><p><a href="https://medium.com/@nextdevelopment1111/how-to-use-supabase-database-in-flutter-part-1-56c87668d0f0">How to use supabase database in flutter || 🔴 Part — 1</a></p><p>You can follow this GitHub repository</p><p><a href="https://github.com/nextdev1111/flutter-supabase-authentication">GitHub - nextdev1111/flutter-supabase-authentication</a></p><p>So, let us come to the app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b8a34fe79e13cea9f30dc4e0df136ec/href">https://medium.com/media/3b8a34fe79e13cea9f30dc4e0df136ec/href</a></iframe><p>Now we will make the screens in screens folder</p><p>First we need to auth manager, auth state, auth required state in<strong> utils folder</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b422a201ae8fd70c0b08c90d29fce945/href">https://medium.com/media/b422a201ae8fd70c0b08c90d29fce945/href</a></iframe><p>This is auth state 👇 which you can use to load the data of the user from supabase. If you face any problem, feel free to ask me at discord. Link at the last.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/551927225e4bb681187ceaa54f812d58/href">https://medium.com/media/551927225e4bb681187ceaa54f812d58/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f26d81ce842fc3163b63468da1f9825/href">https://medium.com/media/6f26d81ce842fc3163b63468da1f9825/href</a></iframe><p>There are 3screens in <strong>screens </strong>folder.</p><ol><li>Home screen (user should be authenticated)</li><li>Login Screen</li><li>Splash Screen</li></ol><p>This is the splash screen 👇 which will initilize when the user opens the app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52e75ebf9f43306940d00b7c09cf6637/href">https://medium.com/media/52e75ebf9f43306940d00b7c09cf6637/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/54981d125edb5fc2bd90841b15375b24/href">https://medium.com/media/54981d125edb5fc2bd90841b15375b24/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b67157882d851aeffbc0e0016262a904/href">https://medium.com/media/b67157882d851aeffbc0e0016262a904/href</a></iframe><p>Now, you need to add snack bars for notifying user.</p><p>make this constants.dart in <a href="https://gist.github.com/studywithdesign/e3b72ad62145760367fb8ccd872db180">contstants </a>folder.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b41c0c5f6b1f609b5a858e901077901/href">https://medium.com/media/7b41c0c5f6b1f609b5a858e901077901/href</a></iframe><p>Now, let’s go to android manifest for adding deep link.</p><p>Add this <strong>full </strong>code in the file. Don’t just copy the data line, but copy full intent filter.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/673e8007819f5118fa0a6f110b407980/href">https://medium.com/media/673e8007819f5118fa0a6f110b407980/href</a></iframe><p>In IOS, add this <strong>full </strong>code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a3d28669f7b68cc8e96ed11a1f39719/href">https://medium.com/media/4a3d28669f7b68cc8e96ed11a1f39719/href</a></iframe><p>Now, the last step is left</p><p>go to your supabase project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpGyArGKFxcwMz7ZQTD6TQ.jpeg" /></figure><p>Now, first close your app and then re run it. Your deep link will work only then.</p><p>Feel free to ask your questions here 👇</p><p><a href="https://discord.com/invite/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90625974a6a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use supabase database in flutter ||  Part — 1]]></title>
            <link>https://nextdev1111.medium.com/how-to-use-supabase-database-in-flutter-part-1-56c87668d0f0?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/56c87668d0f0</guid>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Sun, 10 Jul 2022 07:17:23 GMT</pubDate>
            <atom:updated>2022-07-10T07:20:18.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to use supabase database in flutter || 🔴 Part — 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3okDXx4P7ExrQ08v9oHh3A.jpeg" /></figure><p>Welcome friends to this blog post where you will learn how to use the supabase database in a flutter app.</p><p>For people who understand Hindi:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1QzT_y-BioU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1QzT_y-BioU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1QzT_y-BioU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fa3d6a2d1917aa74421b81e53c5958f/href">https://medium.com/media/6fa3d6a2d1917aa74421b81e53c5958f/href</a></iframe><p>Step1: Go to <a href="https://supabase.com/">supabase.com</a> and click on start project and then this 👇page will appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*t0s88QA8J3RzjGWi.png" /></figure><p>You can be signing by creating a GitHub account on <a href="https://github.com/">github.com</a> and then go back to supabase and sign in.</p><p>Step2: Click on New Project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*RPDuhuG_Y6vjD-cG.png" /></figure><p>Then it will ask you to create a new project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*DHTinOwxSN3iqgwR.png" /></figure><p>Name: You can type any name of the database. You can also change the name later on.</p><p>Database Password: This is a permanent password so please don’t do any mistakes here. You cannot change or get the password of the database again. So save it somewhere.</p><p>Region: Select any region that is near you. This will boost your performance.</p><p>Project Tier: For now, just select the free tier, and when you need you can also upgrade it.</p><p>Then click create a new project. It will take some time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mDLYWxPUf2JjRBOb.png" /></figure><p>So, our supabase setup has been done.</p><h4>Now, we need to set up a supabase in our flutter app.</h4><p>step1: Go to your flutter app and then make a .env file in root dir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6XyGAPb3I-5UclfDPstLmA.jpeg" /></figure><p>write these statements in your flutter .env file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8831034e19da1baba0b40e618d5220b/href">https://medium.com/media/a8831034e19da1baba0b40e618d5220b/href</a></iframe><p>You can find these here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IENzUZuGnkTMiiAtmwv3VA.jpeg" /></figure><p>Then you need to download these two packages in flutter</p><ul><li><a href="https://pub.dev/packages/supabase_flutter">supabase_flutter | Flutter package</a></li><li><a href="https://pub.dev/packages/flutter_dotenv">flutter_dotenv | Flutter package</a></li></ul><p>Then you need to configure .env file in your pubspec.yaml.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/72e2c9e72e2708fd0d0278bafed13172/href">https://medium.com/media/72e2c9e72e2708fd0d0278bafed13172/href</a></iframe><p>First, we need to insert data in supabase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qry_5sPYBhUMhXh5k8o7Iw.png" /></figure><p>Now, let’s go to main.dart</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c84aed13d3fd206d8059e0410b983aa/href">https://medium.com/media/4c84aed13d3fd206d8059e0410b983aa/href</a></iframe><p>Now, you can test it. By the way,<strong> initState() </strong>is for doing things when the page loads in the app. In simple words, anything in the initState will run at the moment the screen widget loads.</p><p>If you face any issues, feel free to ask here 👇</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56c87668d0f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use recoil effects_unstable for loading data from API.]]></title>
            <link>https://nextdev1111.medium.com/how-to-use-recoil-effects-unstable-for-loading-data-from-api-4b020af32333?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b020af32333</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[nextdev]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[recoil]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 11:35:12 GMT</pubDate>
            <atom:updated>2022-10-25T07:08:38.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n_KOXPrPQ8tnw89ImahgJQ.jpeg" /></figure><p>Welcome friends 👋, to this new blog post where you will learn how to use effects_unstable for fetching the data from an API.</p><p>For people who know Hindi:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjJnOjPDYyyI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjJnOjPDYyyI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjJnOjPDYyyI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/23625df1b10448b2d9feca3bceb2da95/href">https://medium.com/media/23625df1b10448b2d9feca3bceb2da95/href</a></iframe><p>In this blog, I will use this API — <a href="https://jsonplaceholder.typicode.com/todos">https://jsonplaceholder.typicode.com/todos</a></p><h4>🤔Situation</h4><p>Suppose I have a website for making todos where I want to load the todos from an API. So, how will I do it with recoil?</p><p>Moreover, your project manager gave you this project which uses Nextjs as its framework and has made these files before 👇</p><p>atoms/atoms.ts</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84a3664326790a8843f6197a16cf972c/href">https://medium.com/media/84a3664326790a8843f6197a16cf972c/href</a></iframe><p>Index.ts file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/842f80c4a95c36b34a37c0c2374da5ca/href">https://medium.com/media/842f80c4a95c36b34a37c0c2374da5ca/href</a></iframe><h4>🥳Solution to load the data</h4><p>we have two methods</p><h4>Method 1️⃣— Effects_unstable</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af7693a856fc45f5b6999e09f9283504/href">https://medium.com/media/af7693a856fc45f5b6999e09f9283504/href</a></iframe><h4>Method 2️⃣— Effects_unstable in selectors</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9adc011ae2ecb786b3fd667164e4a259/href">https://medium.com/media/9adc011ae2ecb786b3fd667164e4a259/href</a></iframe><h4>⚠️Concerns</h4><p>If you are using frameworks like nextjs then you need to know something unique and that is that <strong>recoil loads the data by serverside rendering which makes the website load slow.</strong></p><p>For any questions, feel free to ask here 👇</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b020af32333" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to persist the data in atoms with local storage using recoil persist.]]></title>
            <link>https://nextdev1111.medium.com/how-to-persist-the-data-in-atoms-with-local-storage-using-recoil-persist-64ae8c1c2b54?source=rss-898139d30721------2</link>
            <guid isPermaLink="false">https://medium.com/p/64ae8c1c2b54</guid>
            <category><![CDATA[recoil]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[nextdev]]></category>
            <dc:creator><![CDATA[Next Dev]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 05:07:19 GMT</pubDate>
            <atom:updated>2022-07-03T05:07:19.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QnLRDOTzfjO5oTK0NzHeGg.jpeg" /></figure><p>Welcome friends 👋. In this blog post, you will learn how to persist the data in local storage in recoil.</p><p>For people, who understand Hindi</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FHLt512RmLEM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHLt512RmLEM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FHLt512RmLEM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/03dd4701e4264fe47043363fb74eaf5c/href">https://medium.com/media/03dd4701e4264fe47043363fb74eaf5c/href</a></iframe><h4>👁️Situation</h4><p>Suppose, you are making a to-do list website where people can type todos and todos will be stored in the local storage. But the question arises, how can you persist the data with local storage.</p><h4>😍Solution</h4><p>Let’s take an example 👇</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/898f75cf7a7d9240be89f30114aab9cc/href">https://medium.com/media/898f75cf7a7d9240be89f30114aab9cc/href</a></iframe><p>In the 👆 example, there is an atom(‘todosAtom’) that is responsible for storing all the todos.</p><p>Now, we can use effects_UNSTABLE</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/818dc15b85200d9d3ccd0a8126ffe586/href">https://medium.com/media/818dc15b85200d9d3ccd0a8126ffe586/href</a></iframe><p>Here, we are using <strong>effects_unstable </strong>which runs when the atom is initialized or changed.</p><p>But, unfortunately, you will encounter an error if you are using<strong> an SSR framework like nextjs.</strong></p><h4>🤔Then how to solve it?</h4><pre>yarn add recoil-persist</pre><p><a href="https://www.npmjs.com/package/recoil-persist">recoil-persist</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1af51497e4af30f7e13d200903d493af/href">https://medium.com/media/1af51497e4af30f7e13d200903d493af/href</a></iframe><p>Now, all of your work would be done with the help of the <strong>recoil persist</strong>.</p><p>If you have any questions, feel free to ask here👇:</p><p><a href="https://discord.gg/hN4Wc5VR4M">Join the Next Dev Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64ae8c1c2b54" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>