<?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: CatWebDev</title>
    <description>The latest articles on DEV Community by CatWebDev (@catwebdev).</description>
    <link>https://dev.to/catwebdev</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%2F768808%2F021484a8-b98f-46f9-80de-3de6369df343.png</url>
      <title>DEV Community: CatWebDev</title>
      <link>https://dev.to/catwebdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/catwebdev"/>
    <language>en</language>
    <item>
      <title>Difference Between Spread Syntax (...) and Rest Parameters (...) in JavaScript.</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Mon, 16 Sep 2024 13:55:29 +0000</pubDate>
      <link>https://dev.to/catwebdev/difference-between-spread-syntax-and-rest-parameters-in-javascript-cb3</link>
      <guid>https://dev.to/catwebdev/difference-between-spread-syntax-and-rest-parameters-in-javascript-cb3</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Intro&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While the spread &lt;code&gt;syntax (...)&lt;/code&gt; and rest &lt;code&gt;parameters (...)&lt;/code&gt; in JavaScript look similar, they serve different purposes depending on how and where they are used. Both are used to manipulate arrays and objects, but understanding the difference is essential for using them correctly in your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Spread Syntax&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The spread syntax is used to expand elements of an array or object. It takes an iterable (like an array or object) and expands it into its elements. We typically use spread syntax in function arguments, array elements, or object properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Using Spread with Arrays&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;const numbers = [1, 2, 3];
const newNumbers = [...numbers, 4, 5];

console.log(newNumbers); // Output: [1, 2, 3, 4, 5]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example: Using Spread with Objects&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;const obj = { a: 1, b: 2 };
const newObj = { ...obj, c: 3 };

console.log(newObj); // Output: { a: 1, b: 2, c: 3 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Purpose of Spread Syntax:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Expands an array or object into individual elements or properties.&lt;/li&gt;
&lt;li&gt;Used in array/object copying, merging, or passing elements as function arguments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Rest Parameters&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The rest parameter collects multiple elements into a single array or object. It allows a function to accept an indefinite number of arguments, capturing them into an array. Unlike spread syntax, the rest parameter gathers values rather than expands them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Using Rest Parameters in Functions&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 sum(...numbers) {
  return numbers.reduce((total, num) =&amp;gt; total + num, 0);
}

console.log(sum(1, 2, 3, 4)); // Output: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example: Using Rest in Array Destructuring&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;const [first, ...rest] = [1, 2, 3, 4];

console.log(first); // Output: 1
console.log(rest);  // Output: [2, 3, 4]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Purpose of Rest Parameters:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Gathers multiple arguments into a single array.&lt;/li&gt;
&lt;li&gt;Useful for functions that can accept any number of arguments or when you want to collect “the rest” of the elements in array/object restructuring.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Differences&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Functionality:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spread Syntax: Expands an array or object into individual elements or properties.&lt;/li&gt;
&lt;li&gt;Rest Parameters: Gathers multiple elements into a single array or object.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spread Syntax: Used when passing or merging elements.&lt;/li&gt;
&lt;li&gt;Rest Parameters: Used to collect arguments or remaining elements in restructuring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Context:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spread Syntax: Typically used in function calls, array copying, and object merging.&lt;/li&gt;
&lt;li&gt;Rest Parameters: Used primarily in function definitions to collect arguments and in restructuring.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;In the end&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Though they share the same &lt;code&gt;(…)&lt;/code&gt; syntax, the &lt;code&gt;spread syntax&lt;/code&gt;, and the &lt;code&gt;rest parameters&lt;/code&gt; have distinct uses. Spread is used to expand elements, while rest is used to gather elements. Mastering both will enhance your ability to work with arrays, objects and functions cleanly and efficiently.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

&lt;p&gt;Visit my YouTube channel &lt;a href="https://www.youtube.com/@catwebdev" rel="noopener noreferrer"&gt;CatWebDev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Your likes, comments, and subscriptions are greatly appreciated. Thank you for the support!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>spread</category>
    </item>
    <item>
      <title>JavaScript Spread Syntax: Expanding Arrays and Objects</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Wed, 11 Sep 2024 13:27:13 +0000</pubDate>
      <link>https://dev.to/catwebdev/javascript-spread-syntax-expanding-arrays-and-objects-l66</link>
      <guid>https://dev.to/catwebdev/javascript-spread-syntax-expanding-arrays-and-objects-l66</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;spread syntax (...)&lt;/code&gt; is a useful ES6 feature that allows you to expand elements of an iterable (such as arrays or objects) into individual elements. This syntax simplifies many tasks like copying, merging, or combining arrays and objects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Spread Syntax with Arrays
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Copying an Array
&lt;/h3&gt;

&lt;p&gt;The spread syntax can be used to make a shallow copy of an array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const originalArray = [1, 2, 3];
const copiedArray = [...originalArray];

console.log(copiedArray); // Output: [1, 2, 3]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Merging Arrays
&lt;/h3&gt;

&lt;p&gt;You can easily combine two or more arrays using the spread syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array1 = [1, 2];
const array2 = [3, 4];
const mergedArray = [...array1, ...array2];

console.log(mergedArray); // Output: [1, 2, 3, 4]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Adding New Elements
&lt;/h3&gt;

&lt;p&gt;The spread syntax can be used to add elements to an array when copying or merging.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3];
const newArray = [0, ...numbers, 4];

console.log(newArray); // Output: [0, 1, 2, 3, 4]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using the Spread Syntax with Objects
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Copying an Object
&lt;/h3&gt;

&lt;p&gt;You can use the spread syntax to create a shallow copy of an object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const originalObject = { a: 1, b: 2 };
const copiedObject = { ...originalObject };

console.log(copiedObject); // Output: { a: 1, b: 2 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Merging Objects
&lt;/h3&gt;

&lt;p&gt;Merging multiple objects into one can be done with the spread syntax.&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 = { a: 1, b: 2 };
const obj2 = { c: 3, d: 4 };
const mergedObject = { ...obj1, ...obj2 };

console.log(mergedObject); // Output: { a: 1, b: 2, c: 3, d: 4 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Adding or Overwriting Properties
&lt;/h3&gt;

&lt;p&gt;You can add or update properties in an object while copying or merging.&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 = { a: 1, b: 2 };
const updatedObject = { ...obj1, b: 3, c: 4 };

console.log(updatedObject); // Output: { a: 1, b: 3, c: 4 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The spread syntax makes copying, merging, and updating arrays and objects more straightforward. It’s a clean and concise tool for working with iterable data structures in JavaScript, helping you write more efficient and readable code.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/catwebdev"&gt;@catwebdev&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Visit my YouTube channel &lt;a href="https://www.youtube.com/@catwebdev" rel="noopener noreferrer"&gt;CatWebDev&lt;/a&gt;. Your likes, comments, and subscriptions are greatly appreciated. Thank you for the support!&lt;/p&gt;

</description>
      <category>spread</category>
      <category>javascript</category>
      <category>es6</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Understanding Closure in JavaScript.</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Mon, 09 Sep 2024 21:04:02 +0000</pubDate>
      <link>https://dev.to/catwebdev/understanding-closure-in-javascript-3akg</link>
      <guid>https://dev.to/catwebdev/understanding-closure-in-javascript-3akg</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;JavaScript closure is one of the language's most powerful and often misunderstood concepts. As a medium-level developer, mastering closures can greatly improve our ability to write clean, efficient, and modular code. This topic will walk through the concept of closures, and how they work, and provide practical examples of how to use them effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Closure?
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;closure&lt;/code&gt; is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives a function access to its outer scope. In JavaScript, closures are created every time a function is created, at function creation time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key characteristics of closures:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The inner function can access the variables from its outer function even after the outer function has returned.&lt;/li&gt;
&lt;li&gt;Closures preserve the state of the variables from the outer function over time.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function outerFunction() {
  let counter = 0;

  function innerFunction() {
    counter++;
    console.log(counter);
  }

  return innerFunction;
}

const increment = outerFunction();
increment(); // Output: 1
increment(); // Output: 2
increment(); // Output: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What's going on in the code:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;outerFunction&lt;/code&gt; defines a variable counter and returns the &lt;code&gt;innerFunction&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;innerFunction&lt;/code&gt; increments and logs the counter variable each time it is called.&lt;/li&gt;
&lt;li&gt;The closure allows &lt;code&gt;innerFunction&lt;/code&gt; to "remember" the state of the counter variable even after &lt;code&gt;outerFunction&lt;/code&gt; has finished executing. This means that each time increment is called, the &lt;code&gt;counter&lt;/code&gt; variable keeps its state, and that’s why the output increments with each call.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Use Closures?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data Encapsulation&lt;/strong&gt;: Closures help create private variables. In JavaScript, closures are often used to emulate private methods, a pattern useful in avoiding direct manipulation of variables outside their intended scope.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function createCounter() {
  let count = 0;

  return {
    increment() {
      count++;
      return count;
    },
    decrement() {
      count--;
      return count;
    }
  };
}

const counter = createCounter();
console.log(counter.increment()); // Output: 1
console.log(counter.decrement()); // Output: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;count&lt;/code&gt; variable is private and can only be modified by calling &lt;code&gt;increment&lt;/code&gt; or decrement methods. This closure in action prevents direct access to &lt;code&gt;count&lt;/code&gt; from outside the function.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Callbacks and Event Handlers&lt;/strong&gt;: Closures are frequently used in asynchronous JavaScript, especially with callbacks, promises, and event handling.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function delayMessage(message, delay) {
  setTimeout(function() {
    console.log(message);
  }, delay);
}

delayMessage("Hello, after 2 seconds!", 2000); // Output after 2 seconds: "Hello, after 2 seconds!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the anonymous function inside &lt;code&gt;setTimeout&lt;/code&gt; forms a closure with the &lt;code&gt;message&lt;/code&gt; variable, ensuring that the &lt;code&gt;message&lt;/code&gt; is still accessible when the delayed function runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Pitfalls with Closures
&lt;/h2&gt;

&lt;p&gt;While closures are powerful, they can introduce certain issues if not used carefully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory leaks&lt;/strong&gt;: Since closures maintain references to outer variables, large closures can cause memory bloat if not properly managed. This is especially important in environments where performance is critical.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unintended variable sharing&lt;/strong&gt;: Closures capture the variable, not the value. This can lead to unexpected behavior when looping.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function createCounters() {
  let counters = [];
  for (var i = 0; i &amp;lt; 3; i++) {
    counters.push(function() {
      console.log(i);
    });
  }
  return counters;
}

const counters = createCounters();
counters[0](); // Output: 3
counters[1](); // Output: 3
counters[2](); // Output: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This happens because the inner functions all share the same variable &lt;code&gt;i&lt;/code&gt;. One way to fix this is to use &lt;code&gt;let&lt;/code&gt; instead of &lt;code&gt;var&lt;/code&gt;, or use an IIFE (Immediately Invoked Function Expression) to create a new scope for each iteration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function createCounters() {
  let counters = [];
  for (let i = 0; i &amp;lt; 3; i++) {
    counters.push(function() {
      console.log(i);
    });
  }
  return counters;
}

const counters = createCounters();
counters[0](); // Output: 0
counters[1](); // Output: 1
counters[2](); // Output: 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Closures are a fundamental concept in JavaScript, essential for writing more modular, reusable, and maintainable code. As a medium-level developer, practicing closures will help enhance our problem-solving abilities and make us more adept at handling real-world development challenges.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/catwebdev"&gt;@catwebdev&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visit my YouTube channel&lt;/strong&gt; &lt;a href="https://www.youtube.com/@catwebdev" rel="noopener noreferrer"&gt;CatWebDev&lt;/a&gt;.Your &lt;code&gt;likes&lt;/code&gt;, &lt;code&gt;comments&lt;/code&gt;, and &lt;code&gt;subscriptions&lt;/code&gt; are greatly appreciated. Thank you for the support!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>closures</category>
    </item>
    <item>
      <title>Reverse a String in JavaScript: Two Fun Methods You Should Know! 🚀</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Wed, 04 Sep 2024 20:43:00 +0000</pubDate>
      <link>https://dev.to/catwebdev/reverse-a-string-in-javascript-two-fun-methods-you-should-know-547c</link>
      <guid>https://dev.to/catwebdev/reverse-a-string-in-javascript-two-fun-methods-you-should-know-547c</guid>
      <description>&lt;h3&gt;
  
  
  Hello and welcome!
&lt;/h3&gt;

&lt;p&gt;In &lt;em&gt;JavaScript&lt;/em&gt;, there are plenty of ways to manipulate strings, but reversing one is a classic problem every developer encounters! Let's consider how to do it using two cool methods.😎&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: The Classic &lt;code&gt;.reverse()&lt;/code&gt; Method.
&lt;/h2&gt;

&lt;p&gt;This is the go-to approach for most devs. It's simple and efficient!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const string = "Hello, World!";
let reversedString = string.split("").reverse().join("");
console.log(reversedString); // "!dlroW ,olleH"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How it works:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;We split the string into an array of characters using &lt;code&gt;.split("")&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Then we use &lt;code&gt;.reverse()&lt;/code&gt; to reverse the order of the characters.&lt;/li&gt;
&lt;li&gt;Finally, we use &lt;code&gt;.join("")&lt;/code&gt; to return the characters to a string.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Easy, right? But there’s more! 😏&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: The &lt;code&gt;.reduceRight()&lt;/code&gt; Method.
&lt;/h2&gt;

&lt;p&gt;Watch the Video 🎬 to see the side-by-side comparison and learn which method to use in your projects!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/mIdSy2ljoow"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Thank you for reading/watching and see you in the next one.
&lt;/h3&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/catwebdev"&gt;@catwebdev&lt;/a&gt; &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>30+ CSS libraries and frameworks help you style your applications efficiently.</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Mon, 12 Aug 2024 14:25:05 +0000</pubDate>
      <link>https://dev.to/catwebdev/30-css-libraries-and-frameworks-help-you-style-your-applications-efficiently-3150</link>
      <guid>https://dev.to/catwebdev/30-css-libraries-and-frameworks-help-you-style-your-applications-efficiently-3150</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/TdOemzsHB0I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styled-components&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://styled-components.com/" rel="noopener noreferrer"&gt;Styled-components&lt;/a&gt; is a popular library for styling React applications using tagged template literals. It allows developers to write CSS directly within JavaScript, enabling a more component-focused approach to styling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Emotion&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://emotion.sh/docs/introduction" rel="noopener noreferrer"&gt;Emotion&lt;/a&gt; is a performant and flexible library for writing CSS styles with JavaScript. It offers both a CSS-in-JS library and a framework-agnostic CSS library, enabling styled-components, and CSS prop usage in various frameworks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stitches&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://stitches.dev/" rel="noopener noreferrer"&gt;Stitches&lt;/a&gt; is a modern CSS-in-JS library focusing on performance, flexibility, and composability. It provides a low-level styling solution with a simple API, enabling powerful theming capabilities and dynamic styling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSS&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://cssinjs.org/?v=v10.10.1" rel="noopener noreferrer"&gt;JSS&lt;/a&gt; is an authoring tool for CSS that uses JavaScript as a host language. It allows for dynamic styles and is framework-agnostic, making it suitable for various applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linaria&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://linaria.dev/" rel="noopener noreferrer"&gt;Linaria&lt;/a&gt; is a zero-runtime CSS-in-JS library. It allows developers to write CSS in JavaScript without a runtime overhead, compiling styles to plain CSS at build time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Radium-starter&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://mvila.github.io/radium-starter/#docs" rel="noopener noreferrer"&gt;Radium-starter&lt;/a&gt; is a library for managing inline styles on React elements, providing powerful styling capabilities including media queries and interaction states without the need for CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bootstrap&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://getbootstrap.com/" rel="noopener noreferrer"&gt;Bootstrap&lt;/a&gt; is a widely used CSS framework for developing responsive and mobile-first websites. It includes a large number of pre-styled components and utilities for building layouts and UI elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bulma&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://bulma.io/" rel="noopener noreferrer"&gt;Bulma&lt;/a&gt; is a modern CSS framework based on Flexbox. It is designed for simplicity and ease of use, offering a range of responsive components and a modular architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tailwind CSS&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind&lt;/a&gt; CSS is a utility-first CSS framework for rapidly building custom designs. It provides low-level utility classes that enable developers to build complex user interfaces without writing custom CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Foundation&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://get.foundation/sites/docs/" rel="noopener noreferrer"&gt;Foundation&lt;/a&gt; is a responsive front-end framework that offers a range of customizable UI components and utilities. It is designed to help developers create responsive and accessible web applications quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Material-UI&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://mui.com/" rel="noopener noreferrer"&gt;Material-UI&lt;/a&gt; (MUI) is a popular React component library that implements Google’s Material Design. It offers a comprehensive set of components and styles for building responsive and visually appealing user interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ant Design&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://ant.design/" rel="noopener noreferrer"&gt;Ant Design&lt;/a&gt; is a comprehensive design system and React UI library for enterprise applications. It provides a wide range of high-quality components and an extensive design language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic UI React&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://react.semantic-ui.com/" rel="noopener noreferrer"&gt;Semantic UI React&lt;/a&gt; is the official React integration for Semantic UI. It provides a collection of pre-styled components designed to create a consistent and responsive user interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chakra UI&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://v2.chakra-ui.com/" rel="noopener noreferrer"&gt;Chakra&lt;/a&gt; UI is a modular and accessible component library for React. It offers a range of customizable and composable components, designed to make it easy to build accessible web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classnames&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://jedwatson.github.io/classnames/" rel="noopener noreferrer"&gt;Classnames&lt;/a&gt; is a utility for conditionally joining class names together. It is a simple JavaScript library that helps manage dynamic class name strings based on various conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSSTransitionGroup&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://reactcommunity.org/react-transition-group/css-transition" rel="noopener noreferrer"&gt;CSSTransitionGroup&lt;/a&gt; is a component for implementing basic CSS animations and transitions in React. It provides a way to apply CSS transitions to elements as they enter or leave the DOM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sass&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://sass-lang.com/" rel="noopener noreferrer"&gt;Sass&lt;/a&gt; is a CSS preprocessor that extends CSS with features like variables, nested rules, and mixins. It helps keep stylesheets well-organized and allows for more efficient and manageable CSS code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Less&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://lesscss.org/" rel="noopener noreferrer"&gt;Less&lt;/a&gt; is a CSS preprocessor that extends CSS with dynamic behavior such as variables, mixins, and functions. It compiles to standard CSS and enhances the maintainability and flexibility of stylesheets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styled System&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://lesscss.org/" rel="noopener noreferrer"&gt;Styled System&lt;/a&gt; is a collection of utilities for building responsive, theme-based design systems with styled-components. It provides a set of functions for handling responsive styles, spacing, color, and typography.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Panda&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://panda-css.com/" rel="noopener noreferrer"&gt;Panda&lt;/a&gt; is a modern CSS-in-JS library focused on performance and developer experience. It offers a utility-first approach to styling, enabling highly customizable and maintainable styles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theme UI&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://theme-ui.com/" rel="noopener noreferrer"&gt;Theme UI&lt;/a&gt; is a library for building consistent, themeable React applications. It allows developers to define design tokens and apply them throughout their application, ensuring a cohesive design system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blueprint&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://blueprintjs.com/docs/" rel="noopener noreferrer"&gt;Blueprint&lt;/a&gt; is a React-based UI toolkit for the web, designed primarily for building complex, data-dense interfaces for desktop applications. It offers a range of components and styles for creating professional-looking UIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fluent UI&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://react.fluentui.dev/?path=/docs/concepts-introduction--page" rel="noopener noreferrer"&gt;Fluent UI&lt;/a&gt; is a collection of UX frameworks from Microsoft for creating consistent, cross-platform designs. It provides a suite of React components that follow the Fluent Design System.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grommet&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://v2.grommet.io/" rel="noopener noreferrer"&gt;Grommet&lt;/a&gt; is a React-based framework that provides accessibility, modularity, responsiveness, and themes in a tidy package. It is designed to help developers create scalable and attractive web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rebass&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://rebass-v3.vercel.app/" rel="noopener noreferrer"&gt;Rebass&lt;/a&gt; is a primitive UI component library built with a styled system for React. It allows for rapid design and prototyping, focusing on creating consistent, responsive UIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evergreen&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://evergreen.segment.com/" rel="noopener noreferrer"&gt;Evergreen&lt;/a&gt; is a React UI framework for building ambitious products on the web. It includes a range of polished, flexible components and follows best practices in accessibility and design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reactstrap&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://6-4-0--reactstrap.netlify.app/" rel="noopener noreferrer"&gt;Reactstrap&lt;/a&gt; is a library of React components that use Bootstrap. It allows developers to use Bootstrap’s styles and components directly in React applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Modules&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/css-modules/css-modules" rel="noopener noreferrer"&gt;CSS Modules&lt;/a&gt; is a CSS file in which all class and animation names are scoped locally by default. It allows for modular and reusable CSS, helping avoid global scope conflicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aphrodite&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/Khan/aphrodite" rel="noopener noreferrer"&gt;Aphrodite&lt;/a&gt; is a CSS-in-JS library that provides deterministic, scoped styles. It focuses on performance and supports server-side rendering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styled JSX&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/vercel/styled-jsx" rel="noopener noreferrer"&gt;Styled JSX&lt;/a&gt; is a full, scoped, and component-friendly CSS support library for JSX (and therefore React). It allows for scoped styles in Next.js applications and beyond.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vanilla Extract&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://vanilla-extract.style/" rel="noopener noreferrer"&gt;Vanilla Extract&lt;/a&gt; is a zero-runtime Stylesheets-in-TypeScript library. It enables type-safe CSS with static extraction for optimal build performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PostCSS&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://postcss.org/" rel="noopener noreferrer"&gt;PostCSS&lt;/a&gt; is a tool for transforming CSS with JavaScript plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Twind&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://twind.dev/" rel="noopener noreferrer"&gt;Twind&lt;/a&gt;is a Tailwind CSS-in-JS solution that offers the benefits of Tailwind without requiring PostCSS, configuration, purging, or auto prefixing. It is framework-agnostic, meaning it can be used with any HTML and JavaScript application, including server-rendered apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Twin.macro&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/ben-rogerson/twin.macro#gh-dark-mode-only" rel="noopener noreferrer"&gt;Twin.macro&lt;/a&gt; is a powerful library that combines the utility-first CSS framework Tailwind CSS with the flexibility of CSS-in-JS libraries like Emotion and Styled-Components. It allows you to use Tailwind’s utility classes directly within your JavaScript files, enabling a seamless integration of design and logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sky-UI&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://sky-ui.cf.sky.com/" rel="noopener noreferrer"&gt;Sky-UI&lt;/a&gt; is a graphical user interface that provides a seamless and intuitive user experience. It features a modern, clean, and minimalistic design inspired by the open and expansive nature of the sky. The primary colors are light blues, whites, and soft greys to evoke a sense of calm and tranquility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mantine&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://mantine.dev/" rel="noopener noreferrer"&gt;Mantine&lt;/a&gt; is a powerful and versatile choice for React developers, offering a rich set of customizable components, modern design features, and excellent support for accessibility and theming. It’s a fantastic option for building modern, responsive, accessible web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restyle&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.restyle.dev/" rel="noopener noreferrer"&gt;Restyle&lt;/a&gt; is a minimalistic CSS-in-JS library for React that focuses on simplicity and performance. It requires no build configuration, supports atomic class names for optimized CSS generation, and is compatible with client and server rendering. It allows you to apply styles using the styled function or the CSS prop, making it flexible for various use cases. Restyle also supports features like media queries, pseudoclasses, and encapsulated styling, making it suitable for modern React development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;StyleX&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://stylexjs.com/" rel="noopener noreferrer"&gt;StyleX&lt;/a&gt; is a CSS-in-JS library for React developed by Facebook. It emphasizes atomic styles for optimized performance and smaller CSS bundles, allowing fast, responsive UIs. StyleX combines the benefits of CSS modules and inline styles, supporting features like theming, pseudo-classes, and media queries. It’s designed to work seamlessly with React’s component model, offering a powerful yet simple approach to styling modern React applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PigmentCSS&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/mui/pigment-css" rel="noopener noreferrer"&gt;PigmentCSS&lt;/a&gt; is a modern, zero-runtime CSS-in-JS library developed by MUI, the team behind Material UI. Unlike traditional CSS-in-JS libraries like Emotion or styled-components, which often inject styles at runtime, PigmentCSS pre-processes and compiles all styles into static CSS files during the build process. This approach eliminates runtime overhead, leading to faster initial page loads and improved performance, especially for larger applications.&lt;/p&gt;

&lt;p&gt;If there’s anything you think I missed or if you have any thoughts to share, I’d love to hear them in the comments.&lt;/p&gt;

&lt;p&gt;Don’t forget to visit my YouTube channel, &lt;a href="https://www.youtube.com/@catwebdev" rel="noopener noreferrer"&gt;CatWebDev&lt;/a&gt;! If you find the content helpful, a like and subscription would be greatly appreciated.&lt;/p&gt;

&lt;p&gt;Thank you for reading! See you in the next one.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Emmet: A Productivity Booster for Web Developers.</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Thu, 23 May 2024 18:56:41 +0000</pubDate>
      <link>https://dev.to/catwebdev/emmet-a-productivity-booster-for-web-developers-2ni7</link>
      <guid>https://dev.to/catwebdev/emmet-a-productivity-booster-for-web-developers-2ni7</guid>
      <description>&lt;p&gt;Emmet is a productivity tool for web developers, particularly those who work with HTML, CSS, and XML. It allows developers to write code snippets that can be expanded into full, valid code blocks with a single keystroke. This tool is widely integrated into many popular text editors and Integrated Development Environments (IDEs).&lt;/p&gt;




&lt;h2&gt;
  
  
  Abbreviation Expansion.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt; uses short syntax to generate HTML and CSS code rapidly. As an 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;body&amp;gt;
  div&amp;gt;ul&amp;gt;li*3
&amp;lt;body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will produce&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;body&amp;gt;
&amp;lt;div&amp;gt;
    &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tag wrapping.
&lt;/h2&gt;

&lt;p&gt;It can wrap existing text of code with HTML tags, speeding up the process of structuring content.&lt;br&gt;
&lt;a href="https://docs.emmet.io/actions/wrap-with-abbreviation/"&gt;Link to the wrap with abbreviation examples&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code snippets.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt; includes many built-in snippets for common code patterns and allows users to create custom snippets.&lt;br&gt;
Custom code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "html": {
        "snippets": {
            "btn": "&amp;lt;button class=\"btn\"&amp;gt;${1:Submit}&amp;lt;/button&amp;gt;"
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typing &lt;code&gt;btn&lt;/code&gt; and expanding it will produce:&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;button class="btn"&amp;gt;Submit&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Attributes and Text.
&lt;/h2&gt;

&lt;p&gt;Abbreviations can include attributes and text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a[href="https://example.com"]{Example}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will produce:&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;a href="https://example.com"&amp;gt;Example&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CSS support.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt; also supports CSS, allowing for rapid writing of style rules. For instance in CSS file&lt;br&gt;
&lt;code&gt;* {&lt;br&gt;
  m0&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
It will produce:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  margin: 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dynamic Values.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt; can generate dynamic values such as incrementing numbers, making it useful for creating lists, IDs, classes, and more.&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&amp;gt;
  ul&amp;gt;li.item$*3
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will produce:&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&amp;gt;
  &amp;lt;ul&amp;gt;
    &amp;lt;li class="item1"&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li class="item2"&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li class="item3"&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt; significantly speeds up coding by reducing the amount of repetitive typing required, allowing developers to focus more on design and logic rather than the boilerplate code.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://emmet.io/"&gt;&lt;strong&gt;Emmet&lt;/strong&gt; website&lt;/a&gt;&lt;br&gt;
My YouTube channel is &lt;a href="https://www.youtube.com/channel/UC2pGphugSZ0Qp2zuXSOPx0g"&gt;catwebdev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
      <category>emmet</category>
    </item>
    <item>
      <title>Uncaught Error: No QueryClient set, use QueryClientProvider to set one</title>
      <dc:creator>CatWebDev</dc:creator>
      <pubDate>Mon, 08 Apr 2024 20:12:21 +0000</pubDate>
      <link>https://dev.to/catwebdev/uncaught-error-no-queryclient-set-use-queryclientprovider-to-set-one-5aa5</link>
      <guid>https://dev.to/catwebdev/uncaught-error-no-queryclient-set-use-queryclientprovider-to-set-one-5aa5</guid>
      <description>&lt;p&gt;Hello and welcome!&lt;/p&gt;

&lt;p&gt;If you encounter an error while using &lt;code&gt;@tanstack/react-query&lt;/code&gt; in your React Vite project, there's no need to panic. &lt;br&gt;
Check your imports related to React Query.&lt;/p&gt;

&lt;p&gt;You might be using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useQuery } from 'react-query';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useQuery } from '@tanstack/react-query';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;YouTube &lt;a href="https://www.youtube.com/channel/UC2pGphugSZ0Qp2zuXSOPx0g"&gt;@catwebdev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you for reading.&lt;br&gt;
See you in the next one!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>vite</category>
      <category>development</category>
    </item>
  </channel>
</rss>
