{"id":297326,"date":"2020-01-19T03:00:07","date_gmt":"2020-01-19T03:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297326"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-01-19T03:00:07","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297326","title":{"rendered":"\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u0434\u043b\u044f React \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/484514\/\">\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u0432 \u0447\u0435\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0435\u0431\u0435. \u0414\u0430\u0436\u0435, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 API \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c (\u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 4-\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 React \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 githab.com \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>  \u0417\u0430 \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u044f \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u0430\u0445 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0436\u0435\u0441\u0442\u043a\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0438\u0437 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439, \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439, \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0438 \u0442.\u043f.). \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0435, \u043c\u043d\u043e\u0433\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u043e \u0442\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u043e, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u0430 \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0433\u0438\u0431\u043a\u0438\u043c\u0438 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u0430\u0445 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043c\u0435\u043d\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c (\u0434\u043e 4-\u0439) \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 React.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u0435\u043b \u0441 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 universal-router, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 React.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0410 \u043d\u0443\u0436\u0435\u043d \u043b\u0438 \u0440\u043e\u0443\u0442\u0438\u043d\u0433?<\/h3>\n<p>  \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043d\u0435\u0442 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0431\u044b \u043f\u043e\u0447\u0442\u0438 \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0442\u0435\u043c \u0436\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432 \u043b\u044e\u0431\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 F5 \u0438\u043b\u0438 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u00abReload\u00bb \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0418\u043b\u0438 \u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0432\u043f\u0435\u0440\u0435\u0434 \u0438\u043b\u0438 \u043d\u0430\u0437\u0430\u0434 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u00ab\u0421\u0442\u0440\u0435\u043b\u043a\u0430 \u0432\u043b\u0435\u0432\u043e\u00bb \u0438 \u00ab\u0421\u0442\u0440\u0435\u043b\u043a\u0430 \u0432\u043f\u0440\u0430\u0432\u043e\u00bb, \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u00abBackspace\u00bb.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043c\u0435\u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c url.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u0442\u0430\u043a\u043e\u0439?<\/h3>\n<p>  \u041d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u0445 \u0434\u043b\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0432\u043b\u0438\u044f\u0435\u0442 \u0435\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u043e\u043c \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 (\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c).<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, url \u0431\u044b\u043b \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0432 \u0441\u0435\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u0435\u0431-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0438 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b MVC \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0432\u0435\u0431\u0443: Model 1 \u0438 Model 2. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0438\u0437 \u043d\u0438\u0445 \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0444\u0440\u043e\u043d\u0442-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0431\u044b\u043b \u0435\u0449\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438: \u0440\u043e\u0443\u0442\u0438\u043d\u0433 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440) \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 \u0432\u044c\u044e. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440) \u0438, \u043e\u043f\u043e\u0441\u0440\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e (\u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0435\u043d\u0435\u0434\u0440\u0435\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c, \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0443\u0442\u044f\u0436\u0435\u043b\u0435\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h3>\u0427\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 universal-router?<\/h3>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 universal-router \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u043b\u0438\u0448\u043d\u0435\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0443 \u0447\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0441 \u043b\u044e\u0431\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e, \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445\/\u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445). <\/p>\n<p>  \u041e\u0442\u0431\u0440\u043e\u0441\u0438\u0432 \u0432\u0441\u0435 \u043d\u0430\u043f\u043b\u0430\u0441\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d, universal-router \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 \u0447\u0435\u0442\u043a\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u044e \u0441\u0442\u0440\u043e\u043a\u0438 \u0430 \u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 history, location \u0438 \u0442.\u043f.) \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u0438\u0434\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 url. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 React:<\/p>\n<pre><code class=\"javascript\">import React from 'react'; import UniversalRouter from 'universal-router'; import App from '.\/App'; import Link from '.\/Link';  const routes =     {         path: '\/',         async action({next}) {             const children = await next();             return (                 &lt;App&gt;                     {children}                 &lt;\/App&gt;             );         },         children: [             {                 path: '',                 async action() {                     return (                         &lt;div&gt;Root route go to &lt;Link href='\/test'&gt;Test&lt;\/Link&gt;&lt;\/div&gt;                     );                 },             },             {                 path: '\/test',                 async action({next}) {                     const children = await next();                     return (                         &lt;App&gt;                             {children}                         &lt;\/App&gt;                     );                 },                 children: [                     {                         path: '',                         async action() {                             return (                                 &lt;div&gt;Test route return to &lt;Link href='\/'&gt;Root&lt;\/Link&gt;&lt;\/div&gt;                             );                         },                     },                 ]             },         ],     };  export const basename = '';  const router = new UniversalRouter(routes, {     baseUrl: basename });  export default router; <\/code><\/pre>\n<p>  \u0412\u043b\u043e\u0436\u0435\u043d\u044b\u0435 \u0440\u043e\u0443\u0442\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u041e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 children, \u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 next().<\/p>\n<h3>\u0418 \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 React?<\/h3>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434 navigate() \u0434\u043b\u044f history:<\/p>\n<pre><code class=\"javascript\">import { createBrowserHistory } from 'history' import parse from 'url-parse' import deepEqual from 'deep-equal' const isNode = new Function('try {return this===global;}catch(e){return false;}') \/\/eslint-disable-line let history  if (!isNode()) {   history = createBrowserHistory()   history.navigate = function (path, state) {     const parsedPath = parse(path)     const location = history.location     if (parsedPath.pathname === location.pathname &amp;&amp;       parsedPath.query === location.search &amp;&amp;       parsedPath.hash === location.hash &amp;&amp;       deepEqual(state, location.state)) {       return     }     const args = Array.from(arguments)     args.splice(0, 2)     return history.push(...[path, state, ...args])   } } else {   history = {}   history.navigate = function () {} }  export default history <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Link, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"javascript\">import React from 'react'; import {basename} from '.\/router'; import history from '.\/history';  const createOnClickAnchor = (callback) =&gt; {     return (e) =&gt; {         e.preventDefault();         history.navigate(e.currentTarget.getAttribute('href'));         callback(e);     }; };  export default ({href, onClick = () =&gt; {}, children, ...rest}) =&gt; (     &lt;a         href={basename + href}         onClick={createOnClickAnchor(onClick)}         {...rest}     &gt;         {children}     &lt;\/a&gt; ); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">import React from 'react'; import ReactDOM from 'react-dom'; import '.\/index.css'; import App from '.\/App'; import * as serviceWorker from '.\/serviceWorker'; import history from '.\/history'; import router from '.\/router';   const render = async (location) =&gt; {     const element = await router.resolve(location);     ReactDOM.render(             element,         document.getElementById('root'),     ); };  render(history.location); history.listen(render);    \/\/ If you want your app to work offline and load faster, you can change \/\/ unregister() to register() below. Note this comes with some pitfalls. \/\/ Learn more about service workers: https:\/\/bit.ly\/CRA-PWA serviceWorker.unregister(); <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/apapacy\/universal-router-tut\" rel=\"nofollow\">github.com\/apapacy\/universal-router-tut<\/a><\/p>\n<p>  \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/p>\n<p>  1. <a href=\"https:\/\/medium.com\/@ippei.tanaka\/universal-router-history-react-97ec79464573\" rel=\"nofollow\">medium.com\/@ippei.tanaka\/universal-router-history-react-97ec79464573<\/a><\/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\/484514\/\"> https:\/\/habr.com\/ru\/post\/484514\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/484514\/\">\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u0432 \u0447\u0435\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0435\u0431\u0435. \u0414\u0430\u0436\u0435, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 API \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c (\u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 4-\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 React \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 githab.com \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>  \u0417\u0430 \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u044f \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u0430\u0445 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0436\u0435\u0441\u0442\u043a\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0438\u0437 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439, \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439, \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0438 \u0442.\u043f.). \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0435, \u043c\u043d\u043e\u0433\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u043e \u0442\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u043e, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u0430 \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0433\u0438\u0431\u043a\u0438\u043c\u0438 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u0430\u0445 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043c\u0435\u043d\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c (\u0434\u043e 4-\u0439) \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0432 React.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u0435\u043b \u0441 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 universal-router, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 React.<\/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-297326","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297326","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=297326"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297326\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}