<?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: Raj Bhinde</title>
    <description>The latest articles on DEV Community by Raj Bhinde (@irajbhinde).</description>
    <link>https://dev.to/irajbhinde</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%2F887042%2F5aa43244-0258-4bb7-9b06-121b7f3059ca.jpeg</url>
      <title>DEV Community: Raj Bhinde</title>
      <link>https://dev.to/irajbhinde</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/irajbhinde"/>
    <language>en</language>
    <item>
      <title>Reviewing a Review</title>
      <dc:creator>Raj Bhinde</dc:creator>
      <pubDate>Tue, 24 Feb 2026 00:56:52 +0000</pubDate>
      <link>https://dev.to/irajbhinde/reviewing-a-review-2l09</link>
      <guid>https://dev.to/irajbhinde/reviewing-a-review-2l09</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdslyfenflxs4t2pydwbg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdslyfenflxs4t2pydwbg.png" alt=" " width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hello! Above is a review of using Oracle Database &amp;amp; I'll be reviewing this review.&lt;/p&gt;

&lt;p&gt;I can relate with Abdul's review of Oracle. If you have a huge database, it definitely has features like - high availability, concurrency, scalability and much more. Performance wise, I've observed that the retrieval time for a set of data depends upon how optimal your query is. In my experience, even a large query which is medium optimal displays the result within few seconds. &lt;/p&gt;

&lt;p&gt;On the flipside, setting up the database &amp;amp; the connection is little bit complicated. Depending upon the organization, you may need to tweak your settings as well. The User Interface feels like it never got an upgrade after early 2000's. Feature wise, they could add more exciting things especially in creating reports.&lt;/p&gt;

&lt;p&gt;Overall, it's a robust database, and Oracle can work upon developing new exciting features to keep the customers happy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.softwareadvice.com/data-governance/oracle-database-profile/reviews/" rel="noopener noreferrer"&gt;Review Source&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>discuss</category>
      <category>performance</category>
    </item>
    <item>
      <title>Useful VS Code Shortcuts That Would Save Your Time &amp; Increase Productivity</title>
      <dc:creator>Raj Bhinde</dc:creator>
      <pubDate>Fri, 23 Jun 2023 13:55:44 +0000</pubDate>
      <link>https://dev.to/irajbhinde/useful-vs-code-shortcuts-that-would-save-your-time-increase-productivity-5d6p</link>
      <guid>https://dev.to/irajbhinde/useful-vs-code-shortcuts-that-would-save-your-time-increase-productivity-5d6p</guid>
      <description>&lt;p&gt;&lt;strong&gt;1.Command Palette&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + SHIFT + P&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD+SHIFT+P&lt;/p&gt;

&lt;p&gt;This Shortcut opens up the command palette, you can access various commands as required. You just need to type the keyword related to the command and find it instead of navigating through menus&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ylK8oGBy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Command-Palette-Desuvit.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ylK8oGBy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Command-Palette-Desuvit.gif" alt="Image description" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Toggle Sidebar&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + B&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD+B&lt;/p&gt;

&lt;p&gt;Ever felt the VS code window to be too small even after using ALT + Z ? Try using this shortcut which will hide the Sidebar &amp;amp; give you full width of the editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m8tHXXZ9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Toggle-Sidebar-Desuvit.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m8tHXXZ9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Toggle-Sidebar-Desuvit.gif" alt="Image description" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Multi-Select Cursor&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + D&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + D&lt;/p&gt;

&lt;p&gt;Use this shortcut to select multiple tags &amp;amp; change them at once rather than going through one by one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X3AK8t5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Multi-Select-Cursor-Desuvit.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X3AK8t5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Multi-Select-Cursor-Desuvit.gif" alt="Image description" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Copy Line&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: SHIFT+ALT+UP or SHIFT+ALT+DOWN&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + D&lt;/p&gt;

&lt;p&gt;While writing the code, it is common for programmers to copy the lines &amp;amp; paste it elsewhere. This is used so frequently that there is a shortcut for this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L0Y51txM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Copy-Line-Desuvit.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L0Y51txM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.desuvit.com/wp-content/uploads/2021/03/Copy-Line-Desuvit.gif" alt="Image description" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.Show Errors &amp;amp; Warnings&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + SHIFT + M&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + SHIFT + M&lt;/p&gt;

&lt;p&gt;Check this shortcut out to look for any errors &amp;amp; bugs in your program. It opens up a panel where you can see the identified errors &amp;amp; warnings&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zZYnvOYy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--Yys4DO3P--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_880/https://github.com/simonpaix/images/blob/main/Errors_Warnings.gif%253Fraw%253Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zZYnvOYy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--Yys4DO3P--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_880/https://github.com/simonpaix/images/blob/main/Errors_Warnings.gif%253Fraw%253Dtrue" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.Multi Cursor Selection&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + SHIFT + L&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + SHIFT + L&lt;/p&gt;

&lt;p&gt;What do you do when you have to change name of a particular tag (used everywhere throughout code) ? Most of the times, programmers go through each tag &amp;amp; change it. With this shortcut you can change the tag or tag name at once. Just select the code &amp;amp; use the shortcut. Note that this will change value of each &amp;amp; every tag name you selected&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VN8aXsxH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--7LhlnRyx--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_880/https://github.com/simonpaix/images/blob/main/add_cursor_current_selection.gif%253Fraw%253Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VN8aXsxH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--7LhlnRyx--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_66%252Cw_880/https://github.com/simonpaix/images/blob/main/add_cursor_current_selection.gif%253Fraw%253Dtrue" alt="Image description" width="574" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bonus Shortcuts To Try :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A) Change Multiple Lines Together&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + ALT + Arrow Keys&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + ALT + Arrow Keys&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B) JUMP TO LINE&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + P + Type " : "&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + P + Type " : "&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C) JUMP TO HTML TAG&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: CTRL + P + Type " @ "&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: CMD + P + Type " @ "&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D) Move your line of code up or down&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: ALT + UP/DOWN Arrow Keys&lt;br&gt;
&lt;strong&gt;MAC&lt;/strong&gt;: ALT + UP/DOWN Arrow Keys&lt;/p&gt;

&lt;p&gt;I hope you find it useful :) &lt;/p&gt;

&lt;p&gt;Comment down the shortcuts that you use daily, would love to see the replies&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Rest Parameters &amp; Spread Syntax</title>
      <dc:creator>Raj Bhinde</dc:creator>
      <pubDate>Thu, 21 Jul 2022 20:54:00 +0000</pubDate>
      <link>https://dev.to/irajbhinde/rest-parameters-spread-syntax-2k92</link>
      <guid>https://dev.to/irajbhinde/rest-parameters-spread-syntax-2k92</guid>
      <description>&lt;p&gt;Hi there! If you're looking to learn or just revise the REST Parameters &amp;amp; SPREAD syntax, then this blog is for you. We'll unfold both of the JavaScript concepts in a simple, easy to understand manner. &lt;/p&gt;

&lt;p&gt;Let's Start with &lt;strong&gt;REST PARAMETERS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're writing a function for adding two numbers in JavaScript. It would look something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  function addTheNumbers (numberOne, numberTwo)  {
    return numberOne + numberTwo;
  }
  // PRINTING THE VALUES

  console.log(addTheNumbers(2,3)); // expected output : 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Works fine, yes! Now what if someone asks you to create a function for adding 5 numbers. It won't be convenient to manually add the numbers parameter till numerFive. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is where REST parameters comes handy....&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's quickly jump into how to use them. The REST parameter can be included in the function definition by using three dots &lt;strong&gt;&lt;code&gt;...&lt;/code&gt;&lt;/strong&gt; followed by the name of the array that will contain them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  function addTheNumbers (...args)  {
    let sum = 0;
    for (let arg of args){
        sum = sum + arg
    }
    return sum
  }

  // PRINTING THE VALUES

  console.log(addTheNumbers(1,2,3,4,1)); //expected output : 11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dots literally mean “gather the remaining parameters into an array”. &lt;/p&gt;

&lt;p&gt;Important note - &lt;strong&gt;&lt;u&gt;The REST parameters must be at the end&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Below is an Incorrect way of using REST parameters&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function f(arg1, ...rest, arg2) { // arg2 after ...rest is incorrect
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look into one more example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const funcNames = (name, surname, ...args) =&amp;gt; {
    console.log(name, surname, args);
}

funcNames("Raj", "Bhinde", "Dhaval","Bhinde")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output - &lt;code&gt;Raj Bhinde [ 'Dhaval', 'Bhinde' ] &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, we saw that it took the name, surname &amp;amp; then condensed all the other parameters in one array. You can also access the index of these arrays using &lt;code&gt;args[0]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now before we move onto Spread syntax, considering the above examples let's keep in mind that REST syntax collects multiple elements and "condenses" them into a single element as we saw above.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;SPREAD is opposite of rest syntax. Although the syntax looks the same, they come with slightly different semantics.&lt;/p&gt;

&lt;p&gt;Before telling you what Spread does, we'll observe with the help of an example what SPREAD does- &lt;/p&gt;

&lt;p&gt;Let's say we have a function which multiplies the numbers passed in arguments&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const muliplyTheNumbers = (x,y,z) =&amp;gt; {
    return x*y*z
}

console.log(muliplyTheNumbers(1,2,3)); //expected output : 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would work perfectly fine, but now let's say we have an array of numbers that we would like to multiply &lt;/p&gt;

&lt;p&gt;&lt;code&gt;const arrayOfNumbers = [2,3,5,2,2];&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you now pass the array in the function call it would give you a NaN. That is because the function expects a list of numeric arguments &amp;amp; not a single array. &lt;/p&gt;

&lt;p&gt;Here's when Spread syntax comes to rescue! &lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log(muliplyTheNumbers(...arrayOfNumbers));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When ...arrayOfNumbers is used in the function call, it “expands” an iterable object arrayOfNumbers into the list of arguments.&lt;/p&gt;

&lt;p&gt;We can also pass multiple arrays with the help of Spread syntax&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const arrayOfNumbersTwo = [10,2];&lt;/code&gt; can be passed as &lt;code&gt;muliplyTheNumbers(...arrayOfNumbers,...arrayOfNumbersTwo);&lt;/code&gt; &amp;amp; is absolutely valid. We can also add normal values at the start/inbetween/end of function call.&lt;/p&gt;

&lt;p&gt;Spread syntax can also be used to merge two arrays&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arr1 = ["1","2","3"];
const arr2 = ["4","5"]

console.log([...arr1,...arr2]); output: ['1', '2', '3', '4', '5']
console.log(...arr1,...arr2); output : 1 2 3 4 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above examples we used an array, but spread works with any iterable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let stringValue = "TheBoys";
console.log([...stringValue]); output : ['T', 'h', 'e', 'B', 'o', 'y', 's']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can also be used to clone an object like this -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
    firstName : "Raj"
}

const obj2 = {
    ...obj1,
    surname : "Bhinde"
}

console.log(obj2);// expected output : { firstName: 'Raj', surname: 'Bhinde' }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, we can merge two objects as well.&lt;/p&gt;

&lt;p&gt;So, that was all folks! Thank you for reading so far. I hope it was a good read for you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's a quick summary&lt;/strong&gt; to not forget the difference between REST &amp;amp; SPREAD&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REST OPERATOR&lt;/strong&gt; - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The REST operator is known for de-structuring of elements,  then it collects the leftover element to make it an array. &lt;/li&gt;
&lt;li&gt;REST Operator must be at the end of the arguments else it doesn't work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SPREAD OPERATOR&lt;/strong&gt; - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SPREAD Operator extracts the collected elements to a single element&lt;/li&gt;
&lt;li&gt;SPREAD can be used anywhere irrespective of its position.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>CSS Units Explained w/ Examples</title>
      <dc:creator>Raj Bhinde</dc:creator>
      <pubDate>Thu, 21 Jul 2022 12:29:00 +0000</pubDate>
      <link>https://dev.to/irajbhinde/css-units-explained-w-examples-1o07</link>
      <guid>https://dev.to/irajbhinde/css-units-explained-w-examples-1o07</guid>
      <description>&lt;p&gt;Hey there! Before writing this blog, I had a very little understanding of various CSS units &amp;amp; what they actually represent. And as they say -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you don't understand a particular topic, write a blog about it!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I put on my learning cap &amp;amp; here's what I understood so far-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftiquvx9dbhsu3k00bng3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftiquvx9dbhsu3k00bng3.png" alt="Image_For_Absolute_vs_Relative"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The CSS Units are divided into 2 Categories - Absolute Units &amp;amp; Relative Units. But what do they mean ?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Absolute Units&lt;/strong&gt; - The absolute units always indicate a fixed length. Units that are “absolute” are the same size regardless of the parent element or window size. This means that whenever an element is set with a property absolute, the size of that element would look the same when looked at on a phone or on a large monitor (and everything in between!)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relative Units&lt;/strong&gt; - Relative length units are relative to something else, perhaps the size of the parent element's font, or the size of the viewport, etc. depending upon the unit used. Relative units are useful for styling responsive sites.&lt;/p&gt;

&lt;p&gt;Now let's dive into the units &amp;amp; their examples. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please Note&lt;/strong&gt; - I've used Inline Styling only for the sake of convenience to know which css properties are applied. Always prefer using a separate stylesheet for your CSS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MASTER CSB For Examples&lt;/strong&gt; - You can refer to this CSB after reading the description for respective units 😊&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/css-blog-exampleone-pnffxr?module=%2Fsrc%2FApp.js"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Absolute Units&lt;/strong&gt;, I'll only discuss about pixels, since it is a commonly used absolute unit&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pixels&lt;/strong&gt; - Pixels are very straightforward, they say what they are going to do. &lt;/p&gt;

&lt;p&gt;Take a look at the example below. This will render a 500px block with a red background that has a 14px &amp;amp; 30px font-size paragraph in it. Even if you change your font-size settings in chrome appearance settings, you can observe that the font size doesn't change, it stays fixed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div
        style={{ width: "500px", backgroundColor: "red" }}
        className="pixels-example"
      &amp;gt;
        &amp;lt;p style={{ fontSize: "14px" }}&amp;gt;Pixels Example&amp;lt;/p&amp;gt;
        &amp;lt;p style={{ fontSize: "30px" }}&amp;gt;Pixels Example&amp;lt;/p&amp;gt;
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hence pixels are really bad for accessibility &amp;amp; will bite you if you continue to use it throughout your entire application. What pixels are good for is when you want something to look exactly the same width and height despite the user's browser settings. A good use case for pixels is when you are defining a border. You probably want that border to always be the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now, let's look into Relative Units.&lt;/strong&gt; Relative units can be a little more difficult than absolute units in determining which to use, so let’s go through your options in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Percent (%)&lt;/strong&gt; - Percent is Relative to the parent element’s value. Look at the example below to get a better understanding&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="percent-example"&amp;gt;
        &amp;lt;p
          style={{
            fontSize: "1.6rem",
            width: "100%",
            backgroundColor: "black",
            color: "white"
          }}
        &amp;gt;
          This is the Parent Div
        &amp;lt;/p&amp;gt;
        &amp;lt;div
          style={{
            fontSize: "1.6rem",
            width: "40%",
            backgroundColor: "black",
            color: "white"
          }}
          className="child-div"
        &amp;gt;
          &amp;lt;p&amp;gt;This is 40% of its parent div&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we used percentages it is going to be responsive by default. Try resizing your browser’s width. This would not be responsive if you used pixels, rem or em to define the widths. What is nice about the usage of percentages, is that when you change the parent’s width the children will still behave in the same way. Percentages are very useful for defining layouts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REM&lt;/strong&gt; - In most cases you would want to use the rem unit. Rem is an absolute unit relative to the root element of the HTML document and is commonly used for font sizes. It is a scalable unit in which the browser renders into pixel values. The default root element font size is 16px. It is recommend for responsiveness with the help of &lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; &amp;amp; changing the html font-size for the required min/max widths. &lt;/p&gt;

&lt;p&gt;In the following example- We have set the html font size as 10px in styles.css &amp;amp; set the font size as 1.6rem &amp;amp; 3rem respectively. &lt;br&gt;
Now, if you inspect &amp;amp; check for the font size of the example, you can see that the font-size are now relative to the font-size of the html tag i.e 1rem = 10px&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div
        style={{ width: "50rem", backgroundColor: "red" }}
        className="rem-example"
      &amp;gt;
        &amp;lt;p style={{ fontSize: "1.6rem" }}&amp;gt;REM Example&amp;lt;/p&amp;gt;
        &amp;lt;p style={{ fontSize: "3rem" }}&amp;gt;REM Example&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;EM&lt;/strong&gt; - em is also an absolute unit but unlike rem unit, it is relative to the immediate parent element. It can also be used for font sizes but can lead to unexpected results because it is relative to the immediate parent. &lt;/p&gt;

&lt;p&gt;Let's look into the example - &lt;/p&gt;

&lt;p&gt;There is a parent div with the font-size of 24px, we created a &lt;strong&gt;p&lt;/strong&gt; tag with font-size of 2em, which would be 2x24 = 48px. Now, we created a child div with font-size of 12px which would be an immediate parent to our next &lt;strong&gt;p&lt;/strong&gt; tag. Now giving the same font-size of 2em to this &lt;strong&gt;p&lt;/strong&gt; tag, we can observe that it is relative to the immediate parent &amp;amp; not the top most parent div. &lt;strong&gt;When to use EM ?&lt;/strong&gt; The only reason you’ll need to use em units is to scale an element which has non default font sizing. Design components like menu items, buttons, and headings may have their own explicitly stated font sizes. If you change these font sizes, you want the entire component to scale proportionately. Typically don’t Use em Units for font sizes, designs are more manageable if rem units are used for font sizing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      &amp;lt;div style={{ fontSize: "24px" }} className="em-boxes"&amp;gt;
        &amp;lt;p style={{ fontSize: "2em" }}&amp;gt;This is 2EM example&amp;lt;/p&amp;gt;
        &amp;lt;div style={{ fontSize: "12px" }} className="immediate-parent"&amp;gt;
          I am Immediate parent of below div
          &amp;lt;p style={{ fontSize: "2em" }}&amp;gt;This is also an 2EM Example&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you've read so far till the blog, &lt;strong&gt;Congratulations!&lt;/strong&gt; Now you know how the most recommended relative units work. Also, thank you for reading so far! But we're not just done yet- let's look into couple of more &lt;strong&gt;very interesting relative units&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FR&lt;/strong&gt; - fr stands for fractional unit. This unit is often used in combination with grids. Let’s take a look at the grid we defined in the example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      &amp;lt;div className="grid"&amp;gt;
        &amp;lt;div&amp;gt;Div one&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;Div two&amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;Div three&amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid {
  font-size: 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr 2fr;
  background-color: red;
}
.grid div {
  background-color: red;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The column sizes get defined by the grid-template-columns property. There is a total of 5fr, which means that 1fr will come down to 20%. This means that the column widths will be 20%, 40%, and 40% respectively. Fr is a really nice unit to use because it takes a lot of the math out of the way. You can change the amount of fr’s in the grid and the size of 1 fr will automatically get figured out for you. This is why you could, and maybe should, prefer them over percentages when defining a grid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And the last one......&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VW &amp;amp; VH&lt;/strong&gt; - The vw and vh units, stand for viewport width and viewport height. &lt;strong&gt;No matter where you are, inside a child div or in a grand grandchild div, the vw and vh will always be the width and height of the viewport.&lt;/strong&gt; Viewport is the size of your window. In the example you can see that it took the width &amp;amp; height equivalent to that of your window / viewport&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div
        style={{ backgroundColor: "black", width: "100vw", height: "100vh" }}
        className="viewport-example"
      &amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you for reading this blog, I hope you learned something out of it or it was a good revision for you. &lt;/p&gt;

&lt;p&gt;To be honest, I am at an Intermediate level when it comes to CSS, so &lt;strong&gt;I would be more than pleased to read your approaches &amp;amp; hack when it comes to using different CSS units for different elements.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Search Functionality using Formik</title>
      <dc:creator>Raj Bhinde</dc:creator>
      <pubDate>Fri, 15 Jul 2022 20:01:14 +0000</pubDate>
      <link>https://dev.to/irajbhinde/search-functionality-using-formik-o9o</link>
      <guid>https://dev.to/irajbhinde/search-functionality-using-formik-o9o</guid>
      <description>&lt;p&gt;Hi there! I have made this beginner friendly blog to create a simple search functionality where we would be getting the inputs from a form, and then by using a simple function we can sort the inputs received from the dummy data that we'll create.&lt;/p&gt;

&lt;p&gt;While building this functionality, we're going to use &lt;a href="https://formik.org/docs/api/useFormik"&gt;useFormik()&lt;/a&gt; React hook as it makes the state handling of all the input elements easier especially when you have many input fields. You'll see the benefit of Formik further in the blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enough talking, let's get coding!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;- Create a dummy data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const dummyObject = [
  {
    id: "1",
    firstName: "Raj",
    lastName: "Bhinde",
    userLocation: "Mumbai"
  },
  {
    id: "2",
    firstName: "Smrithi",
    lastName: "Mohandas",
    userLocation: "Bangalore"
  },
  {
    id: "3",
    firstName: "Dhaval",
    lastName: "Bhinde",
    userLocation: "New Jersey"
  },
  {
    id: "4",
    firstName: "Mohit",
    lastName: "Bhinde",
    userLocation: "Thane"
  },
  {
    id: "5",
    firstName: "Shubham",
    lastName: "Dawkhar",
    userLocation: "Pune"
  }
];

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;- Create the input elements&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
   &amp;lt;label htmlFor="firstName"&amp;gt;First Name&amp;lt;/label&amp;gt;
   &amp;lt;input type="text" /&amp;gt;
   &amp;lt;label htmlFor="lastName"&amp;gt;Last Name&amp;lt;/label&amp;gt;
   &amp;lt;input type="text" id="lastName" /&amp;gt;
   &amp;lt;label htmlFor="location"&amp;gt;Location&amp;lt;/label&amp;gt;
   &amp;lt;input type="text" id="location"/&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;- Integrate useFormik() in our code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const formik = useFormik({
    initialValues: {
      firstName: "",
      lastName: "",
      userLocation: ""
    },
    onSubmit: (values) =&amp;gt; {
      console.log(values);
    }
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the changes in the input elements would look something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form onSubmit={formik.handleSubmit}
&amp;lt;input
      aria-label="input-firstName"
      id="firstName"
      type="text"
      onChange={formik.handleChange}
      value={formik.values.firstName}
/&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can continue using the same syntax of onChange &amp;amp; value for each &amp;amp; every input box irrespective of its type. This is where formik helps in getting rid of writing the spread operator &amp;amp; the syntax. It takes care of the state updates by itself.&lt;/p&gt;

&lt;p&gt;Now, when we press the Submit button, we can see our input values in the console. That's happening because of the onSubmit functionality we passed in step 3 &amp;amp; console logging the values which got passed in the input. &lt;/p&gt;

&lt;p&gt;Let's get rolling towards the next step!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;- Get rid of the empty values. &lt;/p&gt;

&lt;p&gt;Since we're creating a search functionality, we only want to filter using the values we provided in the input &amp;amp; get rid of the empty values which are returned by the formik. So let's create a function for that. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before you look into the solution below, try to write a function for this by yourself. Basically you just have to delete the empty values of the keys in the JSON object.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const filterFunction = (values) =&amp;gt; {
    const data = {...values};
     Object.keys(data).forEach((key) =&amp;gt; {
      if (data[key] === "") {
        delete data[key];
      }
    });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, at the place of console.log at the onSubmit let's call this function with &lt;strong&gt;values&lt;/strong&gt; as the argument. You'll be able to see that, we're getting a JSON, only of the values which we entered in the input.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt; - Let's create a function to filter the data&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before you look into the solution below, try to write a function for this by yourself. Here, we are trying return the data where the key &amp;amp; value of our object matches with the dummyObject we created.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    var finalObject = dummyObject.filter(function (item) {
      for (var key in data) {
        if (item[key] !== data[key]) return false;
      }
      return true;
    });
    setSearchResults(finalObject);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that I've created a useState here to store the results of final Object &amp;amp; access it outside of the function to display the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt; - Let's display the data. Write the below code outside of your form tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{searchResults.length !== 0 &amp;amp;&amp;amp;
        searchResults.map((value, key) =&amp;gt; {
          return (
            &amp;lt;div key={key}&amp;gt;
              {value.firstName} {value.lastName} {value.userLocation}
            &amp;lt;/div&amp;gt;
          );
        })}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Voila! We now have a form with a search functionality.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you've reached this far&lt;/strong&gt;, thanks for reading my first blog. Any kinds of queries &amp;amp; feedback are most welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embedding a CodeSandBox Link here incase anyone needs it&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/useformik-blog-q4e9ht?module=%2Fsrc%2FApp.jsx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

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