{"id":101598,"date":"2025-03-15T06:03:44","date_gmt":"2025-03-15T02:33:44","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/building-a-notification-system-in-react-using-the-pub-sub-pattern-58jd\/"},"modified":"2025-03-15T06:03:44","modified_gmt":"2025-03-15T02:33:44","slug":"building-a-notification-system-in-react-using-the-pub-sub-pattern-58jd","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/building-a-notification-system-in-react-using-the-pub-sub-pattern-58jd\/","title":{"rendered":"\ud83d\ude80 \u0633\u0627\u062e\u062a\u0646 \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0627\u0639\u0644\u0627\u0646 \u062f\u0631 \u0648\u0627\u06a9\u0646\u0634 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u0644\u06af\u0648\u06cc \u0645\u06cc\u062e\u0627\u0646\u0647 \u0632\u06cc\u0631"},"content":{"rendered":"<div data-article-id=\"2334005\" id=\"article-body\">\n<p>\u062e\u062f\u0627\u062d\u0627\u0641\u0638\u06cc \u0627\u0632 \u062d\u0641\u0627\u0631\u06cc \u0648 \u0632\u0645\u06cc\u0646\u0647! \ud83c\udf89<\/p>\n<p><strong>\u0645\u0642\u062f\u0645\u0647<\/strong><br \/>\u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 React \u0628\u0647 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f &#8211; \u062e\u0648\u0627\u0647 \u06cc\u06a9 \u067e\u06cc\u0627\u0645 \u0645\u0648\u0641\u0642\u06cc\u062a \u060c \u0647\u0634\u062f\u0627\u0631 \u062e\u0637\u0627 \u0628\u0627\u0634\u062f \u06cc\u0627 \u06cc\u06a9 \u0646\u0627\u0646 \u062a\u0633\u062a \u0647\u0634\u062f\u0627\u0631 \u062f\u0647\u0646\u062f\u0647. \u0627\u0645\u0627 \u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0631\u0627 \u062f\u0631 \u0633\u0637\u062d \u062c\u0647\u0627\u0646 \u0628\u062f\u0648\u0646 \u0631\u062f\u0648\u06a9\u0633 \u060c \u0632\u0645\u06cc\u0646\u0647 \u06cc\u0627 \u062d\u0641\u0627\u0631\u06cc \u067e\u0631\u0648\u0627\u0646\u0647 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u06cc\u0645\u061f<\/p>\n<p><strong>\u062c\u0648\u0627\u0628<\/strong>: \u0627\u0644\u06af\u0648\u06cc \u0627\u0646\u062a\u0634\u0627\u0631-\u0627\u0634\u062a\u0631\u0627\u06a9 (\u0645\u06cc\u062e\u0627\u0646\u0647)!<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u067e\u0633\u062a \u060c \u0645\u0627 \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0627\u0639\u0644\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f \u06a9\u0647:<br \/>\u2705 \u0628\u0647 \u062c\u0627\u06cc \u0632\u0645\u06cc\u0646\u0647 \u06cc\u0627 \u0631\u062f\u0648\u06a9\u0633 \u0627\u0632 \u0645\u06cc\u062e\u0627\u0646\u0647 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f<br \/>\u2705 \u062f\u0631 \u0633\u0637\u062d \u062c\u0647\u0627\u0646\u06cc \u0628\u062f\u0648\u0646 \u062d\u0641\u0627\u0631\u06cc \u067e\u0631\u0648\u0627\u0646\u0647 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f<br \/>\u2705 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0631\u0627 \u0631\u062f \u0645\u06cc \u06a9\u0646\u062f<br \/>\u2705 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627\u06cc \u067e\u0634\u062a\u0647 \u062f\u0631 \u0628\u0627\u0644\u0627\u06cc \u06cc\u06a9\u062f\u06cc\u06af\u0631<\/p>\n<hr\/>\n<p>\ud83e\udde0 <strong>\u0627\u0644\u06af\u0648\u06cc Pub-Sub \u0686\u06cc\u0633\u062a\u061f<\/strong><br \/>\u0627\u0644\u06af\u0648\u06cc \u0627\u0646\u062a\u0634\u0627\u0631-\u0627\u0634\u062a\u0631\u0627\u06a9 (Pub-Sub) \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u067e\u06cc\u0627\u0645 \u0631\u0633\u0627\u0646\u06cc \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0622\u0646:<\/p>\n<p>\u0646\u0627\u0634\u0631\u0627\u0646 \u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627\u06cc\u06cc \u0631\u0627 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc \u06a9\u0646\u0646\u062f.<br \/>\u0645\u0634\u062a\u0631\u06a9\u06cc\u0646 \u0628\u0647 \u0622\u0646 \u0648\u0642\u0627\u06cc\u0639 \u06af\u0648\u0634 \u0645\u06cc \u062f\u0647\u0646\u062f \u0648 \u0628\u0631 \u0627\u06cc\u0646 \u0627\u0633\u0627\u0633 \u0648\u0627\u06a9\u0646\u0634 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u0646\u062f.<br \/>\u0627\u06cc\u0646 \u0627\u0645\u0631 \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0645\u0646\u0627\u0633\u0628 \u0645\u06cc \u06a9\u0646\u062f \u0632\u06cc\u0631\u0627 \u0647\u0631 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u06cc\u06a9 \u0631\u0648\u06cc\u062f\u0627\u062f \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u062f \u060c \u0648 \u0633\u06cc\u0633\u062a\u0645 \u0627\u0639\u0644\u0627\u0646 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0622\u0646 \u0631\u0627 \u0627\u062f\u0627\u0631\u0647 \u0645\u06cc \u06a9\u0646\u062f &#8211; \u0628\u062f\u0648\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0645\u0633\u062a\u0642\u06cc\u0645!<\/p>\n<hr\/>\n<p>\ud83d\udee0 <strong>\u0645\u0631\u062d\u0644\u0647 1: \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0627\u062a\u0648\u0628\u0648\u0633 \u0631\u0648\u06cc\u062f\u0627\u062f (\u0628\u0631\u0646\u0627\u0645\u0647 Pub-Sub)<\/strong><br \/>\u0627\u0632 \u0622\u0646\u062c\u0627 \u06a9\u0647 JavaScript \u0641\u0627\u0642\u062f \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0632\u06cc\u0631 \u0645\u06cc\u062e\u0627\u0646\u0647 \u062f\u0627\u062e\u0644\u06cc \u0627\u0633\u062a \u060c \u0645\u0627 \u06cc\u06a9 \u0627\u062a\u0648\u0628\u0648\u0633 \u0631\u0648\u06cc\u062f\u0627\u062f \u0633\u0628\u06a9 \u0648\u0632\u0646 \u0627\u06cc\u062c\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f.<\/p>\n<p>\ud83d\udd39 \u06cc\u06a9 \u067e\u0631\u0648\u0646\u062f\u0647 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f: eventbus.js<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>const eventBus = {\n  events: {},\n\n  subscribe(eventName, callback) {\n    if (!this.events[eventName]) {\n      this.events[eventName] = [];\n    }\n    this.events[eventName].push(callback);\n\n    \/\/ Return unsubscribe function\n    return () =&gt; {\n      this.events[eventName] = this.events[eventName].filter(fn =&gt; fn !== callback);\n    };\n  },\n\n  publish(eventName, data) {\n    if (this.events[eventName]) {\n      this.events[eventName].forEach(callback =&gt; callback(data));\n    }\n  }\n};\n\nexport default eventBus;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\ud83d\udd0d <strong>\u0686\u06af\u0648\u0646\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f<\/strong>:<br \/>\u2705 \u0645\u0634\u062a\u0631\u06a9 \u0634\u062f\u0646 (\u0646\u0627\u0645 EventName \u060c \u067e\u0627\u0633\u062e \u0628\u0647 \u062a\u0645\u0627\u0633): \u06cc\u06a9 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0627 \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u0631\u0648\u06cc\u062f\u0627\u062f \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u06a9\u0646\u062f.<br \/>\u2705 \u0627\u0646\u062a\u0634\u0627\u0631 (EventName \u060c Data): \u0647\u0645\u0647 \u062a\u0645\u0627\u0633 \u0647\u0627\u06cc \u062a\u0645\u0627\u0633 \u062a\u0644\u0641\u0646\u06cc \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0631\u0648\u06cc\u062f\u0627\u062f \u06af\u0648\u0634 \u0645\u06cc \u062f\u0647\u062f.<br \/>\u2705 \u06cc\u06a9 \u0639\u0645\u0644\u06a9\u0631\u062f \u0646\u0627\u0645\u0634\u062e\u0635 \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f \u062a\u0627 \u062f\u0631 \u0635\u0648\u0631\u062a \u0644\u0632\u0648\u0645 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0634\u0646\u0648\u0646\u062f\u06af\u0627\u0646 \u0631\u0627 \u062a\u0645\u06cc\u0632 \u06a9\u0646\u06cc\u0645.<\/p>\n<hr\/>\n<p>\ud83d\udccc <strong>\u0645\u0631\u062d\u0644\u0647 2: \u0645\u0624\u0644\u0641\u0647 \u0644\u06cc\u0633\u062a \u0627\u0639\u0644\u0627\u0646 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f<\/strong><br \/>\u0644\u06cc\u0633\u062a \u0627\u0639\u0644\u0627\u0646:<br \/>\u2705 \u0628\u0631\u0627\u06cc \u0627\u0637\u0644\u0627\u0639 \u0627\u0632 \u0648\u0642\u0627\u06cc\u0639 \u0627\u0632 EventBus \u06af\u0648\u0634 \u062f\u0647\u06cc\u062f<br \/>\u2705 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u06a9\u0634\u0648\u0631 \u0645\u062d\u0644\u06cc<br \/>\u2705 \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0631\u0627 \u0628\u0639\u062f \u0627\u0632 3 \u062b\u0627\u0646\u06cc\u0647 \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f<\/p>\n<p>\ud83d\udd39 \u06cc\u06a9 \u067e\u0631\u0648\u0646\u062f\u0647 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f: notificationList.js<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>import React, { useState, useEffect } from \"react\";\nimport eventBus from \".\/eventBus\";\nimport \".\/Notifications.css\";\n\nconst NotificationList = () =&gt; {\n  const [notifications, setNotifications] = useState([]);\n\n  useEffect(() =&gt; {\n    \/\/ Subscribe to \"notify\" event\n    const unsubscribe = eventBus.subscribe(\"notify\", (notification) =&gt; {\n      const id = Date.now();\n      setNotifications((prev) =&gt; [...prev, { id, ...notification }]);\n\n      \/\/ Auto-remove notification after 3 seconds\n      setTimeout(() =&gt; {\n        setNotifications((prev) =&gt; prev.filter((n) =&gt; n.id !== id));\n      }, 3000);\n    });\n\n    return () =&gt; unsubscribe(); \/\/ Cleanup on unmount\n  }, []);\n\n  return (\n    <div classname=\"notifications-container\">\n      {notifications.map((notif) =&gt; (\n        <p>\n          {notif.message}\n        <\/p>\n      ))}\n    <\/div>\n  );\n};\n\nexport default NotificationList;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<hr\/>\n<p>\ud83c\udfa8 <strong>\u0645\u0631\u062d\u0644\u0647 3: \u0628\u0631\u062e\u06cc \u0627\u0632 \u0633\u0628\u06a9 \u0647\u0627 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f<\/strong><br \/>\ud83d\udd39 \u06cc\u06a9 \u067e\u0631\u0648\u0646\u062f\u0647 \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f: notifications.css<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>.notifications-container {\n  position: fixed;\n  top: 20px;\n  right: 20px;\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  z-index: 1000;\n}\n\n.notification {\n  padding: 10px 15px;\n  color: white;\n  font-weight: bold;\n  border-radius: 5px;\n  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n  opacity: 0.9;\n  animation: fade-in 0.3s ease-in-out;\n}\n\n.notification.success {\n  background-color: green;\n}\n\n.notification.failure {\n  background-color: red;\n}\n\n.notification.warning {\n  background-color: orange;\n}\n\n@keyframes fade-in {\n  from {\n    transform: translateY(-10px);\n    opacity: 0;\n  }\n  to {\n    transform: translateY(0);\n    opacity: 1;\n  }\n}\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<hr\/>\n<p>\u26a1 <strong>\u0645\u0631\u062d\u0644\u0647 4: \u0627\u0632 \u0622\u0646 \u062f\u0631 \u0645\u0624\u0644\u0641\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/strong><br \/>\u062d\u0627\u0644 \u060c \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0628\u0627 \u0627\u0646\u062a\u0634\u0627\u0631 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0647\u0646\u06af\u0627\u0645 \u06a9\u0644\u06cc\u06a9 \u0628\u0631 \u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 \u0647\u0627 \u060c \u0647\u0645\u0647 \u0622\u0646 \u0631\u0627 \u0628\u0627 \u0647\u0645 \u0628\u0628\u0646\u062f\u06cc\u0645.<\/p>\n<p>app.js \u0631\u0627 \u0627\u0635\u0644\u0627\u062d \u06a9\u0646\u06cc\u062f<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>import React from \"react\";\nimport eventBus from \".\/eventBus\";\nimport NotificationList from \".\/NotificationList\";\n\nconst App = () =&gt; {\n  const notify = (type, message) =&gt; {\n    eventBus.publish(\"notify\", { type, message });\n  };\n\n  return (\n    <p>\n      <h2>Notification System (Pub-Sub Pattern)<\/h2>\n      <button onclick=\"{()\"> notify(\"success\", \"Success!\")}&gt;Success<\/button>\n      <button onclick=\"{()\"> notify(\"failure\", \"Failure!\")}&gt;Failure<\/button>\n      <button onclick=\"{()\"> notify(\"warning\", \"Warning!\")}&gt;Warning<\/button>\n\n      <notificationlist\/>\n    <\/p>\n  );\n};\n\nexport default App;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<hr\/>\n<p>\ud83c\udfaf <strong>\u0686\u06af\u0648\u0646\u0647 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0628\u0627 \u0647\u0645 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f<\/strong><\/p>\n<p>1\u20e3 \u0631\u0648\u06cc \u06cc\u06a9 \u062f\u06a9\u0645\u0647 \u2192 EventBus.publish (&#8220;Notify&#8221; \u060c {\u0646\u0648\u0639 \u060c \u067e\u06cc\u0627\u0645} \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f)<br \/>2\u20e3 \u0627\u0639\u0644\u0627\u0646 \u0644\u06cc\u0633\u062a \u0628\u0631\u0627\u06cc \u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627\u06cc &#8220;\u0627\u0637\u0644\u0627\u0639 \u0631\u0633\u0627\u0646\u06cc&#8221; \u06af\u0648\u0634 \u0645\u06cc \u062f\u0647\u062f<br \/>3\u20e3 \u0627\u0639\u0644\u0627\u0646 \u062f\u0631 UI \u0638\u0627\u0647\u0631 \u0645\u06cc \u0634\u0648\u062f<br \/>4\u20e3 \u0628\u0639\u062f \u0627\u0632 3 \u062b\u0627\u0646\u06cc\u0647 \u060c \u0627\u0639\u0644\u0627\u0646 \u062e\u0648\u062f\u06a9\u0627\u0631<\/p>\n<p>\ud83d\udcdd <strong>\u0627\u0641\u06a9\u0627\u0631 \u0646\u0647\u0627\u06cc\u06cc: \u0686\u0631\u0627 \u0627\u0632 Pub-Sub \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u061f<\/strong><\/p>\n<p>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Pub-Sub \u062f\u0631 React \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0627\u0633\u062a \u0632\u06cc\u0631\u0627:<br \/>\u2705 \u0647\u06cc\u0686 \u0632\u0645\u06cc\u0646\u0647 \u0627\u06cc \u06cc\u0627 \u0631\u062f\u0648 \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u2192 \u062a\u0645\u06cc\u0632 \u0648 \u0633\u0628\u06a9 \u0646\u06cc\u0633\u062a<br \/>\u2705 \u06a9\u0627\u0645\u0644\u0627\u064b \u062c\u062f\u0627\u0634\u062f\u0647 \u2192 \u0627\u062c\u0632\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0646\u06cc\u0627\u0632\u06cc \u0628\u0647 \u062f\u0627\u0646\u0633\u062a\u0646 \u062f\u0631 \u0645\u0648\u0631\u062f \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0646\u062f\u0627\u0631\u0646\u062f<br \/>\u2705 \u0645\u0642\u06cc\u0627\u0633 \u067e\u0630\u06cc\u0631 \u2192 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0628\u0631\u0627\u06cc \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0627\u0632 \u0648\u0628 \u0633\u0627\u06cc\u062a \u0647\u0627 \u060c \u0648\u0631\u0648\u062f \u0628\u0647 \u0633\u06cc\u0633\u062a\u0645 \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631 \u06af\u0633\u062a\u0631\u0634 \u06cc\u0627\u0628\u062f<\/p>\n<p>\ud83d\udd25 <strong>\u0645\u0631\u0627\u062d\u0644 \u0628\u0639\u062f\u06cc<\/strong><\/p>\n<p>\u0622\u06cc\u0627 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0627\u06cc\u0646 \u0631\u0627 \u0628\u06cc\u0634\u062a\u0631 \u06a9\u0646\u06cc\u062f\u061f \u0633\u0639\u06cc \u06a9\u0646\u06cc\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<br \/>\u2705 \u06cc\u06a9 \u062f\u06a9\u0645\u0647 \u0646\u0632\u062f\u06cc\u06a9 \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u062f\u0633\u062a\u06cc \u0627\u0639\u0644\u0627\u0646 \u0647\u0627<br \/>\u2705 \u062c\u0644\u0648\u0647 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc\/\u062e\u0631\u0648\u062c \u0645\u062a\u062d\u0631\u06a9<br \/>\u2705 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627\u06cc \u0645\u062f\u0627\u0648\u0645 \u06a9\u0647 \u062a\u0627 \u0632\u0645\u0627\u0646 \u0628\u0631\u06a9\u0646\u0627\u0631\u06cc \u0628\u0627\u0642\u06cc \u0645\u06cc \u0645\u0627\u0646\u0646\u062f<\/p>\n<p>\ud83d\ude80 \u0627\u06a9\u0646\u0648\u0646 \u0628\u0631\u0648\u06cc\u062f \u0648 \u0627\u06cc\u0646 \u0631\u0627 \u062f\u0631 \u067e\u0631\u0648\u0698\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f! \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u0628\u0627\u0631\u06a9! \ud83c\udf89<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062e\u062f\u0627\u062d\u0627\u0641\u0638\u06cc \u0627\u0632 \u062d\u0641\u0627\u0631\u06cc \u0648 \u0632\u0645\u06cc\u0646\u0647! \ud83c\udf89 \u0645\u0642\u062f\u0645\u0647\u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 React \u0628\u0647 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f &#8211; \u062e\u0648\u0627\u0647 \u06cc\u06a9 \u067e\u06cc\u0627\u0645 \u0645\u0648\u0641\u0642\u06cc\u062a \u060c \u0647\u0634\u062f\u0627\u0631 \u062e\u0637\u0627 \u0628\u0627\u0634\u062f \u06cc\u0627 \u06cc\u06a9 \u0646\u0627\u0646 \u062a\u0633\u062a \u0647\u0634\u062f\u0627\u0631 \u062f\u0647\u0646\u062f\u0647. \u0627\u0645\u0627 \u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0639\u0644\u0627\u0646 \u0647\u0627 \u0631\u0627 \u062f\u0631 \u0633\u0637\u062d \u062c\u0647\u0627\u0646 \u0628\u062f\u0648\u0646 \u0631\u062f\u0648\u06a9\u0633 \u060c \u0632\u0645\u06cc\u0646\u0647 \u06cc\u0627 \u062d\u0641\u0627\u0631\u06cc \u067e\u0631\u0648\u0627\u0646\u0647 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u06cc\u0645\u061f \u062c\u0648\u0627\u0628: \u0627\u0644\u06af\u0648\u06cc \u0627\u0646\u062a\u0634\u0627\u0631-\u0627\u0634\u062a\u0631\u0627\u06a9 (\u0645\u06cc\u062e\u0627\u0646\u0647)! \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0633\u062a &hellip;<\/p>\n","protected":false},"author":2,"featured_media":101599,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-101598","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/101598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=101598"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/101598\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/101599"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=101598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=101598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=101598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}