{"id":3184,"date":"2021-10-04T12:00:28","date_gmt":"2021-10-04T08:30:28","guid":{"rendered":"http:\/\/rabsana.ir\/tutorials\/?p=3184"},"modified":"2021-10-04T12:21:23","modified_gmt":"2021-10-04T08:51:23","slug":"creating-reusable-react-components","status":"publish","type":"post","link":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/","title":{"rendered":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f"},"content":{"rendered":"<p><span style=\"font-weight: 400\">\u0627\u06af\u0631\u0686\u0647 <\/span><span style=\"font-weight: 400\">React\u060c \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628 \u062a\u0631\u06cc\u0646 \u0648 \u067e\u0631\u06a9\u0627\u0631\u0628\u0631\u062f\u062a\u0631\u06cc\u0646 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0647\u0627\u06cc \u067e\u06cc\u0634 \u0641\u0631\u0636 \u062f\u0631 \u062c\u0647\u0627\u0646 \u0627\u0633\u062a\u060c \u0627\u0645\u0627 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0647\u0646\u0648\u0632 \u062f\u0631 \u0645\u0648\u0631\u062f \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644 \u06a9\u062f \u0628\u0631\u0627\u06cc \u0628\u0647\u0628\u0648\u062f \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u062a\u0644\u0627\u0634 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0627\u06af\u0631 \u062a\u0627 \u0628\u0647 \u062d\u0627\u0644 \u0645\u062a\u0648\u062c\u0647 \u0634\u062f\u0647\u200c\u0627\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u062a\u06a9\u0647 \u06a9\u062f \u0631\u0627 \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 React \u062e\u0648\u062f \u062a\u06a9\u0631\u0627\u0631 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0645\u0642\u0627\u0644\u0647 \u0645\u0646\u0627\u0633\u0628\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0637\u0627\u0644\u0639\u0647 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0634\u0645\u0627 \u0628\u0627 \u0633\u0647 \u0634\u0627\u062e\u0635 \u0645\u062a\u062f\u0627\u0648\u0644 \u0622\u0634\u0646\u0627 \u0645\u06cc \u0634\u0648\u06cc\u062f \u06a9\u0647 \u0628\u0648\u0633\u06cc\u0644\u0647 \u0622\u0646\u0647\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a React \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f. \u0633\u067e\u0633 \u0628\u0627 \u0633\u0627\u062e\u062a\u0646 \u06cc\u06a9 \u0637\u0631\u062d \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0648 \u062f\u0648 \u0647\u0648\u06a9 \u062f\u0631 React\u060c \u0628\u0631\u062e\u06cc \u0627\u0632 \u0645\u0648\u0627\u0631\u062f \u0639\u0645\u0644\u06cc \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc \u06a9\u0646\u06cc\u0645.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u062e\u0648\u0627\u0646\u062f\u0646 \u0631\u0627 \u0628\u0647 \u067e\u0627\u06cc\u0627\u0646 \u0631\u0633\u0627\u0646\u062f\u06cc\u062f\u060c \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u062a\u0646\u0647\u0627\u06cc\u06cc \u062a\u0639\u06cc\u06cc\u0646 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0686\u0647 \u0632\u0645\u0627\u0646\u06cc \u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u062a \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0645\u062c\u062f\u062f\u0627\u064b \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0686\u06af\u0648\u0646\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/span><\/p>\n<h2><b>\u0633\u0647 \u0634\u0627\u062e\u0635 \u0628\u0631\u062a\u0631 \u06cc\u06a9 \u0645\u0648\u0644\u0641\u0647 \u0642\u0627\u0628\u0644 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f React<\/b><\/h2>\n<p><span style=\"font-weight: 400\">\u0627\u0628\u062a\u062f\u0627 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0628\u0631\u062e\u06cc \u0627\u0632 \u0646\u0634\u0627\u0646\u0647 \u0647\u0627 \u0631\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u062e\u0648\u0627\u0647\u06cc\u062f \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f\u060c \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u0645.<\/span><\/p>\n<h3><b>\u0627\u06cc\u062c\u0627\u062f \u062a\u06a9\u0631\u0627\u0631 \u0628\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u0628\u0627 \u0633\u0628\u06a9 CSS<\/b><\/h3>\n<p><span style=\"font-weight: 400\">\u0646\u0634\u0627\u0646\u0647 \u0645\u0648\u0631\u062f \u0639\u0644\u0627\u0642\u0647 \u0645\u0646 \u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0633\u062a\u0646 \u0632\u0645\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u0648\u0644\u0641\u0647 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u0633\u062a\u0645\u0631 \u0627\u0632 \u0647\u0645\u0627\u0646 \u0633\u0628\u06a9 CSS \u0627\u0633\u062a. \u0627\u06a9\u0646\u0648\u0646\u060c \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0641\u06a9\u0631 \u06a9\u0646\u06cc\u062f\u060c \u0686\u0631\u0627 \u0645\u0646 \u0628\u0647 \u0633\u0627\u062f\u06af\u06cc \u06cc\u06a9 \u0646\u0627\u0645 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0627\u0635\u0631\u06cc \u06a9\u0647 \u062f\u0627\u0631\u0627\u06cc \u0633\u0628\u06a9 CSS \u06cc\u06a9\u0633\u0627\u0646\u06cc \u0647\u0633\u062a\u0646\u062f \u0627\u062e\u062a\u0635\u0627\u0635 \u0646\u0645\u06cc \u062f\u0647\u0645\u061f. \u06a9\u0627\u0645\u0644\u0627\u064b \u062d\u0642 \u0628\u0627 \u0634\u0645\u0627\u0633\u062a. \u0627\u06cc\u062f\u0647 \u062e\u0648\u0628\u06cc \u0646\u06cc\u0633\u062a\u061b \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 \u0628\u0631\u062e\u06cc \u0627\u0632 \u0639\u0646\u0627\u0635\u0631 \u062f\u0631 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u062f\u0627\u0631\u0627\u06cc \u0633\u0628\u06a9 \u0645\u0634\u0627\u0628\u0647\u06cc \u0628\u0627\u0634\u0646\u062f\u060c \u06a9\u0648\u0644\u0641\u0647 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0627\u06cc\u062c\u0627\u062f \u0634\u0648\u062f. \u062f\u0631 \u0648\u0627\u0642\u0639\u060c \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u0627\u0639\u062b \u067e\u06cc\u0686\u06cc\u062f\u06af\u06cc \u063a\u06cc\u0631\u0636\u0631\u0648\u0631\u06cc \u0634\u0648\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u0633\u0648\u0627\u0644 \u062f\u06cc\u06af\u0631 \u0646\u06cc\u0632 \u0627\u0632 \u062e\u0648\u062f \u0628\u067e\u0631\u0633\u06cc\u062f: \u0622\u06cc\u0627 \u0627\u06cc\u0646 \u0639\u0646\u0627\u0635\u0631 \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u062f\u0627\u0631\u0627\u06cc Wrapprer \u0647\u0633\u062a\u0646\u062f\u061f<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\u060c \u0635\u0641\u062d\u0627\u062a \u0648\u0631\u0648\u062f \u0648 \u062b\u0628\u062a \u0646\u0627\u0645 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/\/ Login.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">&#8216;.\/common.css&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Login<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">=&#8217;<\/span><span style=\"font-weight: 400\">wrapper<\/span><span style=\"font-weight: 400\">&#8216;&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">footer <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">=&#8217;<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&#8216;&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/\/ SignUp.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">&#8216;.\/common.css&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Signup<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">=&#8217;<\/span><span style=\"font-weight: 400\">wrapper<\/span><span style=\"font-weight: 400\">&#8216;&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">footer <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">=&#8217;<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&#8216;&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h6><span style=\"font-weight: 400\">\u0633\u0628\u06a9 \u0647\u0627\u06cc \u0645\u0634\u0627\u0628\u0647\u06cc \u0631\u0648\u06cc \u06a9\u0627\u0646\u062a\u06cc\u0646\u0631(\u0639\u0646\u0635\u0631&lt;div&gt;) \u0648 \u0641\u0648\u062a\u0631 \u0647\u0631 \u0645\u0648\u0644\u0641\u0647\u200c\u0627\u06cc \u0627\u0639\u0645\u0627\u0644 \u0645\u06cc \u0634\u0648\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0648 \u0645\u0648\u0644\u0641\u0647 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f &#8211; &lt;Wrapper \/&gt; \u0648 &lt;Footer \/&gt; &#8211; \u0627\u06cc\u062c\u0627\u062f \u06a9\u0631\u062f\u0647 \u0648 \u0627\u0632 \u0622\u0646\u0647\u0627 \u0628\u0631\u0627\u06cc \u062d\u0645\u0627\u06cc\u062a Children \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\u060c \u0645\u0648\u0644\u0641\u0647 \u0648\u0631\u0648\u062f \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644 \u062f\u0627\u062f:<\/span><\/h6>\n<p><span style=\"font-weight: 400\">\/\/ Login.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> Footer <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Footer.js&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Login<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">Wrapper<\/span> <span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">={{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}}<\/span> <span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">={&lt;<\/span><span style=\"font-weight: 400\">Footer<\/span> <span style=\"font-weight: 400\">\/&gt;}<\/span> <span style=\"font-weight: 400\">\/&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u062f\u0631 \u0646\u062a\u06cc\u062c\u0647\u060c \u062f\u06cc\u06af\u0631 \u0646\u06cc\u0627\u0632\u06cc \u0628\u0647 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 common.css \u062f\u0631 \u0686\u0646\u062f\u06cc\u0646 \u0635\u0641\u062d\u0647 \u06cc\u0627 \u0627\u06cc\u062c\u0627\u062f \u0639\u0646\u0627\u0635\u0631 &lt;div&gt; \u06cc\u06a9\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0628\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u0647\u0645\u0647 \u0686\u06cc\u0632 \u0646\u062f\u0627\u0631\u06cc\u062f.<\/span><\/p>\n<h3><b>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06a9\u0631\u0631 \u0627\u0632 \u0634\u0646\u0648\u0646\u062f\u06af\u0627\u0646 \u0631\u0648\u06cc\u062f\u0627\u062f(Repetitive use of event listeners):<\/b><\/h3>\n<p><span style=\"font-weight: 400\">\u0628\u0631\u0627\u06cc\u00a0 \u0627\u062a\u0635\u0627\u0644 \u06cc\u06a9 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0628\u0647 \u06cc\u06a9 \u0639\u0646\u0635\u0631\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646 \u0631\u0627 \u062f\u0631 useEffect ()\u0645\u0627\u0646\u0646\u062f \u0632\u06cc\u0631 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/\/ App.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> useEffect <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8216;react&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">App<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">handleKeydown<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">alert<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;key is pressed.&#8217;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useEffect<\/span><span style=\"font-weight: 400\">(()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">document<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">addEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;keydown&#8217;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleKeydown<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">document<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">removeEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;keydown&#8217;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleKeydown<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">},<\/span> <span style=\"font-weight: 400\">[]);<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><strong>\u06cc\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0645\u0633\u062a\u06cc\u0642\u06cc\u0645\u0627\u064b \u062f\u0631 \u062f\u0627\u062e\u0644 JSX \u062e\u0648\u062f \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u062f\u06a9\u0645\u0647 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ Button.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Button<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">button <\/span><span style=\"font-weight: 400\">type<\/span><span style=\"font-weight: 400\">=&#8221;<\/span><span style=\"font-weight: 400\">button<\/span><span style=\"font-weight: 400\">&#8220;<\/span> <span style=\"font-weight: 400\">onClick<\/span><span style=\"font-weight: 400\">={()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span> <span style=\"font-weight: 400\">alert<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;Hi!&#8217;<\/span><span style=\"font-weight: 400\">)}}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Click me!<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">button<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u06cc\u06a9 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0631\u0627 \u0628\u0647 \u0633\u0646\u062f \u06cc\u0627 \u067e\u0646\u062c\u0631\u0647\u200c\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0627\u0632 \u0631\u0648\u0634 \u0627\u0648\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0642\u0628\u0644\u0627 \u0645\u062a\u0648\u062c\u0647 \u0634\u062f\u0647 \u0628\u0627\u0634\u06cc\u062f\u060c \u0627\u0648\u0644\u06cc\u0646 \u0631\u0648\u0634 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u06a9\u062f \u0628\u06cc\u0634\u062a\u0631\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 addEventListener()\u060c useEffect() \u0648 removeEventListener() \u062f\u0627\u0631\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u062f\u0631 \u0686\u0646\u06cc\u0646 \u0645\u0648\u0627\u0631\u062f\u06cc\u060c \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0647\u0648\u06a9 \u0633\u0641\u0627\u0631\u0634\u06cc \u0628\u0647 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc \u0634\u0645\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0645\u062e\u062a\u0635\u0631\u062a\u0631 \u0628\u0627\u0634\u0646\u062f.<\/span><\/p>\n<h3><b>\u0686\u0647\u0627\u0631 \u0633\u0646\u0627\u0631\u06cc\u0648\u06cc \u0627\u062d\u062a\u0645\u0627\u0644\u06cc \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0634\u0646\u0648\u0646\u062f\u06af\u0627\u0646 \u0631\u0648\u06cc\u062f\u0627\u062f \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f:<\/b><\/h3>\n<h5><b>&#8211;<\/b> <strong>\u0647\u0645\u0627\u0646 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f\u060c \u0647\u0645\u0627\u0646 \u06af\u0631\u062f\u0627\u0646\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f<\/strong><\/h5>\n<h5><strong>&#8211; \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u06cc\u06a9\u0633\u0627\u0646\u060c \u06a9\u0646\u062a\u0631\u0644 \u06a9\u0646\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0645\u062a\u0641\u0627\u0648\u062a<\/strong><\/h5>\n<h5><strong>&#8211; \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0645\u062a\u0641\u0627\u0648\u062a\u060c \u06a9\u0646\u062a\u0631\u0644 \u06a9\u0646\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u06cc\u06a9\u0633\u0627\u0646<\/strong><\/h5>\n<h5><strong>&#8211; \u0634\u0646\u0648\u06cc\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0645\u062a\u0641\u0627\u0648\u062a\u060c \u0645\u062f\u06cc\u0631\u06cc\u062a \u0631\u0648\u06cc\u062f\u0627\u062f \u0645\u062a\u0641\u0627\u0648\u062a<\/strong><\/h5>\n<p><strong>\u062f\u0631 \u0633\u0646\u0627\u0631\u06cc\u0648\u06cc \u0627\u0648\u0644\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc \u06cc\u06a9 \u0647\u0648\u06a9 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0647\u0645 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u0648 \u0647\u0645 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0631\u0648\u06cc\u062f\u0627\u062f \u062f\u0631 \u0622\u0646 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f. \u0647\u0648\u06a9 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631\u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ useEventListener.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> useEffect <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8216;react&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">useKeydown<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">handleKeydown<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">alert<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;key is pressed.&#8217;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useEffect<\/span><span style=\"font-weight: 400\">(()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">document<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">addEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;keydown&#8217;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleKeydown<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">document<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">removeEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;keydown&#8217;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleKeydown<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">},<\/span> <span style=\"font-weight: 400\">[]);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><strong>\u0633\u067e\u0633 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0647\u0648\u06a9 \u062f\u0631 \u0647\u0631 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0628\u0647 \u0634\u0631\u062d \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ App.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> useKeydown <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8216;.\/useKeydown.js&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">App<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useKeydown<\/span><span style=\"font-weight: 400\">();<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><strong>\u0628\u0631\u0627\u06cc \u0633\u0647 \u0633\u0646\u0627\u0631\u06cc\u0648\u06cc \u062f\u06cc\u06af\u0631\u060c \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u0634\u0648\u062f \u06a9\u0647 \u0642\u0644\u0627\u0628\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0631\u0648\u06cc\u062f\u0627\u062f \u0648 \u0639\u0645\u0644\u06a9\u0631\u062f \u0645\u062f\u06cc\u0631\u06cc\u062a \u0631\u0648\u06cc\u062f\u0627\u062f \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0644\u0648\u0627\u0632\u0645 \u062c\u0627\u0646\u0628\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\u060c \u0645\u0646 keydown \u0648 handleKeydown \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0628\u0647 \u0647\u0648\u06a9 \u0633\u0641\u0627\u0631\u0634\u06cc \u062e\u0648\u062f \u0645\u0646\u062a\u0642\u0644 \u0645\u06cc \u06a9\u0646\u0645. \u0647\u0648\u06a9 \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ App.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> useEventListener <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8216;.\/useEventListener.js&#8217;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">App<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">handleKeydown<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">alert<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;key is pressed.&#8217;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8216;keydown&#8217;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleKeydown<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<h3><strong>\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06a9\u0631\u0631 \u0627\u0632 \u0647\u0645\u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a GraphQL<\/strong><\/h3>\n<p><span style=\"font-weight: 400\">\u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0627\u0632 \u06a9\u062f GraphQL \u0646\u06cc\u0627\u0632\u06cc \u0646\u06cc\u0633\u062a \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0639\u0644\u0627\u0626\u0645 \u0628\u0627\u0634\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0647\u0627\u06cc GraphQL \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u067e\u0631\u0633 \u0648 \u062c\u0648 \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc 30 \u062a\u0627 50 \u062e\u0637 \u06a9\u062f \u0631\u0627 \u0627\u0634\u063a\u0627\u0644 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0632\u06cc\u0631\u0627 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0632\u06cc\u0627\u062f\u06cc \u0628\u0631\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f. \u0627\u06af\u0631 \u0627\u0632 \u06cc\u06a9 \u06cc\u0627 \u062f\u0648 \u0628\u0627\u0631 \u0627\u0632 \u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a GraphQL \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0641\u06a9\u0631 \u0645\u06cc\u06a9\u0646\u0645 \u06a9\u0647 \u0628\u0647 \u0647\u0648\u06a9 \u0633\u0641\u0627\u0631\u0634\u06cc \u062e\u0648\u062f \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> useQuery <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;@apollo\/react-hooks&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">GET_POSTS<\/span> <span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">`<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">query<\/span><span style=\"font-weight: 400\"> getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0user <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0name<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0emojis <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useQuery<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">GET_POSTS<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0fetchPolicy<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">&#8220;network-only&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400\">});<\/span><\/p>\n<h4><strong>\u0628\u0647 \u062c\u0627\u06cc \u062a\u06a9\u0631\u0627\u0631 \u0627\u06cc\u0646 \u06a9\u062f \u062f\u0631 \u0647\u0631 \u0635\u0641\u062d\u0647\u200c\u0627\u06cc \u06a9\u0647 \u067e\u0633\u062a \u0647\u0627 \u0631\u0627 \u0627\u0632 \u0628\u06a9-\u0627\u0646\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0645\u06cc \u06a9\u0646\u062f\u060c \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u0647\u0648\u06a9 React \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 API \u062e\u0627\u0635 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/strong><\/h4>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> useQuery <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;@apollo\/react-hooks&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">useGetPosts<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">GET_POSTS<\/span> <span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">&#8230;<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useQuery<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">GET_POSTS<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0fetchPolicy<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">&#8220;network-only&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">});<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">];<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">Test<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">]<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useGetPosts<\/span><span style=\"font-weight: 400\">();<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;{<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">?.<\/span><span style=\"font-weight: 400\">map<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">post <\/span><span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">h1<\/span><span style=\"font-weight: 400\">&gt;{<\/span><span style=\"font-weight: 400\">post<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">text<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">h1<\/span><span style=\"font-weight: 400\">&gt;)}&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<h2><b>\u0627\u06cc\u062c\u0627\u062f \u0633\u0647 \u0645\u0648\u0644\u0641\u0647\u00a0 React \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f<\/b><\/h2>\n<p><span style=\"font-weight: 400\">\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u0645\u0627 \u0646\u0634\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u062a\u062f\u0627\u0648\u0644 \u062f\u0631 \u0645\u0648\u0631\u062f \u0632\u0645\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u062c\u062f\u06cc\u062f \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 React \u062e\u0648\u062f \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645\u060c \u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u0627\u06cc\u0646 \u062f\u0627\u0646\u0634 \u0631\u0627 \u062f\u0631 \u0639\u0645\u0644 \u0628\u0647 \u06a9\u0627\u0631 \u06af\u06cc\u0631\u06cc\u0645 \u0648 \u0633\u0647 \u0646\u0633\u062e\u0647 \u0646\u0645\u0627\u06cc\u0634\u06cc \u0639\u0645\u0644\u06cc \u0628\u0633\u0627\u0632\u06cc\u0645<\/span><\/p>\n<h4><b>1. \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0637\u0631\u062d \u0628\u0646\u062f\u06cc<\/b><\/h4>\n<p><span style=\"font-weight: 400\">React \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u0648\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f. \u0627\u06cc\u0646 \u0628\u062f\u0627\u0646 \u0645\u0639\u0646\u0627\u0633\u062a \u06a9\u0647 \u062a\u0639\u062f\u0627\u062f \u0632\u06cc\u0627\u062f\u06cc \u0635\u0641\u062d\u0647 \u0628\u0627\u06cc\u062f \u062f\u0631 React \u062a\u0648\u0633\u0639\u0647 \u062f\u0627\u062f\u0647 \u0634\u0648\u062f \u0648 \u0645\u0646 \u0634\u06a9 \u062f\u0627\u0631\u0645 \u06a9\u0647 \u0647\u0631 \u0635\u0641\u062d\u0647 \u0627\u0632 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0627\u0631\u0627\u06cc \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0645\u062a\u0641\u0627\u0648\u062a\u06cc \u0628\u0627\u0634\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\u060c \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0645\u062a\u0634\u06a9\u0644 \u0627\u0632 30 \u0635\u0641\u062d\u0647 \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u0627\u0632 \u06a9\u0645\u062a\u0631 \u0627\u0632 \u067e\u0646\u062c \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0627\u0646\u0639\u0637\u0627\u0641 \u067e\u0630\u06cc\u0631 \u0648 \u0642\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u062f \u062f\u0631 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u0635\u0641\u062d\u0627\u062a \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0645\u0633\u0626\u0644\u0647 \u0628\u0627\u0639\u062b \u0645\u06cc \u0634\u0648\u062f \u06a9\u0647 \u062e\u0637\u0648\u0637 \u0632\u06cc\u0627\u062f\u06cc \u0627\u0632 \u06a9\u062f \u0648 \u062f\u0631 \u0646\u062a\u06cc\u062c\u0647 \u0632\u0645\u0627\u0646 \u0641\u0648\u0642 \u0627\u0644\u0639\u0627\u062f\u0647\u200c\u0627\u06cc \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0630\u062e\u06cc\u0631\u0647 \u0634\u0648\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0639\u0645\u0644\u06a9\u0631\u062f\u06cc React \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/\/ Feed.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> React <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> style <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Feed.module.css&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Feed<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedContainer<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">header <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedHeader<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Header<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">main <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedMain<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">ItemList<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">itemData<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">map<\/span><span style=\"font-weight: 400\">((<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> idx<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">key<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">idx<\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Item<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">))}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">footer <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedFooter<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Footer<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> itemData <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">1<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">2<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">3<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">4<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">5<\/span><span style=\"font-weight: 400\">];<\/span><\/p>\n<p><strong>\u0627\u06cc\u0646 \u06cc\u06a9 \u0635\u0641\u062d\u0647 \u0645\u0639\u0645\u0648\u0644\u06cc \u0648\u0628 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0627\u0631\u0627\u06cc &lt;main&gt;\u060c &lt;header&gt; \u0648 &lt;footer&gt; \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 props \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc \u06a9\u0646\u062f. \u0645\u0627\u0646\u0646\u062f \u06a9\u062f \u0632\u06cc\u0631:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ Layout.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> React <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> style <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Layout.module.css&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> PropTypes <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;prop-types&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Layout<\/span><span style=\"font-weight: 400\">({<\/span><span style=\"font-weight: 400\"> header<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> main<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> footer <\/span><span style=\"font-weight: 400\">})<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Container<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">header <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Header<\/span><span style=\"font-weight: 400\">}&gt;{<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">main <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Main<\/span><span style=\"font-weight: 400\">}&gt;{<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">footer <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Footer<\/span><span style=\"font-weight: 400\">}&gt;{<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Layout<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">propTypes <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0main<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> PropTypes<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">element<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">isRequired<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0header<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> PropTypes<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">element<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0footer<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> PropTypes<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">element<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0627\u06cc\u0646 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0628\u0647 &lt;header&gt; \u0648 &lt;footer&gt; \u0646\u06cc\u0627\u0632 \u0646\u062f\u0627\u0631\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u06cc\u06a9\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0635\u0641\u062d\u0627\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u060c \u0635\u0631\u0641 \u0646\u0638\u0631 \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u062f\u0627\u0631\u0627\u06cc header \u06cc\u0627 footer \u0628\u0627\u0634\u0646\u062f.<\/span><\/p>\n<h6><strong>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0637\u0631\u062d \u0628\u0646\u062f\u06cc\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0635\u0641\u062d\u0647 feed \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0628\u0644\u0648\u06a9 \u06a9\u062f \u067e\u06cc\u0686\u06cc\u062f\u0647 \u062a\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f:<\/strong><\/h6>\n<p><span style=\"font-weight: 400\">\/\/ Feed.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> React <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> Layout <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Layout&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> style <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Feed.module.css&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Feed<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">Layout<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">={&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedHeader<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Header<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">={<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">ItemList<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">itemData<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">map<\/span><span style=\"font-weight: 400\">((<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> idx<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">key<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">idx<\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Item<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">))}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">={&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedFooter<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Footer<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> itemData <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">1<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">2<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">3<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">4<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">5<\/span><span style=\"font-weight: 400\">];<\/span><\/p>\n<p>&nbsp;<\/p>\n<h4><b>\u0646\u06a9\u062a\u0647\u200c \u062d\u0631\u0641\u0647\u200c\u0627\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0628\u0627 \u0639\u0646\u0627\u0635\u0631 \u0686\u0633\u0628\u06cc\u062f\u0647<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u062a\u0645\u0627\u06cc\u0644 \u062f\u0627\u0631\u0646\u062f \u06cc\u06a9 header \u0631\u0627 \u0628\u0647 \u0628\u0627\u0644\u0627\u06cc \u0635\u0641\u062d\u0647 \u0646\u0645\u0627\u06cc\u0634 \u06cc\u0627 \u06cc\u06a9 footer \u0631\u0627 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u0628\u0686\u0633\u0628\u0627\u0646\u0646\u062f\u060c \u0627\u0632 \u0645\u0648\u0642\u0639\u06cc\u062a \u062b\u0627\u0628\u062a \u06cc\u0627 \u0645\u0648\u0642\u0639\u06cc\u062a \u0645\u0637\u0644\u0642 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u062f\u0631 \u0645\u0648\u0631\u062f \u0637\u0631\u062d \u0628\u0646\u062f\u06cc\u060c \u0633\u0639\u06cc \u06a9\u0646\u06cc\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0645\u0631 \u062c\u0644\u0648\u06af\u06cc\u0631\u06cc \u06a9\u0646\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0627\u0632 \u0622\u0646\u062c\u0627 \u06a9\u0647 \u0639\u0646\u0627\u0635\u0631 \u06cc\u06a9 \u0637\u0631\u062d\u060c \u0639\u0646\u0627\u0635\u0631 \u0627\u0635\u0644\u06cc \u0644\u0648\u0627\u0632\u0645 \u062c\u0627\u0646\u0628\u06cc \u0645\u0646\u062a\u0642\u0644 \u0634\u062f\u0647 \u062e\u0648\u0627\u0647\u0646\u062f \u0628\u0648\u062f\u060c \u0634\u0645\u0627 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0633\u0628\u06a9 \u0639\u0646\u0627\u0635\u0631 \u0637\u0631\u062d \u062e\u0648\u062f \u0631\u0627 \u062a\u0627 \u062d\u062f \u0645\u0645\u06a9\u0646 \u0633\u0627\u062f\u0647 \u0646\u06af\u0647 \u062f\u0627\u0631\u06cc\u062f. \u0628\u0647 \u0637\u0648\u0631\u06cc\u06a9\u0647 &lt;header&gt;\u060c &lt;main&gt; \u06cc\u0627 &lt;footer&gt; \u0628\u0647 \u0635\u0648\u0631\u062a \u062f\u0644\u062e\u0648\u0627\u0647 \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0634\u0648\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0645\u0646 \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u06a9\u0646\u0645 \u0627\u0632 \u0645\u0648\u0642\u0639\u06cc\u062a Fixed and display: flex \u0628\u0647 \u0628\u06cc\u0631\u0648\u0646\u06cc \u062a\u0631\u06cc\u0646 \u0639\u0646\u0635\u0631 \u0637\u0631\u062d \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u062a\u0646\u0638\u06cc\u0645 overflow-y: \u0628\u0647 \u0639\u0646\u0635\u0631 &lt;main&gt; \u0628\u0631\u0648\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/* Layout.module.css *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">.Container<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Flexbox *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">display<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> flex<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">flex-direction<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> column<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Width &amp; Height *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">width<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">100<\/span><span style=\"font-weight: 400\">%<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">height<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">100<\/span><span style=\"font-weight: 400\">%<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Misc *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">overflow<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> hidden<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">position<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> fixed<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">.Main<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Width &amp; Height *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">width<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">100<\/span><span style=\"font-weight: 400\">%<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">height<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">100<\/span><span style=\"font-weight: 400\">%<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Misc *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">overflow-y<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> scroll<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h6><strong>\u00a0\u0627\u06a9\u0646\u0648\u0646 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0628\u0631\u062e\u06cc \u0627\u0632 \u0633\u0628\u06a9 \u0647\u0627 \u0631\u0627 \u062f\u0631 \u0635\u0641\u062d\u0647 feed \u062e\u0648\u062f \u0627\u0639\u0645\u0627\u0644 \u06a9\u0646\u06cc\u0645 \u0648 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u0686\u0647 \u0686\u06cc\u0632\u06cc \u0633\u0627\u062e\u062a\u0647\u200c\u0627\u06cc\u062f:<\/strong><\/h6>\n<p><span style=\"font-weight: 400\">\/* Feed.module.css *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">.FeedHeader<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Width &amp; Height *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">height<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">70<\/span><span style=\"font-weight: 400\">px<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Color &amp; Border *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">background-color<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> teal<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">color<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> beige<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">.FeedFooter<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Width &amp; Height *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">height<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">70<\/span><span style=\"font-weight: 400\">px<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Color &amp; Border *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">background-color<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> beige<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">color<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> teal<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">.ItemList<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Flexbox *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">display<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> flex<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">flex-direction<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> column<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">.Item<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Width &amp; Height *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">height<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">300<\/span><span style=\"font-weight: 400\">px<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Misc *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">color<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> teal<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">.FeedHeader<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">.FeedFooter<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">.Item<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Flexbox *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">display<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> flex<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">justify-content<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> center<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">align-items<\/span><span style=\"font-weight: 400\">:<\/span><span style=\"font-weight: 400\"> center<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Color &amp; Border *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">border<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">1<\/span><span style=\"font-weight: 400\">px solid teal<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Misc *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">font-size<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">35<\/span><span style=\"font-weight: 400\">px<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h4><b>2. \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0627\u063a\u0644\u0628\u060c \u06cc\u06a9 \u0634\u0646\u0648\u0646\u062f\u0647 \u06cc\u06a9 \u0631\u0648\u06cc\u062f\u0627\u062f \u0628\u06cc\u0634 \u0627\u0632 \u06cc\u06a9 \u0628\u0627\u0631 \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f. \u062f\u0631 \u0686\u06cc\u0646 \u0645\u0648\u0627\u0631\u062f\u06cc\u060c \u0627\u06cc\u062c\u0627\u062f \u0647\u0648\u06a9 \u0633\u0641\u0627\u0631\u0634\u06cc React \u0627\u06cc\u062f\u0647 \u062e\u0648\u0628\u06cc \u0627\u0633\u062a. \u0628\u06cc\u0627\u06cc\u06cc\u062f \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0627 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0647\u0648\u06a9 useScrollSaver \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u0645\u060c \u06a9\u0647 \u0645\u0648\u0642\u0639\u062a \u067e\u06cc\u0645\u0627\u06cc\u0634 \u062f\u0633\u062a\u06af\u0627\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0635\u0641\u062d\u0647 \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc \u06a9\u0646\u062f\u060c \u0628\u0647 \u0637\u0648\u0631\u06cc \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0646\u06cc\u0627\u0632\u06cc \u0628\u0647 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0631 \u0628\u0627\u0644\u0627 \u0646\u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0647\u0648\u06a9 \u0628\u0631\u0627\u06cc \u0635\u0641\u062d\u0647 \u0648\u0628 \u0646\u06cc\u0632 \u0645\u0641\u06cc\u062f \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u06a9\u0647 \u062f\u0631 \u0622\u0646 \u062a\u0639\u062f\u0627\u062f \u0632\u06cc\u0627\u062f\u06cc \u0639\u0646\u0627\u0635\u0631 \u0645\u0627\u0646\u0646\u062f \u067e\u0633\u062a \u0648 \u0646\u0638\u0631\u0627\u062a \u0630\u06a9\u0631 \u0634\u062f\u0647 \u0627\u0633\u062a. \u0635\u0641\u062d\u0627\u062a feed \u0641\u06cc\u0633\u0628\u0648\u06a9\u060c \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u0648 \u062a\u0648\u06cc\u06cc\u062a\u0631 \u0631\u0627 \u0628\u062f\u0648\u0646 \u0645\u062d\u0627\u0641\u0638 \u0627\u0633\u06a9\u0631\u0648\u0644 \u062a\u0635\u0648\u0631 \u06a9\u0646\u06cc\u062f.<\/span><\/p>\n<p><b>\u0628\u06cc\u0627\u06cc\u06cc\u062f \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u0645:<\/b><\/p>\n<p><span style=\"font-weight: 400\">\/\/ useScrollSaver.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> useEffect <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">useScrollSaver<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> pageUrl<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Save the scroll position *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">handleScroll<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">sessionStorage<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">setItem<\/span><span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">${<\/span><span style=\"font-weight: 400\">pageUrl<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">-scrollPosition`<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">scrollTop<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">toString<\/span><span style=\"font-weight: 400\">()<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useEffect<\/span><span style=\"font-weight: 400\">(()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">if<\/span> <span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> scrollableBody <\/span><span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scrollableBody<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">addEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8220;scroll&#8221;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleScroll<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">cleanup<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scrollableBody<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">removeEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8220;scroll&#8221;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleScroll<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">},<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> pageUrl<\/span><span style=\"font-weight: 400\">]);<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/* Restore the saved scroll position *\/<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useEffect<\/span><span style=\"font-weight: 400\">(()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">if<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current <\/span><span style=\"font-weight: 400\">&amp;&amp;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">sessionStorage<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">getItem<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">${<\/span><span style=\"font-weight: 400\">pageUrl<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">-scrollPosition`<\/span><span style=\"font-weight: 400\">)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> prevScrollPos <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">Number<\/span><span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">sessionStorage<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">getItem<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">${<\/span><span style=\"font-weight: 400\">pageUrl<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">-scrollPosition`<\/span><span style=\"font-weight: 400\">)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">scrollTop <\/span><span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> prevScrollPos<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">},<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> pageUrl<\/span><span style=\"font-weight: 400\">]);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0645\u06cc \u0628\u06cc\u0646\u06cc\u062f \u06a9\u0647 \u0647\u0648\u06a9 useScrollSaver \u0628\u0627\u06cc\u062f \u062f\u0648 \u0645\u0648\u0631\u062f \u0631\u0627 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u062f: Scrllablediv\u060c \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0645\u0627\u0646\u0646\u062f \u0638\u0631\u0641 &lt;main&gt; \u062f\u0631 \u0637\u0631\u062d \u0628\u0646\u062f\u06cc \u0634\u0645\u0627 \u062f\u0631 \u0628\u0627\u0644\u0627 \u06cc\u06a9 \u06a9\u0627\u0646\u062a\u06cc\u0646\u0631 \u0642\u0627\u0628\u0644 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0628\u0627\u0634\u062f \u0648 pageUrl\u060c \u06a9\u0647 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0634\u0646\u0627\u0633\u0646\u0627\u0645\u0647 \u0635\u0641\u062d\u0647 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc \u06af\u06cc\u0631\u062f \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0648\u0642\u0639\u06cc\u062a \u0647\u0627\u06cc \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0686\u0646\u062f\u06cc\u0646 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/span><\/p>\n<h4><b>\u0645\u0631\u062d\u0644\u06471: \u0645\u0648\u0642\u0639\u06cc\u062a \u0627\u0633\u06a9\u0631\u0648\u0644 \u0631\u0627 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0627\u0648\u0644 \u0627\u0632 \u0647\u0645\u0647\u060c \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u0634\u0646\u0648\u0646\u062f\u0647 \u0631\u0648\u06cc\u062f\u0627\u062f \u00abscroll\u00bb \u0631\u0627 \u0628\u0647 \u06a9\u0627\u0646\u062a\u06cc\u0646\u0631 \u0642\u0627\u0628\u0644 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u062e\u0648\u062f \u0645\u062a\u0635\u0644 \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> scrollableBody <\/span><span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">scrollableBody<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">addEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8220;scroll&#8221;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleScroll<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">cleanup<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0scrollableBody<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">removeEventListener<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">&#8220;scroll&#8221;<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> handleScroll<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631\u060c \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 scrollable div \u062a\u0648\u0633\u0637 \u06a9\u0627\u0631\u0628\u0631 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0645\u06cc \u0634\u0648\u062f\u060c \u062a\u0627\u0628\u0639\u06cc \u0628\u0647\u0646\u0627\u0645 handleScroll \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639\u060c \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 localStorage \u06cc\u0627 sessionStorage \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0645\u0648\u0642\u0639\u06cc\u062a \u0627\u0633\u06a9\u0631\u0648\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u062a\u0641\u0627\u0648\u062a \u0627\u06cc\u0646 \u062f\u0648 \u062f\u0631 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u062f\u0631 localStorage \u0645\u0646\u0642\u0636\u06cc \u0646\u0645\u06cc \u0634\u0648\u0646\u062f\u060c \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u062f\u0631 sessionStorage \u0628\u0627 \u067e\u0627\u06cc\u0627\u0646 \u062c\u0644\u0633\u0647\u060c \u0635\u0641\u062d\u0647 \u067e\u0627\u06a9 \u0645\u06cc \u0634\u0648\u0646\u062f. \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 setltem (id: string, value: string) \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u062f\u0631 \u0647\u0631 \u062f\u0648 \u0630\u062e\u06cc\u0631\u0647 \u0633\u0627\u0632\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">handleScroll<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">sessionStorage<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">setItem<\/span><span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">${<\/span><span style=\"font-weight: 400\">pageUrl<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">-scrollPosition`<\/span><span style=\"font-weight: 400\">,<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0scrolledDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">scrollTop<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">toString<\/span><span style=\"font-weight: 400\">()<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<h4><b>\u0645\u0631\u062d\u0644\u06472: \u0645\u0648\u0642\u0639\u06cc\u062a \u0627\u0633\u06a9\u0631\u0648\u0644 \u0631\u0627 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u06cc\u062f.<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u06cc\u06a9 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0647 \u0635\u0641\u062d\u0647 \u0648\u0628 \u0628\u0631 \u0645\u06cc \u06af\u0631\u062f\u062f\u060c \u06a9\u0627\u0631\u0628\u0631 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0645\u0648\u0642\u0639\u06cc\u062a \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0642\u0628\u0644\u06cc \u062e\u0648\u062f \u0647\u062f\u0627\u06cc\u062a \u0634\u0648\u062f. \u0627\u06cc\u0646 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u0648\u0642\u0639\u06cc\u062a \u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631 \u062f\u0631 sessionStorage \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0622\u0646 \u0631\u0627 \u0628\u06cc\u0631\u0648\u0646 \u0622\u0648\u0631\u062f\u0647 \u0648 \u0627\u0632 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0633\u067e\u0633\u060c \u0634\u0645\u0627 \u0641\u0642\u0637 \u0628\u0627\u06cc\u062f \u0627\u0633\u06a9\u0631\u0648\u0644 \u0628\u0627\u0644\u0627\u06cc \u06a9\u0627\u0646\u062a\u06cc\u0646\u0631 \u0642\u0627\u0628\u0644 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0631\u0627 \u0631\u0648\u06cc \u0627\u06cc\u0646 \u0645\u0642\u062f\u0627\u0631 \u0628\u062f\u0633\u062a \u0622\u0645\u062f\u0647 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> prevScrollPos <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">Number<\/span><span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">sessionStorage<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">getItem<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">${<\/span><span style=\"font-weight: 400\">pageUrl<\/span><span style=\"font-weight: 400\">}<\/span><span style=\"font-weight: 400\">scrollPosition`<\/span><span style=\"font-weight: 400\">)<\/span><\/p>\n<p><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">current<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">scrollTop <\/span><span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> prevScrollPos<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<h4><b>\u0645\u0631\u062d\u0644\u0647 3: \u0627\u0632 \u0647\u0648\u06a9\u00a0 useScollSaver \u062f\u0631 \u0647\u0631 \u0635\u0641\u062d\u0647 \u0648\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u0627\u06cc\u062c\u0627\u062f \u0647\u0648\u06a9 \u0633\u0641\u0627\u0631\u0634\u06cc \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u067e\u0627\u06cc\u0627\u0646 \u0631\u0633\u0627\u0646\u062f\u0647\u200c\u0627\u06cc\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0647\u0648\u06a9 \u062f\u0631 \u0647\u0631 \u0635\u0641\u062d\u0647 \u0648\u0628 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u0628\u0647 \u0634\u0631\u0637 \u0627\u06cc\u0646\u06a9\u0647 \u0645\u0648\u0627\u0631\u062f \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0631\u0627 \u0628\u0647 \u0647\u0648\u06a9 scrollableDiv \u0648 pageUrl \u0645\u0646\u062a\u0642\u0644 \u06a9\u0646\u06cc\u062f. \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0628\u0647 Layout.js \u0628\u0631\u06af\u0631\u062f\u06cc\u0645 \u0648 \u0627\u0632 \u0647\u0648\u06a9 \u062e\u0648\u062f \u062f\u0631 \u0622\u0646\u062c\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645. \u0627\u06cc\u0646 \u0628\u0647 \u0647\u0631 \u0635\u0641\u062d\u0647 \u0648\u0628 \u06a9\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0637\u0631\u062d \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc \u062f\u0647\u062f \u0627\u0632 \u0645\u062d\u0627\u0641\u0638 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0634\u0645\u0627 \u0644\u0630\u062a \u0628\u0628\u0631\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\/\/ Layout.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> React<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> useRef <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> style <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Layout.module.css&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> PropTypes <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;prop-types&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> useScrollSaver <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/useScrollSaver&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Layout<\/span><span style=\"font-weight: 400\">({<\/span><span style=\"font-weight: 400\"> header<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> main<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> footer <\/span><span style=\"font-weight: 400\">})<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span><span style=\"font-weight: 400\"> scrollableDiv <\/span><span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useRef<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">null<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">useScrollSaver<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">window<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">location<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">pathname<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Container<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">header <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Header<\/span><span style=\"font-weight: 400\">}&gt;{<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">main <\/span><span style=\"font-weight: 400\">ref<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">scrollableDiv<\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Main<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">footer <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Footer<\/span><span style=\"font-weight: 400\">}&gt;{<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">}&lt;\/<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h4><b>\u0646\u0633\u062e\u0647 \u062f\u0645\u0648 Scrollsaver:<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0648 \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u06a9\u062f \u062f\u0631 Sandbox \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f. \u0633\u0639\u06cc \u06a9\u0646\u06cc\u062f \u0635\u0641\u062d\u0647 \u0631\u0627 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f\u060c \u0633\u067e\u0633 \u0627\u0632 \u067e\u06cc\u06a9\u0627\u0646 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u0633\u0645\u062a \u0686\u067e \u0648 \u06af\u0648\u0634\u0647 \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u0645\u062c\u062f\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u062c\u0627\u06cc\u06cc \u06a9\u0647 \u06a9\u0627\u0631 \u0631\u0627 \u0645\u062a\u0648\u0642\u0641 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u062f\u061b \u067e\u06cc\u062f\u0627 \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f.<\/span><\/p>\n<h4><b>Query\/Mutation (\u0645\u062e\u0635\u0648\u0635 GraphQL)<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u0627\u06af\u0631 \u062f\u0648\u0633\u062a \u062f\u0627\u0631\u06cc\u062f \u0645\u0627\u0646\u0646\u062f \u0645\u0646 \u0627\u0632 GraphQL \u0628\u0627 React \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u060c \u0628\u0627 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0647\u0648\u06a9 React \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u0627\u0631\u0647\u0627 \u06cc\u0627 \u062c\u0647\u0634 \u0647\u0627\u06cc GraphQL\u060c \u067e\u0627\u06cc\u06af\u0627\u0647 \u06a9\u062f \u0631\u0627 \u062d\u062a\u06cc \u0628\u06cc\u0634\u062a\u0631 \u06a9\u0627\u0647\u0634 \u062f\u0647\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc ()GraphQL query getPosts \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> useQuery <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;@apollo\/react-hooks&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">GET_POSTS<\/span> <span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">`<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">query<\/span><span style=\"font-weight: 400\"> getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0user <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0name<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0emojis <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useQuery<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">GET_POSTS<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0fetchPolicy<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">&#8220;network-only&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400\">});<\/span><\/p>\n<p><strong>\u0627\u06af\u0631 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc \u0628\u0631\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0627\u0632 \u0633\u0645\u062a \u0628\u06a9-\u0627\u0646\u062f \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a GraphQL \u0634\u0645\u0627 \u0641\u0636\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc \u0631\u0627 \u0627\u0634\u063a\u0627\u0644 \u0645\u06cc \u06a9\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0628\u0647 \u062c\u0627\u06cc \u062a\u06a9\u0631\u0627\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a GraphQL \u0648 useQuery \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u062c\u0631\u0627\u06cc query getPosts \u062f\u0627\u0631\u06cc\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0648\u06a9 React \u0632\u06cc\u0631 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">\/\/ useGetPosts.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> useQuery <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;@apollo\/react-hooks&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">useGetPosts<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">GET_POSTS<\/span> <span style=\"font-weight: 400\">=<\/span><span style=\"font-weight: 400\"> gql<\/span><span style=\"font-weight: 400\">`<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">query<\/span><span style=\"font-weight: 400\"> getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0getPosts <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0user <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0name<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0emojis <\/span><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">`<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\"> data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error <\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useQuery<\/span><span style=\"font-weight: 400\">(<\/span><span style=\"font-weight: 400\">GET_POSTS<\/span><span style=\"font-weight: 400\">,<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0fetchPolicy<\/span><span style=\"font-weight: 400\">:<\/span> <span style=\"font-weight: 400\">&#8220;network-only&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">});<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error<\/span><span style=\"font-weight: 400\">];<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h6><strong>\u0633\u067e\u0633\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0647\u0648\u06a9() useGetPosts \u062e\u0648\u062f \u0628\u0647 \u0634\u0631\u062d \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/strong><\/h6>\n<p><span style=\"font-weight: 400\">\/\/ Feed.js<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> React <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;react&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> Layout <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Layout&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> style <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/Feed.module.css&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p><span style=\"font-weight: 400\">import<\/span><span style=\"font-weight: 400\"> useGetPosts <\/span><span style=\"font-weight: 400\">from<\/span> <span style=\"font-weight: 400\">&#8220;.\/useGetPosts.js&#8221;<\/span><span style=\"font-weight: 400\">;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">export<\/span> <span style=\"font-weight: 400\">default<\/span> <span style=\"font-weight: 400\">function<\/span> <span style=\"font-weight: 400\">Feed<\/span><span style=\"font-weight: 400\">()<\/span> <span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">const<\/span> <span style=\"font-weight: 400\">[<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> loading<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> error<\/span><span style=\"font-weight: 400\">]<\/span> <span style=\"font-weight: 400\">=<\/span> <span style=\"font-weight: 400\">useGetPosts<\/span><span style=\"font-weight: 400\">();<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">return<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">Layout<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">header<\/span><span style=\"font-weight: 400\">={&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedHeader<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Header<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">main<\/span><span style=\"font-weight: 400\">={<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">ItemList<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">data<\/span><span style=\"font-weight: 400\">?.<\/span><span style=\"font-weight: 400\">getPosts<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">map<\/span><span style=\"font-weight: 400\">((<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">,<\/span><span style=\"font-weight: 400\"> idx<\/span><span style=\"font-weight: 400\">)<\/span> <span style=\"font-weight: 400\">=&gt;<\/span> <span style=\"font-weight: 400\">(<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">key<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">idx<\/span><span style=\"font-weight: 400\">}<\/span> <span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">Item<\/span><span style=\"font-weight: 400\">}&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">{<\/span><span style=\"font-weight: 400\">item<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">))}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">footer<\/span><span style=\"font-weight: 400\">={&lt;<\/span><span style=\"font-weight: 400\">div <\/span><span style=\"font-weight: 400\">className<\/span><span style=\"font-weight: 400\">={<\/span><span style=\"font-weight: 400\">style<\/span><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\">FeedFooter<\/span><span style=\"font-weight: 400\">}&gt;<\/span><span style=\"font-weight: 400\">Footer<\/span><span style=\"font-weight: 400\">&lt;\/<\/span><span style=\"font-weight: 400\">div<\/span><span style=\"font-weight: 400\">&gt;}<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\">\/&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><span style=\"font-weight: 400\">);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<h4><b>\u0646\u062a\u06cc\u062c\u0647<\/b><\/h4>\n<p><span style=\"font-weight: 400\">\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647\u060c \u0634\u0645\u0627 \u0633\u0647 \u0634\u0627\u062e\u0635 \u0645\u062a\u062f\u0627\u0648\u0644 \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a React \u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u062f\u0627\u0631\u0646\u062f \u0648 \u0633\u0647 \u0645\u0648\u0631\u062f \u0627\u0632 \u0645\u062d\u0628\u0648\u0628 \u062a\u0631\u06cc\u0646 \u0645\u0648\u0627\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0631\u0627 \u0622\u0645\u0648\u062e\u062a\u06cc\u062f. \u0627\u06a9\u0646\u0648\u0646 \u0634\u0645\u0627 \u0645\u06cc \u062f\u0627\u0646\u06cc\u062f \u06a9\u0647 \u0686\u0647 \u0645\u0648\u0642\u0639 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a React \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0686\u06af\u0648\u0646\u0647 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0648 \u062d\u0631\u0641\u0647\u200c\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f. \u0628\u0647 \u0632\u0648\u062f\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u062f\u06cc\u062f \u06a9\u0647 \u0627\u0632 \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644 \u062e\u0637\u0648\u0637 \u06a9\u062f \u062f\u0631 \u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u06cc\u0627 \u0647\u0648\u06a9 \u067e\u06cc\u0686\u06cc\u062f\u0647 React \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u062a\u06a9\u0646\u06cc\u06a9 \u0647\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644\u060c \u062a\u06cc\u0645 \u062a\u0648\u0633\u0639\u0647 \u0645\u0627 \u062f\u0631 \u0631\u0627\u0628\u0633\u0627\u0646\u0627 \u062a\u0648\u0627\u0646\u0633\u062a \u067e\u0627\u06cc\u06af\u0627\u0647 \u06a9\u062f \u0631\u0627 \u0628\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0627\u0628 \u06a9\u0646\u062a\u0631\u0644 \u06a9\u0627\u0647\u0634 \u062f\u0647\u062f. \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u06cc\u0645 \u06a9\u0647 \u0634\u0645\u0627 \u0646\u06cc\u0632 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u06af\u0631\u0686\u0647 React\u060c \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628 \u062a\u0631\u06cc\u0646 \u0648 \u067e\u0631\u06a9\u0627\u0631\u0628\u0631\u062f\u062a\u0631\u06cc\u0646 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0647\u0627\u06cc \u067e\u06cc\u0634 \u0641\u0631\u0636 \u062f\u0631 \u062c\u0647\u0627\u0646 \u0627\u0633\u062a\u060c \u0627\u0645\u0627 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0647\u0646\u0648\u0632 \u062f\u0631 \u0645\u0648\u0631\u062f \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644 \u06a9\u062f \u0628\u0631\u0627\u06cc \u0628\u0647\u0628\u0648\u062f \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u062a\u0644\u0627\u0634 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0627\u06af\u0631 \u062a\u0627 \u0628\u0647 \u062d\u0627\u0644 \u0645\u062a\u0648\u062c\u0647 \u0634\u062f\u0647\u200c\u0627\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u062a\u06a9\u0647 \u06a9\u062f \u0631\u0627 \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 React \u062e\u0648\u062f \u062a\u06a9\u0631\u0627\u0631 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0645\u0642\u0627\u0644\u0647 &hellip;<\/p>\n","protected":false},"author":5,"featured_media":3188,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[73],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.4 (Yoast SEO v18.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627<\/title>\n<meta name=\"description\" content=\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\" \/>\n<meta property=\"og:description\" content=\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-04T08:30:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-04T08:51:23+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\",\"name\":\"bagher rezvan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g\",\"caption\":\"bagher rezvan\"},\"logo\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#website\",\"url\":\"https:\/\/rabsana.ir\/tutorials\/\",\"name\":\"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"description\":\"\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u062e\u0635\u0635\u06cc \u0634\u0631\u06a9\u062a \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"publisher\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rabsana.ir\/tutorials\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp\",\"contentUrl\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp\",\"width\":1200,\"height\":360,\"caption\":\"\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062c\u062f\u062f \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc react\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage\",\"url\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/\",\"name\":\"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627\",\"isPartOf\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage\"},\"datePublished\":\"2021-10-04T08:30:28+00:00\",\"dateModified\":\"2021-10-04T08:51:23+00:00\",\"description\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact\",\"breadcrumb\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\/\/rabsana.ir\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage\"},\"author\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/7d71d62194d2ddcc7ebea10008921623\"},\"headline\":\"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\",\"datePublished\":\"2021-10-04T08:30:28+00:00\",\"dateModified\":\"2021-10-04T08:51:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage\"},\"wordCount\":1124,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b\"},\"image\":{\"@id\":\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp\",\"articleSection\":[\"\u0622\u062e\u0631\u06cc\u0646 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/7d71d62194d2ddcc7ebea10008921623\",\"name\":\"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/rabsana.ir\/tutorials\/#personlogo\",\"inLanguage\":\"fa-IR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/78c9c1e7a0ee35e6d9a3b0f49184483b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/78c9c1e7a0ee35e6d9a3b0f49184483b?s=96&d=mm&r=g\",\"caption\":\"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646\"},\"url\":\"https:\/\/rabsana.ir\/tutorials\/author\/sinash\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","description":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/","og_locale":"fa_IR","og_type":"article","og_title":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f","og_description":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact","og_url":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/","og_site_name":"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","article_published_time":"2021-10-04T08:30:28+00:00","article_modified_time":"2021-10-04T08:51:23+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"13 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Person","Organization"],"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b","name":"bagher rezvan","image":{"@type":"ImageObject","@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo","inLanguage":"fa-IR","url":"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43c698432e5f8e000d945d3945e15b50?s=96&d=mm&r=g","caption":"bagher rezvan"},"logo":{"@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo"}},{"@type":"WebSite","@id":"https:\/\/rabsana.ir\/tutorials\/#website","url":"https:\/\/rabsana.ir\/tutorials\/","name":"\u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","description":"\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u062e\u0635\u0635\u06cc \u0634\u0631\u06a9\u062a \u0637\u0631\u0627\u062d\u06cc \u0633\u0627\u06cc\u062a \u0631\u0627\u0628\u0633\u0627\u0646\u0627","publisher":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rabsana.ir\/tutorials\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fa-IR"},{"@type":"ImageObject","@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage","inLanguage":"fa-IR","url":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp","contentUrl":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp","width":1200,"height":360,"caption":"\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062c\u062f\u062f \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc react"},{"@type":"WebPage","@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage","url":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/","name":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f | \u0622\u0645\u0648\u0632\u0634 \u0631\u0627\u0628\u0633\u0627\u0646\u0627","isPartOf":{"@id":"https:\/\/rabsana.ir\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage"},"datePublished":"2021-10-04T08:30:28+00:00","dateModified":"2021-10-04T08:51:23+00:00","description":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React\u060c \u062a\u0631\u0641\u0646\u062f\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0648\u0644\u0641\u0647 \u0647\u0627\u06cc React\u062c\u0647\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06ccReact","breadcrumb":{"@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/rabsana.ir\/tutorials\/"},{"@type":"ListItem","position":2,"name":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f"}]},{"@type":"Article","@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#article","isPartOf":{"@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage"},"author":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/7d71d62194d2ddcc7ebea10008921623"},"headline":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0639\u0645\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a \u0647\u0627\u06cc React \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f","datePublished":"2021-10-04T08:30:28+00:00","dateModified":"2021-10-04T08:51:23+00:00","mainEntityOfPage":{"@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#webpage"},"wordCount":1124,"commentCount":0,"publisher":{"@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/4ae2a08dbbdf43f1d2e6fe967155aa4b"},"image":{"@id":"https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#primaryimage"},"thumbnailUrl":"https:\/\/rabsana.ir\/tutorials\/wp-content\/uploads\/2021\/10\/react1.webp","articleSection":["\u0622\u062e\u0631\u06cc\u0646 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc \u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rabsana.ir\/tutorials\/creating-reusable-react-components\/#respond"]}]},{"@type":"Person","@id":"https:\/\/rabsana.ir\/tutorials\/#\/schema\/person\/7d71d62194d2ddcc7ebea10008921623","name":"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646","image":{"@type":"ImageObject","@id":"https:\/\/rabsana.ir\/tutorials\/#personlogo","inLanguage":"fa-IR","url":"https:\/\/secure.gravatar.com\/avatar\/78c9c1e7a0ee35e6d9a3b0f49184483b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/78c9c1e7a0ee35e6d9a3b0f49184483b?s=96&d=mm&r=g","caption":"\u0633\u06cc\u0646\u0627 \u0634\u062c\u0639\u0627\u0646"},"url":"https:\/\/rabsana.ir\/tutorials\/author\/sinash\/"}]}},"_links":{"self":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/3184"}],"collection":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/comments?post=3184"}],"version-history":[{"count":3,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/3184\/revisions"}],"predecessor-version":[{"id":3189,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/posts\/3184\/revisions\/3189"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/media\/3188"}],"wp:attachment":[{"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/media?parent=3184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/categories?post=3184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rabsana.ir\/tutorials\/wp-json\/wp\/v2\/tags?post=3184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}