{"id":347020,"date":"2023-03-21T09:00:35","date_gmt":"2023-03-21T09:00:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=347020"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=347020","title":{"rendered":"<span>\u0422\u0440\u0430\u043d\u0441\u043f\u043b\u0430\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p> \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u041a\u0430\u0440\u043b\u043e\u0432\u0441\u043a\u0438\u0439, \u0438 \u044f.. \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0447\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/wire\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 $mol_wire<\/a>. \u0418\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043d\u0435 \u0432\u0430\u043c \u0435\u0441\u0442\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0447\u0435\u043c \u043f\u0443\u0433\u0430\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u043f\u0435\u0440\u0435\u0434 \u0441\u043d\u043e\u043c. <\/p>\n<p> \u041d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 &#8212; \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u043b\u043a\u0430\u044f \u0446\u0435\u043b\u044c. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0439 <a href=\"https:\/\/mol.hyoo.ru\/\" rel=\"noopener noreferrer nofollow\">\u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/a> \u0441 \u043a\u0443\u0447\u0435\u0439 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a &#8212; \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439, \u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043c\u0431\u0438\u0446\u0438\u043e\u0437\u043d\u043e. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lingua_franca\" rel=\"noopener noreferrer nofollow\">lingua franca<\/a> \u0432 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u043c\u0435\u0436\u0434\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u0434\u0430\u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438. <\/p>\n<p> \u0411\u0435\u0440\u0435\u0433\u0438\u0442\u0435 \u0441\u0438\u043d\u0430\u043f\u0441\u044b, \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043a\u0438\u0431\u0435\u0440\u043f\u0430\u043d\u043a.. <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/tj\/nd\/ao\/tjndaoxz6rg-tvia9kzbdwnzsry.jpeg\" alt=\"\" title=\"\" width=\"800\" height=\"450\" data-src=\"https:\/\/habrastorage.org\/webt\/tj\/nd\/ao\/tjndaoxz6rg-tvia9kzbdwnzsry.jpeg\" data-blurred=\"true\"\/><\/figure>\n<hr\/>\n<h2> \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 React <\/h2>\n<p> ReactJS \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0432\u043e\u043f\u0440\u0435\u043a\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0447\u0451\u0442\u043e\u0432. \u0412\u043e\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445: <\/p>\n<ul>\n<li>\n<p> \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442, &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a\/\u043e\u0442\u043f\u0438\u0441\u043e\u043a \u0438 \u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445. <\/p>\n<\/li>\n<li>\n<p> \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f <em>\u0441\u043e\u0441\u0435\u0434\u0435\u0439<\/em>. \u0422\u043e \u0436\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f\/\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<\/li>\n<li>\n<p> \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0440\u0430\u0437\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u043c\u0435\u0441\u0442\u043d\u043e \u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b.  <\/p>\n<\/li>\n<li>\n<p> \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430 \u043b\u0435\u0442\u0443 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043b\u0438\u0448\u043d\u0438\u043c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0439 \u0438\u0445 \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. <\/p>\n<\/li>\n<li>\n<p> \u0425\u0443\u043a\u0438 <a href=\"https:\/\/reactjs.org\/docs\/hooks-rules.html\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043b\u044c\u0437\u044f<\/a> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0446\u0438\u043a\u043b\u0430\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f. <\/p>\n<\/li>\n<li>\n<p> \u041e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0438 \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u043c \u0438 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043d\u0430 \u0441\u043e\u0441\u0435\u0434\u0435\u0439. <\/p>\n<\/li>\n<li>\n<p> \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c \u043b\u0438\u0431\u043e \u043e\u0431\u043c\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043b\u0438\u0431\u043e \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. <\/p>\n<\/li>\n<li>\n<p> \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f stateful \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430 \u0434\u0432\u0430: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 stateless \u0438 \u043d\u0435\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u0430\u044f stateful \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0438\u043c. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u043f\u0440\u044f\u0436\u0451\u043d \u0441 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u043e\u0439. <\/p>\n<\/li>\n<\/ul>\n<p> \u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u043b\u0435\u0447\u0438\u043c \u0431\u043e\u043b\u044c\u043d\u043e\u0433\u043e, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/wire\" rel=\"noopener noreferrer nofollow\">$mol_wire<\/a> \u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u043d\u043e\u0440\u043e\u0434\u043d\u0443\u044e \u0435\u043c\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/us\/ly\/ea\/uslyear0opiathg8whfifakmjue.jpeg\" alt=\"\" title=\"\" width=\"688\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/webt\/us\/ly\/ea\/uslyear0opiathg8whfifakmjue.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p> \u041d\u0430\u0447\u043d\u0451\u043c \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430 &#8212; \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 JSON \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e: <\/p>\n<pre><code class=\"typescript\">export const getJSON = sync( async function getJSON( uri: string ){ const resp = await fetch(uri) if( Math.floor( resp.status \/ 100 ) === 2 ) return resp.json() throw new Error( `${resp.status} ${resp.statusText}` ) } )  <\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c API \u0434\u043b\u044f GitHub, \u0441 debounce \u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 issue \u043f\u043e \u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0443: <\/p>\n<pre><code class=\"typescript\">export class GitHub extends Object {  \/\/ cache @mems static issue( value: number, reload?: \"reload\" ) {  sleep(500) \/\/ debounce  const uri = `https:\/\/api.github.com\/repos\/nin-jin\/HabHub\/issues\/${value}` return getJSON( uri ) as { title: string html_url: string }  }    }  <\/code><\/pre>\n<p> \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b \u0440\u0430\u0437 \u043c\u044b \u043d\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u0435\u0448\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u0435\u0448\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u0430 \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432 \u043f\u043e\u043b \u0441\u0435\u043a\u0443\u043d\u0434\u044b. <\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u0412\u043e\u043f\u0440\u0435\u043a\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0442\u0440\u0435\u043d\u0434\u0443, \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u044f\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0445\u0443\u043a\u0430\u043c\u0438, \u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0443, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: <\/p>\n<pre><code class=\"typescript\">export abstract class Component&lt; Props = { id: string }, State = {}, SnapShot = any > extends React.Component&lt; Partial&lt;Props> &amp; { id: string }, State, SnapShot > {  \/\/ every component should have guid id!: string;  \/\/ show id in debugger [Symbol.toStringTag] = this.props.id  \/\/ override fields by props to configure constructor(props: Props &amp; { id: string }) { super(props) Object.assign(this, props) }  \/\/ composes inner components as vdom abstract compose(): any  \/\/ memoized render which notify react on recalc @mem render() { log(\"render\", \"#\" + this.id) Promise.resolve().then(() => this.forceUpdate()) return this.compose() }  }  <\/code><\/pre>\n<p> \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u044b\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c &#8212; \u043b\u044e\u0431\u043e\u0435 \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043f\u0441\u044b. \u0412\u0441\u0435 \u043f\u0440\u043e\u043f\u0441\u044b \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b, \u043a\u0440\u043e\u043c\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u043d\u044b\u043c. <\/p>\n<p> \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u0441\u044b \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 &#8212; \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0438 \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u043e\u0432. \u0418\u0434\u0435\u044f \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e (\u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0441\u043e\u0432) \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 (\u043f\u0443\u0442\u0451\u043c \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043b\u0431\u044d\u043a\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u043f\u0441\u0430\u0445).   <\/p>\n<p> \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 &#8212; \u043a\u043e\u0433\u0434\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>render<\/code>. ReactJS \u0441\u043b\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e. \u0422\u0443\u0442 \u0436\u0435, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u044b. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442 \u0435\u0433\u043e \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u043e\u043d\u0446\u0438\u043b\u0438\u0430\u0446\u0438\u0438, \u0442\u043e\u0433\u0434\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u044b\u0437\u043e\u0432\u0435\u0442 <code>render<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u0432\u0435\u0436\u0438\u0439 VDOM. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c VDOM \u0438\u0437 \u043a\u0435\u0448\u0430 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. <\/p>\n<p> \u0422\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0445\u0443\u043a\u0438, \u043d\u043e \u0441 $mol_wire, \u0445\u0443\u043a\u0438 &#8212; \u043a\u0430\u043a \u0441\u043e\u0431\u0430\u043a\u0435 \u043f\u044f\u0442\u0430\u044f \u043d\u043e\u0433\u0430. <\/p>\n<p> \u041f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputString extends Component&lt;InputString> {  \/\/ statefull! @mem value( next = \"\" ) { return next; }  change( event: ChangeEvent&lt;HTMLInputElement> ) { this.value( event.target.value ) this.forceUpdate() \/\/ prevent caret jumping }  compose() { return ( &lt;input id={ this.id } className=\"inputString\" value={ this.value() } onInput={ action(this).change } \/> ) }  }  <\/code><\/pre>\n<p> \u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u0438 \u044d\u043a\u0448\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u043a\u0448\u0435\u043d\u0430 \u043c\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c ReactJS \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u043a\u0430\u0440\u0435\u0442\u043a\u0430 \u0443\u043b\u0435\u0442\u0438\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0443 \u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u044d\u043a\u0448\u0435\u043d\u0430 \u0432 VDOM \u043c\u044b \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0435\u0433\u043e \u0432 \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439. <\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputNumber extends Component&lt;InputNumber> {  \/\/ self state @mem numb( next = 0 ) { return next; }  dec() { this.numb(this.numb() - 1); }  inc() { this.numb(this.numb() + 1); }  \/\/ lifted string state as delegate to number state! @mem str( str?: string ) {  const next = str?.valueOf &amp;&amp; Number(str) if( Object.is( next, NaN ) ) return str ?? \"\"  const res = this.numb( next ) if( next === res ) return str ?? String( res ?? \"\" )  return String( res ?? \"\" ) }  compose() { return ( &lt;div id={this.id} className=\"inputNumber\" >  &lt;Button id={ `${this.id}-decrease` } action={ ()=> this.dec() } title={ ()=> \"\u2796\" } \/>  &lt;InputString id={ `${this.id}-input` } value={ next => this.str( next ) } \/\/ hack to lift state up \/>  &lt;Button id={ `${this.id}-increase` } action={ ()=> this.inc() } title={ ()=> \"\u2795\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0443 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>value<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435 \u0443 \u0441\u0435\u0431\u044f, \u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 <code>str<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u043e\u043c \u0443\u0436\u0435 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>numb<\/code>. \u041b\u043e\u0433\u0438\u043a\u0430 \u0435\u0433\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u0430\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u043c\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0432\u043e\u0434 \u0438\u0437-\u0437\u0430 \u0437\u0430\u043c\u0435\u043d\u044b \u0435\u0433\u043e \u043d\u0430 *\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435* \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <\/p>\n<p> \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 VDOM \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043d\u0438 \u043e\u0442 \u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0435, \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041d\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 <code>numb<\/code> \u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 <code>str<\/code>. <\/p>\n<p> \u0422\u0430\u043a \u0436\u0435 \u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <code>Button<\/code> \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435. \u041d\u043e \u043e \u043a\u043d\u043e\u043f\u043a\u0430\u0445 \u043f\u043e\u0437\u0436\u0435, \u0430 \u043f\u043e\u043a\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u0448\u0438\u043c\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 <code>Counter<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u043d\u043e \u0438 \u0433\u0440\u0443\u0437\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: <\/p>\n<pre><code class=\"typescript\">export class Counter extends Component&lt;Counter> {  @mem numb( value = 48 ) { return value }  issue( reload?: \"reload\" ) { return GitHub.issue( this.numb(), reload ) }  title() { return this.issue().title; }  link() { return this.issue().html_url; }  compose() { return ( &lt;div id={ this.id } className=\"counter\" >  &lt;InputNumber id={ `${this.id}-numb` } numb={ next => this.numb( next ) } \/\/ hack to lift state up \/>  &lt;Safe id={ `${this.id}-output-safe` } task={ () => (  &lt;a id={ `${this.id}-link` } className=\"counter-link\" href={ this.link() } > { this.title() } &lt;\/a>  ) } \/>  &lt;Button id={ `${this.id}-reload` } action={ () => this.issue(\"reload\") } title={ () => \"Reload\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u041a\u0430\u043a \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043c\u044b \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u0435\u0449\u0451 \u0432\u044b\u0448\u0435 &#8212; \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u043e\u043c <em>issue<\/em>. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043d\u043e\u043c\u0435\u0440\u0443 \u043c\u044b \u0447\u0435\u0440\u0435\u0437 GitHub API \u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0440\u044f\u0434\u043e\u043c, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0432 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Safe<\/code>, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c \u0435\u043c\u0443 \u043a\u043e\u0434\u0435: \u043f\u0440\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440, \u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 &#8212; \u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u043e\u0431\u044b\u0447\u043d\u044b\u043c <code>try-catch<\/code>: <\/p>\n<pre><code class=\"typescript\">export abstract class Safe extends Component&lt;Safe> {  task() {}  compose() {  try { return this.task() } catch( error ) {  if( error instanceof Promise ) return ( &lt;span id={ `${this.id}-wait` } className=\"safe-wait\" > ? &lt;\/span> )  if( error instanceof Error ) return ( &lt;span id={ `${this.id}-error` } className=\"safe-error\" > {error.message} &lt;\/span> )  throw error }  } }  <\/code><\/pre>\n<p> \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u0430 \u0443\u043c\u043d\u0443\u044e, \u0443\u043c\u0435\u044e\u0449\u0443\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438: <\/p>\n<pre><code class=\"typescript\">export class Button extends Component&lt;Button> {  title() { return \"\" }  action( event?: MouseEvent&lt;HTMLButtonElement> ) {}  @mem click( next?: MouseEvent&lt;HTMLButtonElement> | null ) { if( next ) this.forceUpdate() return next; }  @mem status() {  const event = this.click() if( !event ) return  this.action( event ) this.click( null )  }  compose() { return (  &lt;button id={this.id} className=\"button\" onClick={ action(this).click } >  { this.title() } {\" \"}  &lt;Safe id={ `${this.id}-safe` } task={ () => this.status() } \/>  &lt;\/button>  ) }  }  <\/code><\/pre>\n<p> \u0422\u0443\u0442 \u043c\u044b \u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043b\u0430\u0434\u0451\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>click<\/code>, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>status<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0410 \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d \u0441\u0440\u0430\u0437\u0443, \u0430 \u043d\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 (\u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 JS API \u0442\u0438\u043f\u0430 <code>clipboard<\/code>), \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>forceUpdate<\/code>. \u0421\u0430\u043c <code>status<\/code> \u0432 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <code>Safe<\/code>. <\/p>\n<p> \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/codesandbox.io\/s\/vigorous-lederberg-b53uc?file=\/src\/Counter.tsx\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/a>: <\/p>\n<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/29f\/388\/33e\/29f38833ef44ca4cb09b85110fa49000.png\" alt=\"\" title=\"\" width=\"496\" height=\"166\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/29f\/388\/33e\/29f38833ef44ca4cb09b85110fa49000.png\"\/><\/figure>\n<p> \u0422\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0435\u0449\u0451 \u0438 \u043b\u043e\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433: <\/p>\n<pre><code class=\"ruby\">render #counter  render #counter-numb  render #counter-numb-decrease  render #counter-numb-decrease-safe  render #counter-numb-input  render #counter-numb-increase  render #counter-numb-increase-safe  render #counter-title-safe  render #counter-reload  render #counter-reload-safe   fetch GitHub.issue(48)  render #counter-title-safe  render #counter-title-safe   <\/code><\/pre>\n<p> \u0422\u0443\u0442 <code>#counter-title-safe<\/code> \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b\u0441\u044f 3 \u0440\u0430\u0437\u0430 \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043f\u0435\u0440\u0432\u0430 \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b ? \u043d\u0430 <em>debounce<\/em>, \u043f\u043e\u0442\u043e\u043c \u043d\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. <\/p>\n<p> \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 <code>Reaload<\/code> \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e &#8212; \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c: <\/p>\n<pre><code class=\"ruby\">render #counter-reload-safe   fetch GitHub.issue(48)  render #counter-reload-safe render #counter-reload-safe  <\/code><\/pre>\n<p> \u041d\u0443 \u0430 \u043f\u0440\u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0433\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430: <\/p>\n<pre><code class=\"ruby\">render #counter-numb-input  render #counter-title-safe   render #counter-numb-input  render #counter-title-safe   fetch GitHub.issue(4)  render #counter-title-safe  render #counter-title-safe   <\/code><\/pre>\n<p> \u0418\u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438: <\/p>\n<ul>\n<li>\n<p> \u2705 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0447\u0435\u0447\u043d\u043e (\u0430 \u043d\u0435 \u043a\u0430\u043a \u0441 Redux) \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. <\/p>\n<\/li>\n<li>\n<p> \u2705 \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. <\/p>\n<\/li>\n<li>\n<p> \u274c \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 ReactJS. <\/p>\n<\/li>\n<li>\n<p> \u2705 \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0431\u044d\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0443. <\/p>\n<\/li>\n<li>\n<p> \u2705 \u041d\u0430\u0448 \u0430\u043d\u0430\u043b\u043e\u0433 \u0445\u0443\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043a\u043e\u0434\u0430, \u0434\u0430\u0436\u0435 \u0432 \u0446\u0438\u043a\u043b\u0430\u0445 \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. <\/p>\n<\/li>\n<li>\n<p> \u274c \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ReactJS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. <\/p>\n<\/li>\n<li>\n<p> \u2705 \u0414\u043b\u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435. <\/p>\n<\/li>\n<li>\n<p> \u2705 stateful \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e\u043b\u0441\u043d\u043e\u0442\u044c\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b. <\/p>\n<\/li>\n<\/ul>\n<p> \u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/github.com\/zerkalica\/remol\" rel=\"noopener noreferrer nofollow\">remol<\/a>, \u0435\u0441\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0435\u0451 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439. \u0418\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0410 \u043c\u044b \u043f\u043e\u043a\u0430 \u043e\u0442\u0441\u0442\u044b\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0443\u043f\u0435\u043d\u044c \u0438 \u043b\u0435\u0442\u0438\u043c \u0435\u0449\u0451 \u0432\u044b\u0448\u0435.. <\/p>\n<hr\/>\n<h2> \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 JSX <\/h2>\n<p> \u041d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u0442\u0431\u0438\u0440\u0430\u044f \u0443 ReactJS \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c, \u043c\u044b \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0438\u0437\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u044c\u0435\u0434\u0435\u0441\u0442\u0430\u043b\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 DOM, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438 \u044f\u0432\u043b\u044f\u043b\u0441\u044f. \u041d\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u044f\u0436\u0451\u043b\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0442\u0440\u0430\u0442\u044f\u0449\u0430\u044f \u0432\u043f\u0443\u0441\u0442\u0443\u044e \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0433\u043e\u043b\u044b\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 JSX, \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e $mol_wire, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043f\u043e\u043b\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 ReactJS, \u043d\u043e \u0431\u0435\u0437 VirtualDOM, \u043d\u043e \u0441 \u0442\u043e\u0447\u0435\u0447\u043d\u044b\u043c\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c\u0438 \u043f\u043b\u044e\u0448\u043a\u0430\u043c\u0438. <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/yu\/yb\/l8\/yuybl8xljnakvwhoneotiecqq2e.jpeg\" alt=\"\" title=\"\" width=\"688\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/webt\/yu\/yb\/l8\/yuybl8xljnakvwhoneotiecqq2e.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p> \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043f\u0435\u0440\u0432\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u043c <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/jsx\" rel=\"noopener noreferrer nofollow\">$mol_jsx<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a <a href=\"https:\/\/en.wikipedia.org\/wiki\/ECMAScript_for_XML\" rel=\"noopener noreferrer nofollow\">E4X<\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 DOM \u0443\u0437\u043b\u044b, \u0430 \u043d\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435: <\/p>\n<pre><code class=\"typescript\">const title = &lt;h1 class=\"title\" dataset={{ slug: 'hello' }}>{ this.title() }&lt;\/h1> const text = title.innerText \/\/ Hello, World! const html = title.outerHTML \/\/ &lt;h1 class=\"title\" data-slug=\"hello\">Hello, World!&lt;\/h1>  <\/code><\/pre>\n<p> \u041e\u043f\u0430, \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d <a href=\"https:\/\/reactjs.org\/docs\/refs-and-the-dom.html\" rel=\"noopener noreferrer nofollow\">ref<\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f DOM \u0443\u0437\u043b\u0430 \u0438\u0437 JSX, \u0432\u0435\u0434\u044c \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442 \u043d\u0435\u0433\u043e DOM \u0434\u0435\u0440\u0435\u0432\u043e. <\/p>\n<p> \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c JSX \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a, \u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432: <\/p>\n<pre><code class=\"xml\">&lt;body> &lt;h1 id=\"title\">...&lt;\/h1> &lt;\/body>  <\/code><\/pre>\n<pre><code class=\"typescript\">$mol_jsx_attach( document, ()=> ( &lt;h1 id=\"title\" class=\"header\">Wow!&lt;\/h1> ) )  <\/code><\/pre>\n<pre><code class=\"xml\">&lt;body> &lt;h1 id=\"title\" class=\"header\">Wow!&lt;\/h1> &lt;\/body>  <\/code><\/pre>\n<p> \u041e\u043f\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0435\u0449\u0451 \u0438 <a href=\"https:\/\/reactjs.org\/docs\/react-dom.html#hydrate\" rel=\"noopener noreferrer nofollow\">\u0433\u0438\u0434\u0440\u0430\u0442\u0430\u0446\u0438\u044e<\/a>, \u043d\u043e \u0431\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043c, \u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c. <\/p>\n<p> \u041e\u043f\u0430, \u0434\u0430 \u043c\u044b \u0436 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0435\u0449\u0451 \u0438 <a href=\"https:\/\/reactjs.org\/docs\/lists-and-keys.html\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/a> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0445 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u041f\u0440\u0438\u0447\u0451\u043c \u0443\u0436\u0435 \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: <\/p>\n<pre><code class=\"xml\">&lt;body> &lt;article id=\"todo\"> &lt;h1 id=\"task\/1\">Complete article about $mol_wire&lt;\/h1> &lt;article> &lt;article id=\"done\">&lt;\/article> &lt;\/body>  <\/code><\/pre>\n<pre><code class=\"typescript\">$mol_jsx_attach( document, ()=> ( &lt;article id=\"done\"> &lt;h1 id=\"task\/1\">Complete article about $mol_wire&lt;\/h1> &lt;article> ) )  <\/code><\/pre>\n<pre><code class=\"xml\">&lt;body> &lt;article id=\"todo\">&lt;\/article> &lt;article id=\"done\"> &lt;h1 id=\"task\/1\">Complete article about $mol_wire&lt;\/h1> &lt;article> &lt;\/body>  <\/code><\/pre>\n<p> \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f HTML \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 <code>id<\/code> \u0438 <code>class<\/code> \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0444\u0435\u043c\u0435\u0440\u043d\u044b\u0445 <code>key<\/code> \u0438 <code>className<\/code>. <\/p>\n<p> \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0433\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b (stateless \u0444\u0443\u043d\u043a\u0446\u0438\u0438), \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b (stateful \u043a\u043b\u0430\u0441\u0441\u044b). \u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u044f\u0442 \u0441\u0432\u043e\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0410 \u0432\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u044e\u0442 \u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0433\u043e \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c DOM \u0443\u0437\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435. \u0412 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a: <\/p>\n<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/07b\/954\/193\/07b9541939faba7d7af1e24369355fc3.png\" alt=\"\" title=\"\" width=\"476\" height=\"155\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/07b\/954\/193\/07b9541939faba7d7af1e24369355fc3.png\"\/><\/figure>\n<p> \u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 DOM \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u0437 DOM \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e: <\/p>\n<pre><code class=\"typescript\">const input = InputString.of( element )  <\/code><\/pre>\n<p> \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputString extends View {  \/\/ statefull! @mem value( next = \"\" ) { return next }  \/\/ event handler change( event: InputEvent ) { this.value( ( event.target as HTMLInputElement ).value ) }  \/\/ apply state to DOM render() { return ( &lt;input value={ this.value() } oninput={ action(this).change } \/> ) }  }  <\/code><\/pre>\n<p> \u041f\u043e\u0447\u0442\u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434, \u0447\u0442\u043e \u0438 \u0441 ReactJS, \u043d\u043e: <\/p>\n<ul>\n<li>\n<p> \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c DOM, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0442\u043e \u0442\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u0441\u0442\u044b\u043b\u044c \u0441 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u043a\u0430\u0440\u0435\u0442\u043a\u0430 \u043d\u0435 \u0443\u043b\u0435\u0442\u0430\u043b\u0430 \u0432 \u043a\u043e\u043d\u0435\u0446. <\/p>\n<\/li>\n<li>\n<p> \u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435, \u0430 \u043d\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u0447\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043a\u0443\u0447\u0438 <a href=\"https:\/\/reactjs.org\/docs\/legacy-event-pooling.html\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439<\/a>. <\/p>\n<\/li>\n<li>\n<p> \u041a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0438\u043c\u0451\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. <\/p>\n<\/li>\n<li>\n<p> \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 &#8212; \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0442\u043e\u0436\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p> \u0414\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c &#8212; \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<\/li>\n<li>\n<p> \u041f\u0440\u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043a\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. <\/p>\n<\/li>\n<\/ul>\n<p> \u0414\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputNumber extends View {  \/\/ self state @mem numb( next = 0 ) { return next }  dec() { this.numb( this.numb() - 1 ) }  inc() { this.numb( this.numb() + 1 ) }  \/\/ lifted string state as delegate to number state! @mem str(str?: string) {  const next = str?.valueOf &amp;&amp; Number( str ) if( Object.is( next, NaN ) ) return str ?? \"\"  const res = this.numb(next) if( next === res ) return str ?? String( res ?? \"\" )  return String( res ?? \"\" ) }  render() { return ( &lt;div>  &lt;Button id=\"decrease\" action={ () => this.dec() } title={ () => \"\u2796\" } \/>  &lt;InputString id=\"input\" value={ next => this.str( next ) } \/\/ hack to lift state up \/>  &lt;Button id=\"increase\" action={ () => this.inc() } title={ () => \"\u2795\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u041f\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u0438 \u043d\u0430 \u043b\u044e\u0431\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b: <\/p>\n<pre><code class=\"css\">\/** bem-block *\/ .InputNumber {   border-radius: 0.25rem;   box-shadow: 0 0 0 1px gray;   display: flex;   overflow: hidden; }  \/** bem-element *\/ .InputNumber_input {   flex: 1 0 auto; }  \/** bem-element of bem-element *\/ .Counter_numb_input { color: red; }  <\/code><\/pre>\n<p> \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 <a href=\"https:\/\/page.hyoo.ru\/#!=xwq9q5_f966fg\" rel=\"noopener noreferrer nofollow\">CSS-in-TS<\/a> \u0432 JSX \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, \u043d\u043e \u0434\u0430\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044e. <\/p>\n<p> \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0430\u0434\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 JSX \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: <\/p>\n<pre><code class=\"typescript\">\/** Reactive JSX component *\/ abstract class View extends $mol_object2 {  \/** Returns component instance for DOM node. *\/ static of&lt; This extends typeof $mol_jsx_view >( this: This, node: Element ) { return node[ this as any ] as InstanceType&lt; This > }  \/\/ Allow overriding of all fields via attributes attributes!: Partial&lt; Pick&lt; this, Exclude&lt; keyof this, 'valueOf' > > >  \/** Document to reuse DOM elements by ID *\/ ownerDocument!: typeof $mol_jsx_document  \/** Autogenerated class names *\/ className = ''  \/** Children to render inside *\/ @ $mol_wire_field get childNodes() { return [] as Array&lt; Node | string > }  \/** Memoized render in right context *\/ @ $mol_wire_solo valueOf() {  const prefix = $mol_jsx_prefix const booked = $mol_jsx_booked const crumbs = $mol_jsx_crumbs const document = $mol_jsx_document  try {  $mol_jsx_prefix = this[ Symbol.toStringTag ] $mol_jsx_booked = new Set $mol_jsx_crumbs = this.className $mol_jsx_document = this.ownerDocument  return this.render()  } finally {  $mol_jsx_prefix = prefix $mol_jsx_booked = booked $mol_jsx_crumbs = crumbs $mol_jsx_document = document  }  }  \/** Returns actual DOM tree *\/ abstract render(): HTMLElement  }  <\/code><\/pre>\n<p> \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0432 \u0441 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0443\u0436\u0435 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435: <\/p>\n<pre><code class=\"typescript\">export class Counter extends View {  @mem numb( value = 48 ) { return value }  issue( reload?: \"reload\" ) { return GitHub.issue( this.numb(), reload ) }  title() { return this.issue().title }  link() { return this.issue().html_url }  render() { return ( &lt;div>  &lt;InputNumber id=\"numb\" numb={ next => this.numb(next) } \/\/ hack to lift state up \/>  &lt;Safe id=\"titleSafe\" task={ ()=> ( &lt;a id=\"title\" href={ this.link() }> { this.title() } &lt;\/a> ) } \/>  &lt;Button id=\"reload\" action={ ()=> this.issue(\"reload\") } title={ ()=> \"Reload\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/codesandbox.io\/s\/mol-jsx-lib-ljiyl7?file=\/src\/Counter\/Counter.tsx\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/a>. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u043e\u0442 \u0437\u0430 1 \u0432\u0435\u0447\u0435\u0440 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 ReactJS \u043d\u0430 $mol, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a\u0443\u0447\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0438\u0447\u0435\u0439, \u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 \u043e\u0431\u044a\u0451\u043c \u0431\u0430\u043d\u0434\u043b\u0430 \u0432 5 \u0440\u0430\u0437. \u041f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0436\u0435 \u043c\u044b <a href=\"https:\/\/bench.hyoo.ru\/app\/#!sample=mol~moljsx~react\/sort=fill\/count=10000\" rel=\"noopener noreferrer nofollow\">\u0438\u0434\u0451\u043c \u043d\u043e\u0437\u0434\u0440\u044f \u0432 \u043d\u043e\u0437\u0434\u0440\u044e \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c<\/a>: <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/185\/bc4\/767\/185bc4767b3dd73898d845e1046c7408.png\" width=\"596\" height=\"274\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/185\/bc4\/767\/185bc4767b3dd73898d845e1046c7408.png\"\/><\/figure>\n<p> \u0410 \u043a\u0430\u043a \u043d\u0430\u0441\u0447\u0451\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 &#8212; \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 $mol \u043d\u0430 ReactJS? \u0412\u0430\u043c <a href=\"https:\/\/remix.run\/blog\/seed-funding-for-remix\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<\/a> \u043c\u0438\u043d\u0438\u043c\u0443\u043c 3 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0437 \u0434\u0435\u0441\u044f\u0442\u043a\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u041d\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0436\u0434\u0430\u0442\u044c, \u0430 \u043e\u0442\u0441\u0442\u044b\u043a\u0443\u0435\u043c \u0438 \u044d\u0442\u0443 \u0441\u0442\u0443\u043f\u0435\u043d\u044c.. <\/p>\n<hr\/>\n<h2> \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 DOM <\/h2>\n<p> \u0420\u0430\u043d\u044c\u0448\u0435 DOM \u0431\u044b\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c \u0438 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c. \u0427\u0442\u043e\u0431\u044b \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0432\u043b\u0430\u0434\u0430\u0442\u044c \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 VirtualDOM, IncrementalDOM, ShadowDOM. \u041e\u0434\u043d\u0430\u043a\u043e, \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b RealDOM \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f: <\/p>\n<p> 1. <strong>\u0416\u0430\u0434\u043d\u043e\u0441\u0442\u044c.<\/strong> \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043a\u043e\u0434 &#171;\u0445\u043e\u0447\u0443 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439 \u043c\u043d\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u043f\u044f\u0442\u043e\u0433\u043e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0435\u0434\u044c\u043c\u043e\u0433\u043e&#187;. \u041d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 DOM, \u0447\u0442\u043e\u0431\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043b\u0438\u0448\u044c \u043c\u0430\u043b\u0443\u044e \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c. \u0410 \u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 <a href=\"https:\/\/page.hyoo.ru\/#!=u4oxgj_q8dpwd\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0451\u043c\u043a\u043e<\/a>. <\/p>\n<p> 2. <strong>\u0411\u0435\u0437\u0443\u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c.<\/strong> \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 DOM \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043a\u0430\u043a \u043e\u0442 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0442\u0430\u043a \u0438 \u043e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0441\u0430\u043c\u043e\u0433\u043e DOM. \u041d\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u0442\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DOM. <\/p>\n<p> 3. <strong>\u0422\u0435\u0440\u043d\u0438\u0441\u0442\u043e\u0441\u0442\u044c.<\/strong> \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 DOM \u043d\u0430\u043c \u0438 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u043a\u0430\u043a \u0438 \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.  <\/p>\n<p> \u041d\u0443 \u0434\u0430 \u043b\u0430\u0434\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b, \u0435\u0441\u043b\u0438 \u0431\u044b DOM \u0438 \u0432\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0431\u0435\u0437\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c! <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/zs\/ji\/wz\/zsjiwz4h4mjdpza8il-cnh1qxx8.jpeg\" alt=\"\" title=\"\" width=\"688\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/webt\/zs\/ji\/wz\/zsjiwz4h4mjdpza8il-cnh1qxx8.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p> \u042f \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <a href=\"https:\/\/gist.github.com\/nin-jin\/6b9765fb9d0d50c2e1d37689008f5357\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u043f\u043e\u0437\u0430\u043b<\/a>, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0438 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430 \u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430: <\/p>\n<pre><code class=\"xml\">&lt;input id=\"input\" \/> &lt;p id=\"output\">&lt;\/p> &lt;script>  const input = document.getElementById('input') const output = document.getElementById('output')  Object.defineProperty( output, 'innerText', { get: ()=> 'Hello ' + input.value } )  &lt;\/script>  <\/code><\/pre>\n<p> \u0418 \u0432\u0441\u0451, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 DOM-\u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0448\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435. <\/p>\n<p> \u0410 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c ReactiveDOM \u0432 \u0434\u0435\u043b\u0435 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441? \u042f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u0430 <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/wire\/dom\" rel=\"noopener noreferrer nofollow\">$mol_wire_dom<\/a>. \u041e\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d, \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442, \u043d\u043e \u0434\u043b\u044f <a href=\"https:\/\/codesandbox.io\/s\/mol-wire-dom-qivdib?file=\/public\/index.ts\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/a> \u0441\u043e\u0439\u0434\u0451\u0442: <\/p>\n<pre><code class=\"xml\">&lt;div id=\"root\">  &lt;div id=\"form\"> &lt;input id=\"nickname\" value=\"Jin\" \/> &lt;button id=\"clear\">Clear&lt;\/button> &lt;label> &lt;input id=\"greet\" type=\"checkbox\" \/> Greet &lt;\/label> &lt;\/div>  &lt;p id=\"greeting\">...&lt;\/p>  &lt;\/div>  <\/code><\/pre>\n<pre><code class=\"typescript\">import { $mol_wire_dom, $mol_wire_patch } from \"mol_wire_dom\";  \/\/ Make DOM reactive $mol_wire_dom(document.body);  \/\/ Make globals reactive $mol_wire_patch(globalThis);  \/\/ Take references to elements const root = document.getElementById(\"root\") as HTMLDivElement; const form = document.getElementById(\"form\") as HTMLDivElement; const nickname = document.getElementById(\"nickname\") as HTMLInputElement; const greet = document.getElementById(\"greet\") as HTMLInputElement; const greeting = document.getElementById(\"greeting\") as HTMLParagraphElement; const clear = document.getElementById(\"clear\") as HTMLButtonElement;  \/\/ Setup invariants  Object.assign(root, {   childNodes: () => (greet.checked ? [form, greeting] : [form]),   style: () => ({     zoom: 1 \/ devicePixelRatio   }) });  Object.assign(greeting, {   textContent: () => `Hello ${nickname.value}!` });  \/\/ Set up handlers clear.onclick = () => (nickname.value = \"\");  <\/code><\/pre>\n<p> \u0422\u0443\u0442 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0435\u0449\u0451 \u0438 <code>$mol_wire_patch<\/code> \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u0443\u043c\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0435 \u0432 \u043f\u043e\u043b\u0435 \u0438\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0438\u0449\u0430\u0442\u044c\u0441\u044f. \u0410 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0438\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e, \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u0432\u0437\u0432\u0435\u0434\u0451\u043d. <\/p>\n<hr\/>\n<h2> \u041b\u0435\u043d\u0438\u0432\u044b\u0439 DOM <\/h2>\n<p> \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u043b\u0430\u0441\u0441\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0432\u0441\u0451 \u044d\u0442\u043e, \u0434\u0430 \u0431\u0435\u0437 \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u043e\u0432. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0410 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0431\u044b\u0442\u044c \u0438 \u0435\u0449\u0451 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u0435\u0439, \u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e. <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/fj\/vt\/iw\/fjvtiwjq-txjlaa_t_qm7ndjwio.jpeg\" alt=\"\" title=\"\" width=\"688\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/webt\/fj\/vt\/iw\/fjvtiwjq-txjlaa_t_qm7ndjwio.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p> \u0412\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043b\u044f\u043d\u044c\u0442\u0435, \u043a\u0430\u043a <a href=\"https:\/\/mol.hyoo.ru\/\" rel=\"noopener noreferrer nofollow\">\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/a>, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 $mol_wire, <a href=\"https:\/\/nin-jin.github.io\/js-framework-benchmark\/webdriver-ts-results\/table.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442<\/a> \u043a\u0430\u043a \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u0434\u0430\u0436\u0435 \u0438 VanillaJS: <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/643\/cac\/fa4\/643cacfa45242ccb2b4b1f87ed2cec4c.png\" alt=\"\" title=\"\" width=\"1280\" height=\"795\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/643\/cac\/fa4\/643cacfa45242ccb2b4b1f87ed2cec4c.png\"\/><\/figure>\n<p> \u0418 \u0434\u0435\u043b\u043e \u0442\u0443\u0442 \u043d\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 DOM, \u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 DOM, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0432\u043d\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0451\u0440\u0441\u0442\u043a\u0430, \u0430 \u043d\u0435 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a. <\/p>\n<p> \u0410 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043a\u0430\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0441\u044f \u0431\u044b web, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0431\u044b \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c &#8212; \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0443 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0440\u043e\u0432\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438. <\/p>\n<p> \u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043c\u0435\u043d\u044f \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0432\u0438\u043d\u044f\u044e\u0442 \u0432 \u043d\u0435\u0447\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0432\u0435\u0434\u044c \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c virtual-scroll \u0438 \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e. \u0418\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u0443\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043d\u0438\u0437\u043a\u043e\u043c\u0443 \u0443\u0440\u043e\u0432\u043d\u044e. \u042d\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0431\u043e\u0442\u043e\u043c\u0438\u044e \u041a\u0430\u0441\u043f\u0430\u0440\u043e\u0432\u0443 \u0434\u043b\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u043d\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0433\u0440\u0430\u0435\u0442 \u0432 \u0448\u0430\u0445\u043c\u0430\u0442\u044b. <\/p>\n<p> \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c <a href=\"https:\/\/t.me\/h_y_o_o\/11\/288\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437\u043d\u0438\u0446\u0443<\/a> \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u043c \u0434\u043e\u043b\u0433\u043e\u0439 \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u0430 \u0435\u0449\u0451 \u0438 \u0441 \u043a\u0443\u0447\u0435\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439: <\/p>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a93\/25e\/152\/a9325e152e0d00bc8c3f6a6f16bf5462.png\" alt=\"\" title=\"\" width=\"644\" height=\"662\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a93\/25e\/152\/a9325e152e0d00bc8c3f6a6f16bf5462.png\"\/><\/figure>\n<p> \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 $mol. <\/p>\n<p> \u0413\u0440\u0430\u043c\u043e\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 &#8212; \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u042f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0434\u043e\u043a\u043b\u0430\u0434\u0435: <\/p>\n<blockquote>\n<p> <a href=\"https:\/\/page.hyoo.ru\/#!=gjboo1_xhyrnq\" rel=\"noopener noreferrer nofollow\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0432\u0451\u0440\u0441\u0442\u043a\u0438<\/a> <\/p>\n<\/blockquote>\n<p> \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0442\u043e\u043b\u044c\u043a\u043e LazyDOM \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043d\u0430\u0441 \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0432\u043e \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u0431\u044a\u0451\u043c\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043e \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043d\u0438\u0436\u0430\u044e\u0449\u0435\u043c\u0441\u044f \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041f\u043e\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b. <\/p>\n<p> \u041d\u043e, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0439 \u043e\u043f\u044b\u0442, \u043f\u0440\u043e\u043f\u043e\u0437\u0430\u043b\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e &#8212; \u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442. \u041d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u0438\u043a\u0443 \u043e\u0431\u0435\u0449\u0430\u043d\u0438\u0439: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0432\u0442\u044f\u043d\u0443\u043b\u0438 \u0438\u0445 \u0432 \u0441\u0435\u0431\u044f \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u043e\u0432\u0430\u043b\u0438. <\/p>\n<p> \u0412\u043e\u0442 \u0438 \u0442\u0443\u0442 \u043d\u0430\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043d\u0443\u0436\u043d\u043e \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043b\u0435\u044f, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f\u0441\u044c \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0430 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0442 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u043c\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430\u043c\u0438. <\/p>\n<p> \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438\u043b\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0438 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u044c \u0432\u0430\u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 API, \u0442\u043e \u0441\u0432\u044f\u0436\u0438\u0442\u0435\u0441\u044c \u0441\u043e <a href=\"https:\/\/t.me\/nin_jin\" rel=\"noopener noreferrer nofollow\">\u043c\u043d\u043e\u0439<\/a>, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438 \u0434\u0435\u0442\u0430\u043b\u0438. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043a\u0430\u043a \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043f\u0443\u0442\u0451\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0438 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u0442\u0430\u043a \u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 $mol_wire, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0430\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430\u043c\u0438. <\/p>\n<hr\/>\n<h2> \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 $mol_wire <\/h2>\n<p> \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c, \u043a\u0430\u043a \u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 $mol, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0432\u0441\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0442\u0438\u0437\u0435\u0440\u0438\u043b.. <\/p>\n<p> \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (<code>$mol_fetch<\/code>). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 GitHub \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (<code>$mol_github<\/code>). \u0422\u0430\u043a \u0436\u0435 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 (<code>$mol_button<\/code>), \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 (<code>$mol_link<\/code>), \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 (<code>$mol_string<\/code>) \u0438 \u0447\u0438\u0441\u043b\u0430 (<code>$mol_number<\/code>), \u0437\u0430\u0432\u0435\u0440\u043d\u0451\u043c \u0432\u0441\u0451 \u0432 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a (<code>$mol_list<\/code>) \u0438 \u0432\u0443\u0430\u043b\u044f: <\/p>\n<pre><code class=\"ruby\">$my_counter $mol_list Issue $mol_github_issue title => title web_uri => link json? => data? sub \/ &lt;= Numb $mol_number value? &lt;=> numb? 48 &lt;= Title $mol_link title &lt;= title uri &lt;= link &lt;= Reload $mol_button_minor title @ \\Reload click? &lt;=> reload?  <\/code><\/pre>\n<pre><code class=\"typescript\">export class $my_counter extends $.$my_counter {  Issue() { const endpoint = `https:\/\/api.github.com\/repos` const uri = `${ endpoint }\/nin-jin\/HabHub\/issues\/${ this.numb() }` return this.$.$mol_github_issue.item( uri ) }  reload() { this.data( null ) }  }  <\/code><\/pre>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b98\/305\/9c0\/b983059c05144d041587c54b7591d555.png\" alt=\"\" title=\"\" width=\"606\" height=\"206\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b98\/305\/9c0\/b983059c05144d041587c54b7591d555.png\"\/><\/figure>\n<p> \u041f\u0440\u0438 \u0434\u0430\u0436\u0435 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u0442\u0435\u043c, \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440), \u043a\u043e\u0434\u0430 \u043d\u0430 $mol \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 2 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0441 JSX. \u0410 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0430\u0441\u044c \u043a\u043e\u0433\u043d\u0438\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 <a href=\"https:\/\/page.hyoo.ru\/#!=9qbt9v_ccmdy9\" rel=\"noopener noreferrer nofollow\">\u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f<\/a>.. <\/p>\n<p> \u041f\u043e\u043a\u0430 \u0436\u0435, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0430\u0441 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c $mol_wire \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 <a href=\"https:\/\/t.me\/h_y_o_o\/2\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u043c\u0435 \u043f\u0440\u043e $mol<\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 Hyper Dev. <\/p>\n<hr\/>\n<p> <a href=\"https:\/\/page.hyoo.ru\/#!=auvsud_2dut1z\" rel=\"noopener noreferrer nofollow\">\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043d\u0430 $hyoo_page<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/723728\/\"> https:\/\/habr.com\/ru\/post\/723728\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p> \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u041a\u0430\u0440\u043b\u043e\u0432\u0441\u043a\u0438\u0439, \u0438 \u044f.. \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0447\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/wire\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 $mol_wire<\/a>. \u0418\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043d\u0435 \u0432\u0430\u043c \u0435\u0441\u0442\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0447\u0435\u043c \u043f\u0443\u0433\u0430\u0442\u044c \u0434\u0435\u0442\u0435\u0439 \u043f\u0435\u0440\u0435\u0434 \u0441\u043d\u043e\u043c. <\/p>\n<p> \u041d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 &#8212; \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0435\u043b\u043a\u0430\u044f \u0446\u0435\u043b\u044c. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0439 <a href=\"https:\/\/mol.hyoo.ru\/\" rel=\"noopener noreferrer nofollow\">\u0431\u043e\u0433\u0430\u0442\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/a> \u0441 \u043a\u0443\u0447\u0435\u0439 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a &#8212; \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439, \u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043c\u0431\u0438\u0446\u0438\u043e\u0437\u043d\u043e. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lingua_franca\" rel=\"noopener noreferrer nofollow\">lingua franca<\/a> \u0432 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u043c\u0435\u0436\u0434\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u0434\u0430\u0436\u0435 \u043c\u0435\u0436\u0434\u0443 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438. <\/p>\n<p> \u0411\u0435\u0440\u0435\u0433\u0438\u0442\u0435 \u0441\u0438\u043d\u0430\u043f\u0441\u044b, \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043a\u0438\u0431\u0435\u0440\u043f\u0430\u043d\u043a.. <\/p>\n<\/p>\n<figure class=\"full-width\"><\/figure>\n<hr\/>\n<h2> \u0420\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 React <\/h2>\n<p> ReactJS \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0432\u043e\u043f\u0440\u0435\u043a\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0447\u0451\u0442\u043e\u0432. \u0412\u043e\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445: <\/p>\n<ul>\n<li>\n<p> \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442, &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a\/\u043e\u0442\u043f\u0438\u0441\u043e\u043a \u0438 \u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445. <\/p>\n<\/li>\n<li>\n<p> \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f <em>\u0441\u043e\u0441\u0435\u0434\u0435\u0439<\/em>. \u0422\u043e \u0436\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f\/\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<\/li>\n<li>\n<p> \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0440\u0430\u0437\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u043c\u0435\u0441\u0442\u043d\u043e \u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b.  <\/p>\n<\/li>\n<li>\n<p> \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430 \u043b\u0435\u0442\u0443 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043b\u0438\u0448\u043d\u0438\u043c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0439 \u0438\u0445 \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. <\/p>\n<\/li>\n<li>\n<p> \u0425\u0443\u043a\u0438 <a href=\"https:\/\/reactjs.org\/docs\/hooks-rules.html\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043b\u044c\u0437\u044f<\/a> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0446\u0438\u043a\u043b\u0430\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f. <\/p>\n<\/li>\n<li>\n<p> \u041e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0438 \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u043c \u0438 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043d\u0430 \u0441\u043e\u0441\u0435\u0434\u0435\u0439. <\/p>\n<\/li>\n<li>\n<p> \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c \u043b\u0438\u0431\u043e \u043e\u0431\u043c\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043b\u0438\u0431\u043e \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. <\/p>\n<\/li>\n<li>\n<p> \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f stateful \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430 \u0434\u0432\u0430: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 stateless \u0438 \u043d\u0435\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u0430\u044f stateful \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0438\u043c. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u043f\u0440\u044f\u0436\u0451\u043d \u0441 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u043e\u0439. <\/p>\n<\/li>\n<\/ul>\n<p> \u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u043b\u0435\u0447\u0438\u043c \u0431\u043e\u043b\u044c\u043d\u043e\u0433\u043e, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/hyoo-ru\/mam_mol\/tree\/master\/wire\" rel=\"noopener noreferrer nofollow\">$mol_wire<\/a> \u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u043d\u043e\u0440\u043e\u0434\u043d\u0443\u044e \u0435\u043c\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. <\/p>\n<\/p>\n<figure class=\"full-width\"><\/figure>\n<p> \u041d\u0430\u0447\u043d\u0451\u043c \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430 &#8212; \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 JSON \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e: <\/p>\n<pre><code class=\"typescript\">export const getJSON = sync( async function getJSON( uri: string ){ const resp = await fetch(uri) if( Math.floor( resp.status \/ 100 ) === 2 ) return resp.json() throw new Error( `${resp.status} ${resp.statusText}` ) } )  <\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c API \u0434\u043b\u044f GitHub, \u0441 debounce \u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 issue \u043f\u043e \u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0443: <\/p>\n<pre><code class=\"typescript\">export class GitHub extends Object {  \/\/ cache @mems static issue( value: number, reload?: \"reload\" ) {  sleep(500) \/\/ debounce  const uri = `https:\/\/api.github.com\/repos\/nin-jin\/HabHub\/issues\/${value}` return getJSON( uri ) as { title: string html_url: string }  }    }  <\/code><\/pre>\n<p> \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b \u0440\u0430\u0437 \u043c\u044b \u043d\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u0435\u0448\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u0435\u0448\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u0430 \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432 \u043f\u043e\u043b \u0441\u0435\u043a\u0443\u043d\u0434\u044b. <\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u0412\u043e\u043f\u0440\u0435\u043a\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0442\u0440\u0435\u043d\u0434\u0443, \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u044f\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0445\u0443\u043a\u0430\u043c\u0438, \u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0443, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: <\/p>\n<pre><code class=\"typescript\">export abstract class Component&lt; Props = { id: string }, State = {}, SnapShot = any > extends React.Component&lt; Partial&lt;Props> &amp; { id: string }, State, SnapShot > {  \/\/ every component should have guid id!: string;  \/\/ show id in debugger [Symbol.toStringTag] = this.props.id  \/\/ override fields by props to configure constructor(props: Props &amp; { id: string }) { super(props) Object.assign(this, props) }  \/\/ composes inner components as vdom abstract compose(): any  \/\/ memoized render which notify react on recalc @mem render() { log(\"render\", \"#\" + this.id) Promise.resolve().then(() => this.forceUpdate()) return this.compose() }  }  <\/code><\/pre>\n<p> \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u044b\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c &#8212; \u043b\u044e\u0431\u043e\u0435 \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043f\u0441\u044b. \u0412\u0441\u0435 \u043f\u0440\u043e\u043f\u0441\u044b \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b, \u043a\u0440\u043e\u043c\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u043d\u044b\u043c. <\/p>\n<p> \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u0441\u044b \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 &#8212; \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 \u0438 \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u043e\u0432. \u0418\u0434\u0435\u044f \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e (\u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0441\u043e\u0432) \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 (\u043f\u0443\u0442\u0451\u043c \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043b\u0431\u044d\u043a\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u043f\u0441\u0430\u0445).   <\/p>\n<p> \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 &#8212; \u043a\u043e\u0433\u0434\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>render<\/code>. ReactJS \u0441\u043b\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e. \u0422\u0443\u0442 \u0436\u0435, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u044b. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442 \u0435\u0433\u043e \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u043e\u043d\u0446\u0438\u043b\u0438\u0430\u0446\u0438\u0438, \u0442\u043e\u0433\u0434\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u044b\u0437\u043e\u0432\u0435\u0442 <code>render<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0441\u0432\u0435\u0436\u0438\u0439 VDOM. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c VDOM \u0438\u0437 \u043a\u0435\u0448\u0430 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. <\/p>\n<p> \u0422\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0445\u0443\u043a\u0438, \u043d\u043e \u0441 $mol_wire, \u0445\u0443\u043a\u0438 &#8212; \u043a\u0430\u043a \u0441\u043e\u0431\u0430\u043a\u0435 \u043f\u044f\u0442\u0430\u044f \u043d\u043e\u0433\u0430. <\/p>\n<p> \u041f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputString extends Component&lt;InputString> {  \/\/ statefull! @mem value( next = \"\" ) { return next; }  change( event: ChangeEvent&lt;HTMLInputElement> ) { this.value( event.target.value ) this.forceUpdate() \/\/ prevent caret jumping }  compose() { return ( &lt;input id={ this.id } className=\"inputString\" value={ this.value() } onInput={ action(this).change } \/> ) }  }  <\/code><\/pre>\n<p> \u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u0438 \u044d\u043a\u0448\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u043a\u0448\u0435\u043d\u0430 \u043c\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c ReactJS \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u043a\u0430\u0440\u0435\u0442\u043a\u0430 \u0443\u043b\u0435\u0442\u0438\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0443 \u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u044d\u043a\u0448\u0435\u043d\u0430 \u0432 VDOM \u043c\u044b \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0435\u0433\u043e \u0432 \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439. <\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430: <\/p>\n<pre><code class=\"typescript\">export class InputNumber extends Component&lt;InputNumber> {  \/\/ self state @mem numb( next = 0 ) { return next; }  dec() { this.numb(this.numb() - 1); }  inc() { this.numb(this.numb() + 1); }  \/\/ lifted string state as delegate to number state! @mem str( str?: string ) {  const next = str?.valueOf &amp;&amp; Number(str) if( Object.is( next, NaN ) ) return str ?? \"\"  const res = this.numb( next ) if( next === res ) return str ?? String( res ?? \"\" )  return String( res ?? \"\" ) }  compose() { return ( &lt;div id={this.id} className=\"inputNumber\" >  &lt;Button id={ `${this.id}-decrease` } action={ ()=> this.dec() } title={ ()=> \"\u2796\" } \/>  &lt;InputString id={ `${this.id}-input` } value={ next => this.str( next ) } \/\/ hack to lift state up \/>  &lt;Button id={ `${this.id}-increase` } action={ ()=> this.inc() } title={ ()=> \"\u2795\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0443 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>value<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435 \u0443 \u0441\u0435\u0431\u044f, \u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 <code>str<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u043e\u043c \u0443\u0436\u0435 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>numb<\/code>. \u041b\u043e\u0433\u0438\u043a\u0430 \u0435\u0433\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u0430\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u043c\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0432\u043e\u0434 \u0438\u0437-\u0437\u0430 \u0437\u0430\u043c\u0435\u043d\u044b \u0435\u0433\u043e \u043d\u0430 *\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435* \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. <\/p>\n<p> \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 VDOM \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043d\u0438 \u043e\u0442 \u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0435, \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041d\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 <code>numb<\/code> \u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 <code>str<\/code>. <\/p>\n<p> \u0422\u0430\u043a \u0436\u0435 \u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <code>Button<\/code> \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435. \u041d\u043e \u043e \u043a\u043d\u043e\u043f\u043a\u0430\u0445 \u043f\u043e\u0437\u0436\u0435, \u0430 \u043f\u043e\u043a\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u0448\u0438\u043c\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 <code>Counter<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u043d\u043e \u0438 \u0433\u0440\u0443\u0437\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: <\/p>\n<pre><code class=\"typescript\">export class Counter extends Component&lt;Counter> {  @mem numb( value = 48 ) { return value }  issue( reload?: \"reload\" ) { return GitHub.issue( this.numb(), reload ) }  title() { return this.issue().title; }  link() { return this.issue().html_url; }  compose() { return ( &lt;div id={ this.id } className=\"counter\" >  &lt;InputNumber id={ `${this.id}-numb` } numb={ next => this.numb( next ) } \/\/ hack to lift state up \/>  &lt;Safe id={ `${this.id}-output-safe` } task={ () => (  &lt;a id={ `${this.id}-link` } className=\"counter-link\" href={ this.link() } > { this.title() } &lt;\/a>  ) } \/>  &lt;Button id={ `${this.id}-reload` } action={ () => this.issue(\"reload\") } title={ () => \"Reload\" } \/>  &lt;\/div> ) }  }  <\/code><\/pre>\n<p> \u041a\u0430\u043a \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043c\u044b \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u0435\u0449\u0451 \u0432\u044b\u0448\u0435 &#8212; \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u043e\u043c <em>issue<\/em>. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043d\u043e\u043c\u0435\u0440\u0443 \u043c\u044b \u0447\u0435\u0440\u0435\u0437 GitHub API \u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0440\u044f\u0434\u043e\u043c, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0432 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Safe<\/code>, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c \u0435\u043c\u0443 \u043a\u043e\u0434\u0435: \u043f\u0440\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440, \u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 &#8212; \u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u043e\u0431\u044b\u0447\u043d\u044b\u043c <code>try-catch<\/code>: <\/p>\n<pre><code class=\"typescript\">export abstract class Safe extends Component&lt;Safe> {  task() {}  compose() {  try { return this.task() } catch( error ) {  if( error instanceof Promise ) return ( &lt;span id={ `${this.id}-wait` } className=\"safe-wait\" > ? &lt;\/span> )  if( error instanceof Error ) return ( &lt;span id={ `${this.id}-error` } className=\"safe-error\" > {error.message} &lt;\/span> )  throw error }  } }  <\/code><\/pre>\n<p> \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u0430 <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-347020","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=347020"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347020\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}