<?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: Selvi Parasakthi K</title>
    <description>The latest articles on DEV Community by Selvi Parasakthi K (@selviparasakthik).</description>
    <link>https://dev.to/selviparasakthik</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3610466%2F257de7ce-5e42-4ab1-a3b1-2bb2046cf5e5.jpeg</url>
      <title>DEV Community: Selvi Parasakthi K</title>
      <link>https://dev.to/selviparasakthik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/selviparasakthik"/>
    <language>en</language>
    <item>
      <title>RabbitMQ Tutorial for Beginners: Understanding Producer, Exchange, Queue, and Consumer</title>
      <dc:creator>Selvi Parasakthi K</dc:creator>
      <pubDate>Sat, 03 Oct 2026 10:38:54 +0000</pubDate>
      <link>https://dev.to/selviparasakthik/rabbitmq-tutorial-for-beginners-understanding-producer-exchange-queue-and-consumer-5haj</link>
      <guid>https://dev.to/selviparasakthik/rabbitmq-tutorial-for-beginners-understanding-producer-exchange-queue-and-consumer-5haj</guid>
      <description>&lt;p&gt;Modern applications are often built as a collection of independent services, and these services frequently need to communicate with each other.&lt;/p&gt;

&lt;p&gt;For example, when a user places an order, the system may need to create the order, update inventory, send an email, and trigger a notification.&lt;/p&gt;

&lt;p&gt;If all of these operations are handled synchronously within a single request, the application can become slower and the services become tightly coupled.&lt;/p&gt;

&lt;p&gt;A message broker such as &lt;strong&gt;RabbitMQ&lt;/strong&gt; helps solve this problem by allowing services to communicate asynchronously. Instead of directly calling another service, an application can publish a message to RabbitMQ, allowing the receiving service to process it independently.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is RabbitMQ?
&lt;/h2&gt;

&lt;p&gt;RabbitMQ is an open-source message broker. It allows different applications or services to communicate asynchronously by sending messages through a broker. Instead of one service directly calling another service, it can send a message to RabbitMQ and continue its work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main job of RabbitMQ is to:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Receive messages&lt;/li&gt;
&lt;li&gt;Route them&lt;/li&gt;
&lt;li&gt;Store them temporarily&lt;/li&gt;
&lt;li&gt;Deliver them reliably to consumers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;A simple RabbitMQ flow looks like this:&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;Producer → Exchange → Queue → Consumer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Think of RabbitMQ as a post office:&lt;/strong&gt;&lt;br&gt;
Producer → sends the letter&lt;br&gt;
Exchange → decides where the letter should go&lt;br&gt;
Queue → stores the letter&lt;br&gt;
Consumer → receives and processes the letter&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Do We Need RabbitMQ?
&lt;/h2&gt;

&lt;p&gt;RabbitMQ enables loosely coupled services to communicate asynchronously, allowing tasks to be processed independently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some common benefits are:&lt;/strong&gt;&lt;br&gt;
Decoupling – services don't need to directly depend on each other.&lt;br&gt;
Scalability – multiple consumers can process messages.&lt;br&gt;
Reliability – messages can remain in a queue until they are processed.&lt;br&gt;
Asynchronous processing – the producer doesn't have to wait for the consumer.&lt;br&gt;
Load balancing – multiple consumers can share the workload.&lt;br&gt;
Retry and Dead Letter support – failed messages can be handled separately.&lt;/p&gt;


&lt;h2&gt;
  
  
  Running RabbitMQ Locally with Docker
&lt;/h2&gt;

&lt;p&gt;The easiest way to experiment with RabbitMQ is using Docker.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 5672:5672 &lt;span class="nt"&gt;-p&lt;/span&gt; 15672:15672 rabbitmq:4-management
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RabbitMQ uses:&lt;/strong&gt;&lt;br&gt;
5672 → Port used by applications to connect to RabbitMQ and exchange messages using AMQP&lt;br&gt;
15672 → RabbitMQ Management UI&lt;/p&gt;

&lt;p&gt;This gives you a web interface where you can view exchanges, queues, messages, connections, and other RabbitMQ information.&lt;/p&gt;

&lt;p&gt;A simple local setup looks 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;Your Application
      |
      | AMQP
      ↓
localhost:5672
      |
      ↓
RabbitMQ Docker Container
      |
      └── Management UI
             ↓
       localhost:15672
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Core RabbitMQ Concepts
&lt;/h2&gt;

&lt;p&gt;To understand RabbitMQ, you mainly need to understand these concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Producer&lt;/li&gt;
&lt;li&gt;Exchange&lt;/li&gt;
&lt;li&gt;Queue&lt;/li&gt;
&lt;li&gt;Binding&lt;/li&gt;
&lt;li&gt;Consumer&lt;/li&gt;
&lt;li&gt;Channel&lt;/li&gt;
&lt;li&gt;Connection &lt;/li&gt;
&lt;li&gt;Virtual Host&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's understand them one by one.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Producer
&lt;/h2&gt;

&lt;p&gt;A producer is an application or service that publishes messages to RabbitMQ.&lt;/p&gt;

&lt;p&gt;Instead of sending a message directly to a queue, the producer sends it to an exchange. The exchange then uses its routing rules to determine which queue or queues should receive the message.&lt;/p&gt;

&lt;p&gt;The producer provides information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exchange name&lt;/li&gt;
&lt;li&gt;Routing key&lt;/li&gt;
&lt;li&gt;Message body&lt;/li&gt;
&lt;li&gt;Message properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;order_exchange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;order.created&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Selvi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;})),&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;persistent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application usually converts structured data such as JSON into bytes before sending it.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Exchange
&lt;/h2&gt;

&lt;p&gt;An exchange is the router of RabbitMQ. It receives messages from producers and decides which queue or queues should receive them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Producer
   |
   ↓
Exchange
   |
   ├──→ Queue A
   ├──→ Queue B
   └──→ Queue C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RabbitMQ provides different types of exchanges, each using a different routing strategy to determine which queues should receive a message.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Exchange Type&lt;/th&gt;
&lt;th&gt;Routing Strategy&lt;/th&gt;
&lt;th&gt;Typical Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Direct&lt;/td&gt;
&lt;td&gt;Routes messages using an exact routing-key match&lt;/td&gt;
&lt;td&gt;Send a message to a specific queue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fanout&lt;/td&gt;
&lt;td&gt;Routes messages to all queues bound to the exchange&lt;/td&gt;
&lt;td&gt;Broadcasting messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Topic&lt;/td&gt;
&lt;td&gt;Routes messages based on routing-key patterns&lt;/td&gt;
&lt;td&gt;Flexible event-based routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Headers&lt;/td&gt;
&lt;td&gt;Routes messages based on message headers&lt;/td&gt;
&lt;td&gt;Advanced routing scenarios&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
A topic exchange uses routing-key patterns to determine where messages should be delivered.&lt;/p&gt;

&lt;p&gt;For example, an application might publish events such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;order.created
order.updated
order.cancelled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Queue
&lt;/h2&gt;

&lt;p&gt;A queue is a FIFO buffer that stores messages until a consumer processes them.&lt;/p&gt;

&lt;p&gt;A message stays in the queue until it is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Acknowledged by a consumer&lt;/li&gt;
&lt;li&gt;Expired (TTL)&lt;/li&gt;
&lt;li&gt;Removed because the queue is deleted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When creating a queue, RabbitMQ provides several properties that control how the queue behaves and how long it remains available.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;durable&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Keeps the queue available after a RabbitMQ broker restart.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;exclusive&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Restricts the queue to the connection that created it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;autoDelete&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Automatically deletes the queue when it is no longer being used.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TTL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defines how long messages can remain before they expire.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DLX&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Specifies the Dead Letter Exchange used for messages that cannot be processed successfully.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For example, the following creates a durable queue that is not exclusive and is not automatically deleted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;orderQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;durable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;exclusive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;autoDelete&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;orderQueue&lt;/code&gt; will remain available even after the RabbitMQ broker restarts.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Binding
&lt;/h2&gt;

&lt;p&gt;A binding defines the relationship between an exchange and a queue. It tells RabbitMQ how messages should be routed from an exchange to a specific queue.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bindQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;emailQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;order_exchange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;order.email&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This binding tells RabbitMQ:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When a message is published to &lt;code&gt;order_exchange&lt;/code&gt; with the routing key &lt;code&gt;order.email&lt;/code&gt;, route it to &lt;code&gt;emailQueue&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Producer
   |
   | Routing Key: order.email
   ↓
order_exchange
   |
   ↓
emailQueue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An exchange can also be connected to multiple queues, each with its own routing rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              Exchange
                 |
       ┌─────────┼─────────┐
       ↓         ↓         ↓
    Queue A   Queue B   Queue C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This flexible routing mechanism allows different consumers to receive only the messages they are interested in.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Consumer
&lt;/h2&gt;

&lt;p&gt;A consumer is an application or service that receives messages from a queue and processes them.&lt;/p&gt;

&lt;p&gt;Once the consumer successfully processes a message, it sends an acknowledgement (ACK) to RabbitMQ. This tells RabbitMQ that the message has been handled successfully.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;consume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;orderQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Processing order:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The basic flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Queue
  ↓
Consumer receives message
  ↓
Process the message
  ↓
ACK
  ↓
RabbitMQ removes the message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ACK and NACK&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Acknowledgements are an important part of RabbitMQ's reliability mechanism.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;RabbitMQ behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;channel.ack(msg)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Message processed successfully&lt;/td&gt;
&lt;td&gt;Removes the message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;channel.nack(msg, false, true)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Processing failed, retry&lt;/td&gt;
&lt;td&gt;Requeues the message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;channel.nack(msg, false, false)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Processing failed, do not retry&lt;/td&gt;
&lt;td&gt;Discards it or routes it to a DLQ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consumer crashes before ACK&lt;/td&gt;
&lt;td&gt;Message was not completed&lt;/td&gt;
&lt;td&gt;Message becomes available again&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Manual Acknowledgement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For reliable message processing, manual acknowledgement is generally preferred.&lt;/p&gt;

&lt;p&gt;With manual acknowledgement, RabbitMQ waits for the consumer to explicitly confirm that the message was successfully processed.&lt;/p&gt;

&lt;p&gt;If the consumer crashes before sending an ACK, RabbitMQ can make the message available for processing again.&lt;/p&gt;

&lt;p&gt;With automatic acknowledgement, RabbitMQ considers the message successfully handled as soon as it is delivered to the consumer. If the application crashes while processing the message, that message may be lost.&lt;/p&gt;

&lt;p&gt;So, the important idea is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ACK means "I successfully processed this message." NACK means "I could not process this message."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Dead Letter Queue (DLQ)
&lt;/h3&gt;

&lt;p&gt;What happens when a message repeatedly fails to process?&lt;/p&gt;

&lt;p&gt;Continuously retrying the same message can block processing, while simply discarding it can result in data loss.&lt;/p&gt;

&lt;p&gt;RabbitMQ provides &lt;strong&gt;Dead Letter Exchanges (DLX)&lt;/strong&gt; to handle such messages. When a message cannot be successfully processed, it can be routed through a DLX to a &lt;strong&gt;Dead Letter Queue (DLQ)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The DLQ allows failed messages to be stored separately so they can be &lt;strong&gt;inspected, investigated, or reprocessed&lt;/strong&gt; later.&lt;/p&gt;

&lt;p&gt;The flow looks 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;Main Queue
    |
    | Processing fails
    ↓
Dead Letter Exchange (DLX)
    |
    ↓
Dead Letter Queue (DLQ)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mainQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x-dead-letter-exchange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dlx_exchange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x-dead-letter-routing-key&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dead.msg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dlqQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bindQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dlqQueue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dlx_exchange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dead.msg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;mainQueue&lt;/code&gt; is configured with a Dead Letter Exchange. Messages that are dead-lettered are routed through &lt;code&gt;dlx_exchange&lt;/code&gt; and delivered to &lt;code&gt;dlqQueue&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This provides a safer way to handle messages that cannot be processed successfully without silently losing them.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Channel
&lt;/h2&gt;

&lt;p&gt;A channel is a lightweight virtual connection inside a TCP connection.&lt;/p&gt;

&lt;p&gt;Creating TCP connections is relatively expensive, so applications can create multiple channels over one connection.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application
     |
 TCP Connection
     |
 ┌───┼────────┐
 ↓   ↓        ↓
Ch1  Ch2      Ch3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Channels can be used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Publishing messages&lt;/li&gt;
&lt;li&gt;Consuming messages&lt;/li&gt;
&lt;li&gt;Declaring queues&lt;/li&gt;
&lt;li&gt;Managing RabbitMQ resources&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Connection
&lt;/h2&gt;

&lt;p&gt;A connection is the actual TCP connection between your application and RabbitMQ.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;amqp://localhost:5672
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application connects to RabbitMQ using the AMQP protocol.&lt;/p&gt;

&lt;p&gt;One RabbitMQ server can have connections from many different applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Virtual Host (vHost)
&lt;/h2&gt;

&lt;p&gt;A virtual host is a logical namespace inside RabbitMQ.&lt;/p&gt;

&lt;p&gt;Each vHost can have its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exchanges&lt;/li&gt;
&lt;li&gt;Queues&lt;/li&gt;
&lt;li&gt;Bindings&lt;/li&gt;
&lt;li&gt;Permissions&lt;/li&gt;
&lt;li&gt;For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RabbitMQ
│
├── /dev
│    ├── queues
│    └── exchanges
│
└── /prod
     ├── queues
     └── exchanges
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful when separating environments or tenants.&lt;/p&gt;

&lt;p&gt;You can think of a vHost somewhat like a separate logical database inside a database system.&lt;/p&gt;




&lt;h3&gt;
  
  
  What is AMQP?
&lt;/h3&gt;

&lt;p&gt;AMQP (Advanced Message Queuing Protocol) is a messaging protocol used by RabbitMQ to define how applications and the broker communicate.&lt;/p&gt;

&lt;p&gt;Similar to how HTTP defines communication between web clients and servers, AMQP defines how messages are published, routed, delivered, and acknowledged between producers, RabbitMQ, and consumers.&lt;/p&gt;

&lt;p&gt;For example, when a producer publishes a message, RabbitMQ uses AMQP to handle information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which exchange should receive the message&lt;/li&gt;
&lt;li&gt;Which routing key should be used&lt;/li&gt;
&lt;li&gt;Message properties and payload&lt;/li&gt;
&lt;li&gt;How the message is delivered to consumers&lt;/li&gt;
&lt;li&gt;How acknowledgements are handled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At a lower level, these operations are transmitted as &lt;strong&gt;AMQP frames over a TCP connection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In simple terms:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AMQP is the communication protocol that defines how your application and RabbitMQ exchange messages.&lt;/p&gt;
&lt;/blockquote&gt;




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

&lt;p&gt;RabbitMQ becomes much easier to understand once the core message flow is clear:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Producer → Exchange → Queue → Consumer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there, concepts such as &lt;strong&gt;bindings, routing keys, acknowledgements, retries, Dead Letter Queues, channels, connections, and vHosts&lt;/strong&gt; fit naturally into the overall architecture.&lt;/p&gt;

&lt;p&gt;This article covers the fundamentals I learned while exploring RabbitMQ. I hope it helps anyone who is getting started with message brokers and asynchronous communication.&lt;/p&gt;

&lt;p&gt;If you have any questions, suggestions, feel free to share them in the comments. I'd be happy to learn and discuss with you!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Use React Components Inside Angular (Step-by-Step Guide)</title>
      <dc:creator>Selvi Parasakthi K</dc:creator>
      <pubDate>Tue, 31 Mar 2026 08:10:42 +0000</pubDate>
      <link>https://dev.to/selviparasakthik/how-to-use-react-components-inside-angular-step-by-step-guide-4a91</link>
      <guid>https://dev.to/selviparasakthik/how-to-use-react-components-inside-angular-step-by-step-guide-4a91</guid>
      <description>&lt;p&gt;In real-world projects, teams often work with multiple frameworks like &lt;strong&gt;React&lt;/strong&gt; and &lt;strong&gt;Angular&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But what if you already built a component in React and want to reuse it inside an Angular application?&lt;/p&gt;

&lt;p&gt;👉 Do you need to rewrite everything?&lt;br&gt;
👉 Or is there a smarter way?&lt;/p&gt;

&lt;p&gt;Good news: &lt;strong&gt;You can directly use React components inside Angular&lt;/strong&gt; using &lt;strong&gt;Web Components&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this blog, I’ll walk you through a &lt;strong&gt;step-by-step process with clear explanations&lt;/strong&gt;, so even if you try this for the first time, it will work.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧠 Understanding the Idea First
&lt;/h2&gt;

&lt;p&gt;Before jumping into code, let’s understand what we are doing.&lt;/p&gt;

&lt;p&gt;React components are not directly compatible with Angular because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React uses a Virtual DOM&lt;/li&gt;
&lt;li&gt;Angular uses its own template system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So they don’t “talk” to each other natively.&lt;/p&gt;
&lt;h3&gt;
  
  
  💡 Solution: Web Components
&lt;/h3&gt;

&lt;p&gt;Web Components are browser-native custom HTML elements.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;random-picker&amp;gt;&amp;lt;/random-picker&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we convert a React component into a Web Component:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Angular treats it like a normal HTML tag&lt;/li&gt;
&lt;li&gt;No framework conflict&lt;/li&gt;
&lt;li&gt;Fully reusable&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠 Step 1: Create a React Project
&lt;/h2&gt;

&lt;p&gt;We’ll first build our React component separately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vite@latest random-picker
&lt;span class="nb"&gt;cd &lt;/span&gt;random-picker
npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  👉 Why Vite?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fast build tool&lt;/li&gt;
&lt;li&gt;Simple configuration&lt;/li&gt;
&lt;li&gt;Perfect for creating reusable components&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Step 2: Install r2wc
&lt;/h2&gt;

&lt;p&gt;We use a library to convert React → Web Component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @r2wc/react-to-web-component
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  👉 Why this library?
&lt;/h3&gt;

&lt;p&gt;Normally, converting React into a Web Component requires a lot of manual work.&lt;/p&gt;

&lt;p&gt;This package:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wraps your React component&lt;/li&gt;
&lt;li&gt;Handles lifecycle&lt;/li&gt;
&lt;li&gt;Maps props automatically&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚛️ Step 3: Create a Simple React Component
&lt;/h2&gt;

&lt;p&gt;Now let’s create a clean and minimal component (no CSS, so beginners can focus on logic).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/RandomPicker.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Props&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;RandomPicker&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pick one&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;Props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setResult&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Function to pick a random item&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;randomItem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
      &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)];&lt;/span&gt;

    &lt;span class="nf"&gt;setResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;randomItem&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// send result back (optional)&lt;/span&gt;
    &lt;span class="nx"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;?.(&lt;/span&gt;&lt;span class="nx"&gt;randomItem&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;pick&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Pick Random&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Result: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🧩 What’s happening here?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;items&lt;/code&gt; → list of values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;title&lt;/code&gt; → heading&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;onResult&lt;/code&gt; → callback function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pick()&lt;/code&gt; → selects a random item&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is just a normal React component.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔁 Step 4: Convert React to Web Component
&lt;/h2&gt;

&lt;p&gt;Now comes the important part - converting your React component into something Angular can understand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/random-picker-wc.ts&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;r2wc&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@r2wc/react-to-web-component&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;RandomPicker&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/RandomPicker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RandomPickerWC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;r2wc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;RandomPicker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Register as HTML element&lt;/span&gt;
&lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;random-picker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;RandomPickerWC&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🔍 Deep Explanation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  📌 React → Angular Compatibility Problem
&lt;/h4&gt;

&lt;p&gt;React and Angular are built on completely different architectures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React uses a Virtual DOM&lt;/li&gt;
&lt;li&gt;Angular uses template-driven rendering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because of this difference, Angular cannot directly render a React component.&lt;br&gt;
To make them work together, we need a framework-independent layer — this is where Web Components come in.&lt;/p&gt;
&lt;h4&gt;
  
  
  📌 Role of &lt;code&gt;r2wc()&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;The r2wc function acts as a bridge between React and the browser.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It wraps your React component&lt;/li&gt;
&lt;li&gt;Converts it into a native Custom Element&lt;/li&gt;
&lt;li&gt;Handles mounting, updating, and unmounting internally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After this conversion, your React component behaves like a normal HTML tag.&lt;/p&gt;

&lt;p&gt;👉 In simple terms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;React Component → Web Component → Usable in Angular
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📌 Why We Define &lt;code&gt;props&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Web Components don’t receive JavaScript props like React.&lt;br&gt;
They receive HTML attributes, which are always strings.&lt;/p&gt;

&lt;p&gt;So we must explicitly define how each prop should be interpreted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;onResult&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📌 Understanding Each Prop Type
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;json&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Used when passing arrays or objects&lt;/li&gt;
&lt;li&gt;Converts string → actual JavaScript data&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;"['Apple','Mango']"&lt;/code&gt; → &lt;code&gt;["Apple","Mango"]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;string&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Used for simple text values&lt;/li&gt;
&lt;li&gt;Passed directly without transformation&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;function&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Used for callbacks/events&lt;/li&gt;
&lt;li&gt;Enables communication from React → Angular&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  📌 Role of &lt;code&gt;customElements.define()&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;random-picker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;RandomPickerWC&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This step registers your component in the browser.&lt;/p&gt;

&lt;p&gt;After registration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;random-picker&amp;gt;&lt;/code&gt; becomes a valid HTML element&lt;/li&gt;
&lt;li&gt;It can be used anywhere (Angular, HTML, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser will not recognize your component&lt;/li&gt;
&lt;li&gt;Nothing will render&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the browser understands this element.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ Step 5: Build React Project (Using vite)
&lt;/h2&gt;

&lt;p&gt;Instead of doing a normal build, we configure Vite to generate a reusable Web Component bundle.&lt;/p&gt;

&lt;p&gt;🧩 Create Vite Config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// vite.config.ts&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vite&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@vitejs/plugin-react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;react&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;lib&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src/random-picker-wc.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;RandomPicker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;random-picker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;formats&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;es&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;cssCodeSplit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This generates a file inside the &lt;code&gt;dist&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dist/random-picker.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This file contains your Web Component ready to use in Angular.&lt;/p&gt;




&lt;h2&gt;
  
  
  🅰️ Step 6: Setup Angular Project
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng new angular-app
&lt;span class="nb"&gt;cd &lt;/span&gt;angular-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔗 Step 7: Load React Script in Angular
&lt;/h2&gt;

&lt;p&gt;Open &lt;code&gt;angular.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add your React build file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"src/assets/random-picker.js"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure you copy &lt;code&gt;random-picker.js&lt;/code&gt; from the React &lt;code&gt;dist&lt;/code&gt; folder into Angular &lt;code&gt;src/assets/&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  👉 Why this step?
&lt;/h3&gt;

&lt;p&gt;Angular doesn’t know about your React component.&lt;br&gt;
So we manually load the script globally.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚠️ Step 8: Enable Custom Elements in Angular
&lt;/h2&gt;

&lt;p&gt;Angular throws an error for unknown HTML tags.&lt;/p&gt;

&lt;p&gt;To fix that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;CUSTOM_ELEMENTS_SCHEMA&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;schemas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;CUSTOM_ELEMENTS_SCHEMA&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  👉 Why?
&lt;/h3&gt;

&lt;p&gt;This tells Angular:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Don’t complain about unknown elements — I know what I’m doing.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧩 Step 9: Use React Component in Angular
&lt;/h2&gt;

&lt;p&gt;Now you can use your React Web Component just like a normal HTML element in Angular.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;random-picker&lt;/span&gt;
  &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Fruits Picker"&lt;/span&gt;
  &lt;span class="na"&gt;[attr.items]=&lt;/span&gt;&lt;span class="s"&gt;"'[\"&lt;/span&gt;&lt;span class="na"&gt;Apple&lt;/span&gt;&lt;span class="err"&gt;\",\"&lt;/span&gt;&lt;span class="na"&gt;Mango&lt;/span&gt;&lt;span class="err"&gt;\",\"&lt;/span&gt;&lt;span class="na"&gt;Orange&lt;/span&gt;&lt;span class="err"&gt;\"]'"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&amp;lt;/random-picker&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🎉 Final Result
&lt;/h2&gt;

&lt;p&gt;Now your Angular app renders a React component 🎯&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React logic runs inside&lt;/li&gt;
&lt;li&gt;Angular displays it&lt;/li&gt;
&lt;li&gt;Both work together seamlessly&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧾 Summary (What You Learned)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;React and Angular are not directly compatible&lt;/li&gt;
&lt;li&gt;Web Components act as a bridge&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r2wc&lt;/code&gt; simplifies conversion&lt;/li&gt;
&lt;li&gt;Angular can consume custom elements easily&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔥 When Should You Use This?
&lt;/h2&gt;

&lt;p&gt;This approach is perfect when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want to reuse React components&lt;/li&gt;
&lt;li&gt;Multiple teams use different frameworks&lt;/li&gt;
&lt;li&gt;You are building a shared component library&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚠️ Common Mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;❌ Forgetting &lt;code&gt;CUSTOM_ELEMENTS_SCHEMA&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;❌ Not adding script in &lt;code&gt;angular.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;❌ Passing objects instead of JSON string&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🙌 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This technique is extremely powerful.&lt;/p&gt;

&lt;p&gt;Once you understand this pattern, you can:&lt;br&gt;
👉 Use React components inside Angular applications&lt;br&gt;
👉 Reuse UI across different projects and frameworks&lt;br&gt;
👉 Build framework-independent UI libraries&lt;/p&gt;




&lt;p&gt;If this helped you, feel free to ❤️ and share!&lt;/p&gt;

&lt;p&gt;Happy coding 🚀&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>react</category>
      <category>angular</category>
      <category>frontend</category>
    </item>
    <item>
      <title>How to Use Styled Components in React with Dynamic Props (Beginner Friendly Guide)</title>
      <dc:creator>Selvi Parasakthi K</dc:creator>
      <pubDate>Sun, 22 Feb 2026 15:05:16 +0000</pubDate>
      <link>https://dev.to/selviparasakthik/how-to-use-styled-components-in-react-with-dynamic-props-beginner-friendly-guide-2kbi</link>
      <guid>https://dev.to/selviparasakthik/how-to-use-styled-components-in-react-with-dynamic-props-beginner-friendly-guide-2kbi</guid>
      <description>&lt;p&gt;When building modern React applications, styling plays a major role in making the UI dynamic and reusable.&lt;/p&gt;

&lt;p&gt;Instead of writing separate CSS files, Styled Components allows us to write actual CSS inside JavaScript and also apply styles dynamically using props.&lt;/p&gt;

&lt;p&gt;In this blog, let's learn&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is styled-components&lt;/li&gt;
&lt;li&gt;How to install styled-components&lt;/li&gt;
&lt;li&gt;How styled-components work&lt;/li&gt;
&lt;li&gt;How to pass dynamic props&lt;/li&gt;
&lt;li&gt;How to style UI based on props like

&lt;ul&gt;
&lt;li&gt;Background color&lt;/li&gt;
&lt;li&gt;Text Color&lt;/li&gt;
&lt;li&gt;Border Radius&lt;/li&gt;
&lt;li&gt;Image&lt;/li&gt;
&lt;li&gt;Shape&lt;/li&gt;
&lt;li&gt;Shadow&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. What is styled-component
&lt;/h3&gt;

&lt;p&gt;Styled Components is a &lt;strong&gt;CSS-in-JS&lt;/strong&gt; library that allows developers to write CSS directly inside JavaScript. It helps in creating reusable styled UI components while also enabling dynamic styling through props.&lt;/p&gt;

&lt;p&gt;By using Styled Components, we can avoid class name conflicts and maintain a clean, component-based styling approach within our React applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Install Styled Components Package
&lt;/h3&gt;

&lt;p&gt;First, install the required packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install styled-components
npm install --save-dev @types/styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. How styled-component work
&lt;/h3&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from "styled-components";

export const Title = styled.h1`
  color: blue;
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now &lt;code&gt;Title&lt;/code&gt; becomes a styled React component which we can use like:&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;Title&amp;gt;Hello World&amp;lt;/Title&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Dynamic Styling Using Props
&lt;/h3&gt;

&lt;p&gt;The real power of &lt;code&gt;styled-components&lt;/code&gt; comes when we pass props.&lt;br&gt;
We can change the UI dynamically based on user input or state values.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Creating a Dynamic Card Component
&lt;/h3&gt;

&lt;p&gt;Let’s create a profile card where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Background color is dynamic&lt;/li&gt;
&lt;li&gt;Text color is dynamic&lt;/li&gt;
&lt;li&gt;Border radius is dynamic&lt;/li&gt;
&lt;li&gt;Shadow is toggleable&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Step 1: Create Styled Card
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Card = styled.div&amp;lt;{
  bg: string;
  textColor: string;
  radius: number;
  shadow: boolean;
}&amp;gt;`
  width: 300px;
  padding: 20px;
  text-align: center;

  background: ${({ bg }) =&amp;gt; bg};
  color: ${({ textColor }) =&amp;gt; textColor};
  border-radius: ${({ radius }) =&amp;gt; radius}px;

  transition: 0.3s;

  ${({ shadow }) =&amp;gt;
    shadow &amp;amp;&amp;amp;
    `
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  `}
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Passing Image as Background&lt;/strong&gt;&lt;br&gt;
Instead of using an &lt;code&gt;&amp;lt;img/&amp;gt;&lt;/code&gt; tag, we can also apply image dynamically as a background.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2: Create Avatar Component
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Avatar = styled.div&amp;lt;{
  shape: string;
  image: string;
}&amp;gt;`
  width: 100px;
  height: 100px;

  border-radius: ${({ shape }) =&amp;gt;
    shape === "circle" ? "50%" : "12px"};

  background: url(${props =&amp;gt; props.image})
    center/cover no-repeat;
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;image&lt;/code&gt;→ Dynamic image URL&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shape&lt;/code&gt; → Circle or square avatar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Using Styled Components in React&lt;/strong&gt;&lt;br&gt;
Now let’s pass these props from our React component.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 3: Profile Card Component
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type Props = {
  name: string;
  role: string;
  bg: string;
  textColor: string;
  radius: number;
  shadow: boolean;
  shape: string;
  image: string;
};

export default function ProfileCard(props: Props) {
  return (
    &amp;lt;Card
      bg={props.bg}
      textColor={props.textColor}
      radius={props.radius}
      shadow={props.shadow}
    &amp;gt;
      &amp;lt;Avatar
        shape={props.shape}
        image={props.image}
      /&amp;gt;

      &amp;lt;h2&amp;gt;{props.name}&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;{props.role}&amp;lt;/p&amp;gt;
    &amp;lt;/Card&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Passing Values from State&lt;/strong&gt;&lt;br&gt;
We can now control the styles dynamically using React state.&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;ProfileCard
  name="John Doe"
  role="Frontend Developer"
  bg="#ffffff"
  textColor="#000000"
  radius={12}
  shadow={true}
  shape="circle"
  image="https://i.pravatar.cc/100"
/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changing &lt;code&gt;bg&lt;/code&gt; will change background color&lt;/li&gt;
&lt;li&gt;Changing &lt;code&gt;textColor&lt;/code&gt; will update text&lt;/li&gt;
&lt;li&gt;Changing &lt;code&gt;radius&lt;/code&gt; will update card shape&lt;/li&gt;
&lt;li&gt;Changing &lt;code&gt;shape&lt;/code&gt; will update avatar&lt;/li&gt;
&lt;li&gt;Changing &lt;code&gt;image&lt;/code&gt; will update avatar background
All UI updates dynamically ✨&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚀 Conclusion
&lt;/h3&gt;

&lt;p&gt;Styled Components helps us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep styling close to components&lt;/li&gt;
&lt;li&gt;Create reusable UI&lt;/li&gt;
&lt;li&gt;Apply styles dynamically&lt;/li&gt;
&lt;li&gt;Build interactive UI easily&lt;/li&gt;
&lt;li&gt;Maintain clean code structure
Using props, we can control the complete UI styling from React state without writing separate CSS files.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>react</category>
      <category>styledcomponents</category>
    </item>
    <item>
      <title>🚀Understanding Webpack: A begineer friendly Guide with Examples</title>
      <dc:creator>Selvi Parasakthi K</dc:creator>
      <pubDate>Sat, 15 Nov 2025 09:19:02 +0000</pubDate>
      <link>https://dev.to/selviparasakthik/understanding-webpack-a-begineer-friendly-guide-with-examples-3dp</link>
      <guid>https://dev.to/selviparasakthik/understanding-webpack-a-begineer-friendly-guide-with-examples-3dp</guid>
      <description>&lt;p&gt;Webpack is one of the most powerful tools in modern JavaScript development. If you're building a front-end application, you've almost certainly seen it in action—even if you didn't notice it.&lt;/p&gt;

&lt;p&gt;This blog breaks down what Webpack does, why it matters, and how to set up a basic Webpack configuration with loaders, CSS/SASS support, and JS minification.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Webpack?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Webpack is a static module bundler for modern JavaScript applications.&lt;br&gt;
When Webpack processes your application, it creates an internal dependency graph starting from one or more entry points—then bundles all modules (JS, CSS, images, etc.) into one or more optimized files.&lt;/p&gt;

&lt;p&gt;In simple words:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Webpack bundles your project's files (JS, CSS, images…)&lt;br&gt;
into fewer, optimized files so your application loads faster.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Sample Project Setup&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Reference repository:&lt;br&gt;
👉&lt;a href="https://github.com/Selvi-Parasakthi-K/webpack-practice" rel="noopener noreferrer"&gt;https://github.com/Selvi-Parasakthi-K/webpack-practice&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Initialize the Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a &lt;code&gt;package.json&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install Webpack and Webpack CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i webpack webpack-cli --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add &lt;code&gt;"build": "webpack"&lt;/code&gt; in the scripts section, so running &lt;code&gt;npm run build&lt;/code&gt; will trigger Webpack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
  "build": "webpack"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Create webpack.config.js&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 path = require("path");

module.exports = {
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.resolve(__dirname, "./dist"),
  },
  mode: "none",
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells webpack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;entry&lt;/strong&gt; → starting file of your app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;output&lt;/strong&gt; → where to store bundled files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;mode&lt;/strong&gt; → can be "development", "production", or "none"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Loaders in Webpack&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Loaders allow Webpack to handle non-JavaScript files like images, CSS, and SASS.&lt;/p&gt;

&lt;p&gt;Think of loaders as translators—Webpack doesn’t understand images or CSS by default, so loaders help convert them into modules.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Image Loader Example&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Install &lt;code&gt;file-loader&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i file-loader --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add loader rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module: {
  rules: [
    {
      test: /\.(jfif|png)$/,
      use: ["file-loader"],
    },
  ],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Setting the Public Path&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Public path tells Webpack where the final bundled files (like images) will be loaded from in the browser. It basically sets the base URL for all assets so the browser knows the correct location to fetch them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;output: {
  filename: "bundle.js",
  path: path.resolve(__dirname, "./dist"),
  publicPath: "./dist/",
},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures images get the correct URL in the final bundle.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Adding CSS Support&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Install these loaders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;css-loader → lets Webpack understand CSS files&lt;/li&gt;
&lt;li&gt;style-loader → injects CSS into the browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Order matters → loaders run from right to left&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  test: /\.css$/,
  use: ["style-loader", "css-loader"], 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If reversed, Webpack will fail.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Adding SASS/SCSS Support&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i sass sass-loader style-loader css-loader --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  test: /\.scss$/,
  use: [
    "style-loader",
    "css-loader",
    {
      loader: "sass-loader",
      options: {
        implementation: require("sass"),
      },
    },
  ],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Plugins in Webpack&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Plugins in Webpack allow you to perform extra tasks during the build process—like optimizing, minifying, or transforming files—that go beyond what loaders can do.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Minifying JavaScript (Production Optimization)&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Use &lt;code&gt;terser-webpack-plugin&lt;/code&gt; to minify JS.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install terser-webpack-plugin --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add to your config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");

module.exports = {
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.resolve(__dirname, "./dist"),
    publicPath: "./dist/",
  },
  mode: "none",
  module: {
    rules: [],
  },
  plugins: [new TerserPlugin()],
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This reduces file size and improves performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🎯 Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Webpack may look complex at first, but once you understand the basics—entry, output, loaders, and plugins—it becomes an incredibly powerful tool.&lt;/p&gt;

&lt;p&gt;With this setup, you can:&lt;/p&gt;

&lt;p&gt;✔ Bundle JavaScript&lt;br&gt;
✔ Load images&lt;br&gt;
✔ Add CSS &amp;amp; SASS support&lt;br&gt;
✔ Minify and optimize output&lt;/p&gt;

&lt;p&gt;You now have a complete Webpack setup suitable for any small or medium JavaScript project!&lt;/p&gt;

</description>
      <category>webpack</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
