{"id":305661,"date":"2020-06-20T15:00:34","date_gmt":"2020-06-20T15:00:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305661"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305661","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 state manager \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/507502\/\">\n<p><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/statirjs\/page\/master\/assets\/statirjs_text.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h1 id=\"annotaciya\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412 \u0444\u0440\u043e\u043d\u0442\u044d\u0435\u043d\u0434\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e\u0442 (\u0438\u043b\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 <strong>state manger<\/strong> \u2014 <a href=\"https:\/\/statirjs.github.io\/page\/#\/\"><strong>statirjs<\/strong><\/a>. \u0418\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u0438: <a href=\"https:\/\/github.com\/rematch\/rematch\"><strong>rematch<\/strong><\/a>, <a href=\"https:\/\/github.com\/reduxjs\/redux\"><strong>redux<\/strong><\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"cel-stati\">\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/h1>\n<p>  <\/p>\n<p>\u0414\u0430\u0442\u044c \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443 <strong>statirjs<\/strong>. \u0411\u0435\u0437 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043b\u0438\u0448\u043d\u0435\u0439 \u0442\u0435\u043e\u0440\u0438\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"oblast-primeneniya\">\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f <strong>statirjs<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <strong>\u043c\u0430\u043b\u044b\u0435\/\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f: \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<h1 id=\"prichiny-sozdaniya\">\u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<ol>\n<li>\u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <strong>redux<\/strong> \u043a\u0430\u043a <strong>rematch<\/strong>;<\/li>\n<li>\u043f\u0435\u0440\u0435\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0432 <strong>redux<\/strong> \u2014 <a href=\"https:\/\/hackernoon.com\/redesigning-redux-b2baee8b8a38\"><strong>\u0441\u0442\u0430\u0442\u044c\u044f<\/strong><\/a>;<\/li>\n<li>\u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435 \u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439;<\/li>\n<li>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0435\u0451 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f;<\/li>\n<li>\u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435 \u043a \u043c\u0430\u043b\u043e\u043c\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u0443;<\/li>\n<\/ol>\n<p>  <\/p>\n<h1 id=\"osnovnye-plyusy-statirjs\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043b\u044e\u0441\u044b statirjs<\/h1>\n<p>  <\/p>\n<h4 id=\"1-on-malo-vesit\">1. \u043e\u043d \u043c\u0430\u043b\u043e \u0432\u0435\u0441\u0438\u0442<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u044f\u0434\u0440\u043e ~2.2 KB<\/li>\n<li>\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u043a <a href=\"https:\/\/github.com\/facebook\/react\/\"><strong>react<\/strong><\/a> ~0.7 KB<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"2-ispolzuet-komponentnyy-podhod\">2. \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u0432\u0435\u0441\u044c <strong>store<\/strong> \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u2014 <strong>forme<\/strong> (\u0447\u0438\u0442\u0430\u0439 &quot;\u0444\u043e\u0440\u043c\u0430&quot;)<\/li>\n<li>\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 <strong>forme<\/strong> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"3-udobno-i-legko-rasshiryaetsya\">3. \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li><strong>middlewares<\/strong> \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a \u0443 <strong>redux<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0449\u0435<\/li>\n<li><strong>upgrades<\/strong> \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a <strong>middlewares<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0430\u043c <strong>store<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"4-pochti-ne-trebuet-pisat-boylerpleytov\">4. \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u0439\u043b\u0435\u0440\u043f\u043b\u0435\u0439\u0442\u043e\u0432<\/h4>\n<p>  <\/p>\n<h4 id=\"5-redux-devtool-iz-korobki\">5. redux-devtool \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/h4>\n<p>  <\/p>\n<h4 id=\"6-rabotaet-s-react-cherez-huki\">6. \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 react \u0447\u0435\u0440\u0435\u0437 \u0445\u0443\u043a\u0438<\/h4>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043b\u044e\u0441\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u043e\u0440\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u0438\u0437 <strong>redux<\/strong>. \u0442\u0430\u043a\u0436\u0435 <strong>statirjs<\/strong> \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 <a href=\"https:\/\/www.typescriptlang.org\/\"><strong>typescript<\/strong><\/a> \u0438 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0438\u043f\u044b \u043a\u0430\u043a \u0434\u043b\u044f <strong>forme<\/strong> \u0442\u0430\u043a \u0438 \u0434\u043b\u044f <strong>store<\/strong>.<\/p><\/blockquote>\n<p>  <\/p>\n<h1 id=\"na-praktike\">\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h1>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0446\u0435\u043d\u0438\u0442\u044c <strong>statirjs<\/strong> \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { createForme, initStore } from &quot;@statirjs\/core&quot;;  const counter = createForme(   {     count: 0,   },   () =&gt; ({     actions: {       increment: (state) =&gt; ({ count: state.count + 1 }),     },   }) );  const store = initStore({   formes: {     counter,   }, });<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"chto-zdes-proishodit\">\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442?<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u0432 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 <strong>createForme<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f;<\/li>\n<li>\u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>createForme<\/strong> (\u0444\u0443\u043d\u043a\u0446\u0438\u044f) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 <strong>actions<\/strong>;<\/li>\n<li>\u0432 <strong>actions<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>increment<\/strong>;<\/li>\n<li><strong>increment<\/strong> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <strong>forme<\/strong> <strong>counter<\/strong> \u0434\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 <strong>counter<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 <strong>initStore<\/strong> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u0430;<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u0432\u043b\u044f\u044e\u0449\u0438\u0435 <strong>forme<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const initState = {   count: 0, };  const actions = {   increment: (state) =&gt; ({ count: state.count + 1 }), };  const builder = () =&gt; ({ actions });  const counter = createForme(initState, builder);  const store = initStore({   formes: {     counter,   }, });<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21161: <strong>statirjs<\/strong> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u0435, \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/em><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421 <strong>statirjs<\/strong> \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const counter = createForme(   {     count: 0,   },   () =&gt; ({     actions: {       increment: (state) =&gt; ({ count: state.count + 1 }), +     decrement: (state) =&gt; ({ count: state.count - 1 }),     },   }) );<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u043d\u0430 <strong>typescript<\/strong>, \u0442\u043e \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0430\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u043e\u0432.<\/p><\/blockquote>\n<p><strong>Payload<\/strong> \u0432 <strong>action<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const summer = createForme(   {     sum: 0,   },   () =&gt; ({     actions: {       add: (state, payload) =&gt; ({ count: state.sum + payload }),     },   }) );  const store = initStore({   formes: {     counter,     summer,   }, });<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"legko-li-ispolzovat-counter\">\u041b\u0435\u0433\u043a\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c counter?<\/h1>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0434\u0430. \u0412 <strong>forme<\/strong> \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 <strong>actions<\/strong> \u0438 \u0432 \u043d\u0451\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <strong>dispatch<\/strong> \u0438\u043c\u044f <strong>forme<\/strong> \u0438 <strong>action<\/strong>&#8216;\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">store.dispatch.counter.increment();  store.dispatch.summer.add(100);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">store.state = {   counter: {     count: 1,   },   summer: {     sum: 100,   }, };<\/code><\/pre>\n<p>  <\/p>\n<p>M\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <strong>increment<\/strong> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0412\u043d\u0443\u0442\u0440\u0438 <strong>statirjs<\/strong> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f\u0445, \u0430 \u043d\u0435 \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const increment = store.dispatch.counter.increment;  increment();<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <strong>react<\/strong> \u0434\u043e\u0441\u0442\u0443\u043f \u043a <strong>dispatch<\/strong>&#8216;\u0443 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0445\u0443\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { useDispatch } from &quot;@statirjs\/react&quot;;  const increment = useDispatch((dispatch) =&gt; dispatch.counter.increment);<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21162: \u044d\u043a\u0448\u0435\u043d\u044b \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043a \u0443 <strong>redux<\/strong><\/em><\/p>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21163: <strong>statirjs<\/strong> \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0448\u0435\u043d\u0430\u043c\u0438 \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438<\/em><\/p>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21164: <strong>statirjs<\/strong> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0445\u0443\u043a\u0438<\/em><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h1 id=\"kak-pisat-deystviya-s-vneshnimi-effektami\">\u041a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u043c\u0438?<\/h1>\n<p>  <\/p>\n<p>\u0417\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 <strong>pipes<\/strong>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u0430\u043a <strong>actions<\/strong>, \u043d\u043e \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0441\u043b\u043e\u0436\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const asyncCounter = createForme(   {     count: 0,   },   () =&gt; ({     pipes: {       asyncIncrement: {         push: async (state) =&gt; ({ count: state.count + 1 }),       },     },   }) );  const store = initStore({   formes: {     asyncCounter,   }, });  store.dispatch.asyncCounter.asyncIncrement();<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"chto-zdes-proishodit-1\">\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442?<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u0432 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 <strong>createForme<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f;<\/li>\n<li>\u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>createForme<\/strong> (\u0444\u0443\u043d\u043a\u0446\u0438\u044f) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 <strong>pipes<\/strong>;<\/li>\n<li>\u0432 <strong>pipes<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043e\u0431\u044a\u0435\u043a\u0442 <strong>asyncIncrement<\/strong>;<\/li>\n<li><strong>asyncIncrement<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>push<\/strong> \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 asyncCounter \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 <strong>initStore<\/strong> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u0430;<\/li>\n<li><strong>asyncIncrement<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 dispatch \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430;<\/li>\n<\/ol>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21165: \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e async\/await<\/em><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p>\u041b\u044e\u0431\u0430\u044f <strong>pipe<\/strong> \u043a\u0430\u043a \u0438 <strong>action<\/strong> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const increment = store.dispatch.asyncCounter.asyncIncrement;  await increment();<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"v-chyom-slozhnost-i-otlichie-ot-actions\">\u0412 \u0447\u0451\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 actions?<\/h1>\n<p>  <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445 <strong>actions<\/strong> \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, <strong>pipes<\/strong> \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043a\u0430\u0436\u0434\u0430\u044f <strong>pipe<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u0448\u0430\u0433\u0438 <strong>push<\/strong>, <strong>core<\/strong>, <strong>done<\/strong>, <strong>fail<\/strong> \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u0433\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0430\u043f\u043e\u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const asyncCounter = createForme(   {     count: 0,     isLoading: false,   },   () =&gt; ({     pipes: {       asyncIncrement: {         push(state) {           return { ...state, isLoading: true };         },         async core(state) {           await someDelay();           return state.count + 1;         },         done(state, payload, data) {           return {             count: data,             isLoading: false,           };         },         fail(state) {           return { ...state, isLoading: false },         },       },     },   }) );<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: <strong>push<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c (\u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f), <strong>core<\/strong> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b <strong>pipe<\/strong>&#8216;\u044b, <strong>done<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, <strong>fail<\/strong> \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435. \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f try catch \u0432\u043d\u0443\u0442\u0440\u0438 <strong>pipe<\/strong>.<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21166: <strong>pipe<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u0448\u0430\u0433\u0438<\/em><\/p>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21167: <strong>pipe<\/strong> \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043b\u043e\u0432\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438<\/em><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h4 id=\"vzaimodeystvie-formes\">\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 formes<\/h4>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0438\u0437 <strong>forme<\/strong> \u0434\u0440\u0443\u0433\u0443\u044e <strong>forme<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <strong>dispatch<\/strong> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 <strong>createForme<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const asyncCounter = createForme(   {}, +  (dispatch) =&gt; ({     pipes: {       asyncIncrement: {         push() {           dispatch.counter.increment();         }       },     },   }) ); <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0437\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 <strong>formes<\/strong>, \u0432\u044b\u0434\u0435\u043b\u044f\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 <strong>forme<\/strong>.<\/p><\/blockquote>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><em>\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u21168: \u0432\u0441\u0435 <strong>formes<\/strong> \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <strong>dispatch<\/strong> \u043e\u0431\u044a\u0435\u043a\u0442<\/em><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h4 id=\"kak-otslezhivat-izmeneniya\">\u041a\u0430\u043a \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f?<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <strong>react<\/strong>, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/statirjs.github.io\/page\/#\/content\/react\/home\"><strong>@statirjs\/react<\/strong><\/a> <strong>hooks<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { useSelect } from &quot;@statirjs\/react&quot;;  const count = useSelect((rootState) =&gt; rootState.counter.count);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/statirjs.github.io\/page\/#\/content\/core\/home\"><strong>@statirjs\/core<\/strong><\/a>, \u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <strong>action<\/strong>, <strong>pipe:push<\/strong>, <strong>pipe:done<\/strong> \u0438 <strong>pipe:fail<\/strong>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">store.subscribe(console.log);<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"plyusy\">\u041f\u043b\u044e\u0441\u044b<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c c\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043b\u044e\u0441\u044b \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <strong>statirjs<\/strong>:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u043c\u0430\u043b\u044b\u0439 \u0432\u0435\u0441;<\/li>\n<li><strong>actions<\/strong> \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434;<\/li>\n<li>\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043a \u0443 <strong>redux<\/strong>;<\/li>\n<li>\u0447\u0430\u0441\u0442\u0438 <strong>frome<\/strong> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c;<\/li>\n<li><strong>statirjs<\/strong> \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0448\u0435\u043d\u0430\u043c\u0438 \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438;<\/li>\n<li><strong>redux-devtool<\/strong> \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438;<\/li>\n<li><strong>statirjs<\/strong> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0445\u0443\u043a\u0438;<\/li>\n<li>\u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e async\/await;<\/li>\n<li><strong>pipe<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u0448\u0430\u0433\u0438;<\/li>\n<li><strong>pipe<\/strong> \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043b\u043e\u0432\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438;<\/li>\n<li>\u0432\u0441\u0435 <strong>formes<\/strong> \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <strong>dispatch<\/strong>;<\/li>\n<\/ol>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 <strong>statirjs<\/strong> \u044f \u0432\u0438\u0434\u0435\u043b \u0435\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 &quot;killer feature&quot;, \u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b <strong>rematch<\/strong>. \u0423\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0430\u043a\u0435\u0442\u044b <strong>core<\/strong>, <strong>react<\/strong>, <strong>persist<\/strong> \u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c <a href=\"https:\/\/vuejs.org\/\"><strong>vue<\/strong><\/a> \u0438 <a href=\"https:\/\/angular.io\/\"><strong>angular<\/strong><\/a>. <strong>Statirjs<\/strong> \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u0435), \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u0438\u0442\u044c \u0432 open source.<\/p>\n<p>  <\/p>\n<p><strong><a href=\"https:\/\/statirjs.github.io\/page\">\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439<\/a><\/strong><\/p>\n<\/div>\n<p> \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\/507502\/\"> https:\/\/habr.com\/ru\/post\/507502\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/507502\/\">\n<p><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/statirjs\/page\/master\/assets\/statirjs_text.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h1 id=\"annotaciya\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412 \u0444\u0440\u043e\u043d\u0442\u044d\u0435\u043d\u0434\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e\u0442 (\u0438\u043b\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 <strong>state manger<\/strong> \u2014 <a href=\"https:\/\/statirjs.github.io\/page\/#\/\"><strong>statirjs<\/strong><\/a>. \u0418\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u0438: <a href=\"https:\/\/github.com\/rematch\/rematch\"><strong>rematch<\/strong><\/a>, <a href=\"https:\/\/github.com\/reduxjs\/redux\"><strong>redux<\/strong><\/a>.<\/p>\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-305661","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305661","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=305661"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305661\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}