{"id":56273,"date":"2022-12-29T12:28:09","date_gmt":"2022-12-29T06:58:09","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=56273"},"modified":"2023-01-02T09:29:01","modified_gmt":"2023-01-02T03:59:01","slug":"loosely-coupled-pass-data-to-react-app-via-drupalsettings","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/","title":{"rendered":"Loosely Coupled: Pass data to React app via drupalSettings"},"content":{"rendered":"<p>There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it?<br \/>\nWe will be using #attached\/drupalSettings to accomplish this.<\/p>\n<h3>Step 1: Modify our library definition.<\/h3>\n<p>Add dependency for drupalSettings where react bundle file is included:<\/p>\n<pre>react-lib:\r\n  version: 1.x\r\n  js:\r\n    js\/react-app\/dist\/app.bundle.js: { minified: true }\r\n  dependencies:\r\n    - core\/drupalSettings<\/pre>\n<h3>Step 2: Pass settings to the browser using the #attached framework.<\/h3>\n<p>This can be done either in following ways:<\/p>\n<h4>i) Any Preprocess hook:<\/h4>\n<pre>function react_module_preprocess_node(&amp;$variables) {\r\n  $variables['content']['#attached']['drupalSettings']['reactApp']['setting1'] = 'value1';\r\n  $variables['content']['#attached']['drupalSettings']['reactApp']['setting2'] = 'value2';\r\n}<\/pre>\n<h4>ii) Page attachment hook:<\/h4>\n<pre>function react_module_page_attachments(array &amp;$attachments) {\r\n  $attachments['#attached']['library'][] = 'react_module\/react-lib';\r\n  $attachments['#attached']['drupalSettings']['reactApp']['setting1'] = 'value1';\r\n  $attachments['#attached']['drupalSettings']['reactApp']['setting2'] = 'value2';\r\n}<\/pre>\n<h4>iii) Render array (Forms, Block etc).<\/h4>\n<p>For Instance, if you want to do things from a <strong>form alter<\/strong>, where we have added the markup and the library:<\/p>\n<pre>$form['my_react_app'] = [\r\n  '#markup' =&gt; '&lt;div id=\"react-root\"&gt;&lt;\/div&gt;',\r\n  '#attached' =&gt; [\r\n    'library' =&gt; [\r\n      'react_module\/react-lib'\r\n    ],\r\n    'drupalSettings' =&gt; [\r\n      'reactApp' =&gt; [\r\n        'setting1' =&gt; 'value1',\r\n        'setting2' =&gt; 'value2',\r\n      ],\r\n    ],\r\n  ],\r\n];<\/pre>\n<h3>Step 3: Access settings in React App<\/h3>\n<p><strong>drupalSettings<\/strong> is a global variable so it can be used directly within the React app.<\/p>\n<pre>import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nconst root = ReactDOM.createRoot(document.getElementById('react-root'));\r\nroot.render(\r\n  &lt;&gt;{drupalSettings.reactApp.setting1} {drupalSettings.reactApp.setting2}&lt;\/&gt;\r\n);<\/pre>\n<p><strong>Note<\/strong>: If any of the changes are not reflected on page refresh, try <strong>clearing browser or Drupal cache<\/strong>. You can also always call <strong>console.log (drupalSettings);<\/strong> in the browser console to debug.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using [&hellip;]<\/p>\n","protected":false},"author":1124,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":102,"footnotes":""},"categories":[3602,3038],"tags":[4862,5070,5067,5068,4064],"class_list":["post-56273","post","type-post","status-publish","format-standard","hentry","category-drupal","category-react-js","tag-drupal","tag-drupalsettings","tag-loosely-coupled","tag-partially-decoupled","tag-react"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Deepali Bansal\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#article\",\"name\":\"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog\",\"headline\":\"Loosely Coupled: Pass data to React app via drupalSettings\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepali-agarwal\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2022-12-29T12:28:09+05:30\",\"dateModified\":\"2023-01-02T09:29:01+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#webpage\"},\"articleSection\":\"Drupal, React.js, Drupal, drupalSettings, Loosely Coupled, Partially Decoupled, react\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/react-js\\\/#listItem\",\"name\":\"React.js\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/react-js\\\/#listItem\",\"position\":2,\"name\":\"React.js\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/react-js\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#listItem\",\"name\":\"Loosely Coupled: Pass data to React app via drupalSettings\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#listItem\",\"position\":3,\"name\":\"Loosely Coupled: Pass data to React app via drupalSettings\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/react-js\\\/#listItem\",\"name\":\"React.js\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepali-agarwal\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepali-agarwal\\\/\",\"name\":\"Deepali Bansal\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/dc1f0330-31ca-488c-96b3-1f464aedabd9_1648-Deepali-Bansal-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Deepali Bansal\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/\",\"name\":\"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog\",\"description\":\"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepali-agarwal\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepali-agarwal\\\/#author\"},\"datePublished\":\"2022-12-29T12:28:09+05:30\",\"dateModified\":\"2023-01-02T09:29:01+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog","description":"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using","canonical_url":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#article","name":"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog","headline":"Loosely Coupled: Pass data to React app via drupalSettings","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepali-agarwal\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2022-12-29T12:28:09+05:30","dateModified":"2023-01-02T09:29:01+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#webpage"},"articleSection":"Drupal, React.js, Drupal, drupalSettings, Loosely Coupled, Partially Decoupled, react"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/react-js\/#listItem","name":"React.js"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/react-js\/#listItem","position":2,"name":"React.js","item":"https:\/\/www.tothenew.com\/blog\/category\/react-js\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#listItem","name":"Loosely Coupled: Pass data to React app via drupalSettings"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#listItem","position":3,"name":"Loosely Coupled: Pass data to React app via drupalSettings","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/react-js\/#listItem","name":"React.js"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/deepali-agarwal\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/deepali-agarwal\/","name":"Deepali Bansal","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/dc1f0330-31ca-488c-96b3-1f464aedabd9_1648-Deepali-Bansal-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Deepali Bansal"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/","name":"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog","description":"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepali-agarwal\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepali-agarwal\/#author"},"datePublished":"2022-12-29T12:28:09+05:30","dateModified":"2023-01-02T09:29:01+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog","og:description":"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using","og:url":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Loosely Coupled: Pass data to React app via drupalSettings | TO THE NEW Blog","twitter:description":"There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"56273","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e064e47f017","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2022-12-30 07:34:32","updated":"2024-02-29 11:05:08","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/react-js\/\" title=\"React.js\">React.js<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tLoosely Coupled: Pass data to React app via drupalSettings\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"React.js","link":"https:\/\/www.tothenew.com\/blog\/category\/react-js\/"},{"label":"Loosely Coupled: Pass data to React app via drupalSettings","link":"https:\/\/www.tothenew.com\/blog\/loosely-coupled-pass-data-to-react-app-via-drupalsettings\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/56273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1124"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=56273"}],"version-history":[{"count":2,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/56273\/revisions"}],"predecessor-version":[{"id":56309,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/56273\/revisions\/56309"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=56273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=56273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=56273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}