{"id":4373,"date":"2018-06-13T20:27:45","date_gmt":"2018-06-13T18:27:45","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=4373"},"modified":"2018-06-13T08:28:03","modified_gmt":"2018-06-13T06:28:03","slug":"when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2018\/06\/13\/when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt\/","title":{"rendered":"When (and why) you should use ES6 arrow functions \u2014 and when you shouldn\u2019t"},"content":{"rendered":"<p>Nice reminder.<\/p>\n<blockquote><p>Arrow functions (also called \u201cfat arrow functions\u201d) are undoubtedly one of the more popular features of ES6. They introduced a new way of\u2026<\/p><\/blockquote>\n<p>Sorgente: <em><a href=\"https:\/\/medium.freecodecamp.org\/when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt-3d851d7f0b26\">When (and why) you should use ES6 arrow functions \u2014 and when you shouldn\u2019t<\/a><\/em><\/p>\n<blockquote><p><!--more--><!--nextpage--><\/p>\n<p id=\"34ec\" class=\"graf graf--p graf-after--figure\">Arrow functions (also called \u201cfat arrow functions\u201d) are undoubtedly one of the more popular features of ES6. They introduced a new way of writing concise functions.<\/p>\n<p id=\"c293\" class=\"graf graf--p graf-after--p\">Here is a function written in ES5 syntax:<\/p>\n<pre id=\"a2cc\" class=\"graf graf--pre graf-after--p\">function timesTwo(params) {\n  return params * 2\n}<\/pre>\n<pre id=\"81a0\" class=\"graf graf--pre graf-after--pre\">timesTwo(4);  \/\/ 8<\/pre>\n<p id=\"eaa0\" class=\"graf graf--p graf-after--pre\">Now, here is the same function expressed as an arrow function:<\/p>\n<pre id=\"1550\" class=\"graf graf--pre graf-after--p\">var timesTwo = params =&gt; params * 2<\/pre>\n<pre id=\"0aa1\" class=\"graf graf--pre graf-after--pre\">timesTwo(4);  \/\/ 8<\/pre>\n<p id=\"9646\" class=\"graf graf--p graf-after--pre\">It\u2019s much shorter! We are able to omit the curly braces and the return statement due to implicit returns (but only if there is no block\u200a\u2014\u200amore on this below).<\/p>\n<p id=\"280f\" class=\"graf graf--p graf-after--p\">It is important to understand how the arrow function behaves differently compared to the regular ES5 functions.<\/p>\n<h3 id=\"c46e\" class=\"graf graf--h3 graf-after--p\">Variations<\/h3>\n<figure id=\"8698\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\"><\/div>\n<\/figure>\n<figure id=\"8698\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*7mBpxeXkeSb-719jjHvgXA.jpeg\" data-width=\"2496\" data-height=\"1481\" data-action=\"zoom\" data-action-value=\"1*7mBpxeXkeSb-719jjHvgXA.jpeg\" data-scroll=\"native\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1%2A7mBpxeXkeSb-719jjHvgXA.jpeg?w=910&#038;ssl=1\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*7mBpxeXkeSb-719jjHvgXA.jpeg\" \/><\/div>\n<\/div><figcaption class=\"imageCaption\">Variety is the spice of\u00a0life<\/figcaption><\/figure>\n<p id=\"c0da\" class=\"graf graf--p graf-after--figure\">One thing you will quickly notice is the variety of syntaxes available in arrow functions. Let\u2019s run through some of the common ones:<\/p>\n<h4 id=\"946e\" class=\"graf graf--h4 graf-after--p\">1. No parameters<\/h4>\n<p id=\"f962\" class=\"graf graf--p graf-after--h4\">If there are no parameters, you can place an empty parentheses before <code class=\"\" data-line=\"\">=&gt;<\/code>.<\/p>\n<pre id=\"4f9e\" class=\"graf graf--pre graf-after--p\">() =&gt; 42<\/pre>\n<p id=\"7863\" class=\"graf graf--p graf-after--pre\">In fact, you don\u2019t even need the parentheses!<\/p>\n<pre id=\"2b29\" class=\"graf graf--pre graf-after--p\">_ =&gt; 42<\/pre>\n<h4 id=\"4905\" class=\"graf graf--h4 graf-after--pre\">2. Single parameter<\/h4>\n<p id=\"ae20\" class=\"graf graf--p graf-after--h4\">With these functions, parentheses are optional:<\/p>\n<pre id=\"c151\" class=\"graf graf--pre graf-after--p\">x =&gt; 42  || (x) =&gt; 42<\/pre>\n<h4 id=\"3599\" class=\"graf graf--h4 graf-after--pre\"><strong class=\"markup--strong markup--h4-strong\">3. Multiple parameters<\/strong><\/h4>\n<p id=\"644f\" class=\"graf graf--p graf-after--h4\">Parentheses are required for these functions:<\/p>\n<pre id=\"87ae\" class=\"graf graf--pre graf-after--p\">(x, y) =&gt; 42<\/pre>\n<h4 id=\"6fd7\" class=\"graf graf--h4 graf-after--pre\"><strong class=\"markup--strong markup--h4-strong\">4. Statements (as opposed to expressions)<\/strong><\/h4>\n<p id=\"7951\" class=\"graf graf--p graf-after--h4\">In its most basic form, a <em class=\"markup--em markup--p-em\">function expression<\/em> produces a value, while a <em class=\"markup--em markup--p-em\">function statement<\/em> performs an action.<\/p>\n<p id=\"e13a\" class=\"graf graf--p graf-after--p\">With the arrow function, it is important to remember that statements need to have curly braces. Once the curly braces are present, you always need to write <code class=\"\" data-line=\"\">return<\/code> as well.<\/p>\n<p id=\"770c\" class=\"graf graf--p graf-after--p\">Here is an example of the arrow function used with an if statement:<\/p>\n<pre id=\"6027\" class=\"graf graf--pre graf-after--p\">var feedTheCat = (cat) =&gt; {\n  if (cat === 'hungry') {\n    return 'Feed the cat';\n  } else {\n    return 'Do not feed the cat';\n  }\n}<\/pre>\n<h4 id=\"593f\" class=\"graf graf--h4 graf-after--pre\"><strong class=\"markup--strong markup--h4-strong\">5. \u201cBlock\u00a0body\u201d<\/strong><\/h4>\n<p id=\"8750\" class=\"graf graf--p graf-after--h4\">If your function is in a block, you must also use the explicit <code class=\"\" data-line=\"\">return<\/code> statement:<\/p>\n<pre id=\"2618\" class=\"graf graf--pre graf-after--p\">var addValues = (x, y) =&gt; {\n  return x + y\n}<\/pre>\n<h4 id=\"a7b9\" class=\"graf graf--h4 graf-after--pre\"><strong class=\"markup--strong markup--h4-strong\">6. Object\u00a0literals<\/strong><\/h4>\n<p id=\"11ca\" class=\"graf graf--p graf-after--h4\">If you are returning an object literal, it needs to be wrapped in parentheses. This forces the interpreter to evaluate what is inside the parentheses, and the object literal is returned.<\/p>\n<pre id=\"45ce\" class=\"graf graf--pre graf-after--p\">x =&gt;({ y: x })<\/pre>\n<h3 id=\"af70\" class=\"graf graf--h3 graf-after--pre\">Syntactically anonymous<\/h3>\n<figure id=\"5e98\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\"><\/div>\n<\/figure>\n<figure id=\"5e98\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"1*_4a_Zan4-WX7vh7G0XQZjw.jpeg\" data-width=\"4316\" data-height=\"2877\" data-action=\"zoom\" data-action-value=\"1*_4a_Zan4-WX7vh7G0XQZjw.jpeg\" data-scroll=\"native\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/i0.wp.com\/cdn-images-1.medium.com\/max\/1600\/1%2A_4a_Zan4-WX7vh7G0XQZjw.jpeg?w=910&#038;ssl=1\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*_4a_Zan4-WX7vh7G0XQZjw.jpeg\" \/><\/div>\n<\/div>\n<\/figure>\n<p id=\"4d1f\" class=\"graf graf--p graf-after--figure\">It is important to note that arrow functions are anonymous, which means that they are not named.<\/p>\n<p id=\"ac0a\" class=\"graf graf--p graf-after--p\">This anonymity creates some issues:<\/p>\n<ol class=\"postList\">\n<li id=\"2772\" class=\"graf graf--li graf-after--p\">Harder to debug<\/li>\n<\/ol>\n<p id=\"53a7\" class=\"graf graf--p graf-after--li\">When you get an error, you will not be able to trace the name of the function or the exact line number where it occurred.<\/p>\n<p id=\"6864\" class=\"graf graf--p graf-after--p\">2. No self-referencing<\/p>\n<p id=\"75d4\" class=\"graf graf--p graf-after--p\">If your function needs to have a self-reference at any point (e.g. recursion, event handler that needs to unbind), it will not work.<\/p>\n<h3 id=\"41e0\" class=\"graf graf--h3 graf-after--p\">Main benefit: No binding of\u00a0\u2018this\u2019<\/h3>\n<figure id=\"05ae\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\"><\/div>\n<\/figure>\n<figure id=\"05ae\" class=\"graf graf--figure graf-after--h3\">\n<div class=\"aspectRatioPlaceholder is-locked\">\n<div class=\"progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded\" data-image-id=\"0*H1ltbktHxMkmFDdK\" data-width=\"5294\" data-height=\"3534\" data-action=\"zoom\" data-action-value=\"0*H1ltbktHxMkmFDdK\" data-scroll=\"native\"><img decoding=\"async\" class=\"progressiveMedia-image js-progressiveMedia-image\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/0*H1ltbktHxMkmFDdK\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/0*H1ltbktHxMkmFDdK\" \/><\/div>\n<\/div><figcaption class=\"imageCaption\">Photo by <a class=\"markup--anchor markup--figure-anchor\" href=\"https:\/\/unsplash.com\/@davideragusa?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"photo-creator noopener\" data-href=\"https:\/\/unsplash.com\/@davideragusa?utm_source=medium&amp;utm_medium=referral\">davide ragusa<\/a> on\u00a0<a class=\"markup--anchor markup--figure-anchor\" href=\"https:\/\/unsplash.com?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"photo-source noopener\" data-href=\"https:\/\/unsplash.com?utm_source=medium&amp;utm_medium=referral\">Unsplash<\/a><\/figcaption><\/figure>\n<p id=\"4f24\" class=\"graf graf--p graf-after--figure\">In classic function expressions, the <code class=\"\" data-line=\"\">this<\/code> keyword is bound to different values based on the <em class=\"markup--em markup--p-em\">context<\/em> in which it is called. With arrow functions however, <code class=\"\" data-line=\"\">this<\/code> is<em class=\"markup--em markup--p-em\"> lexically bound<\/em>. It means that it uses<code class=\"\" data-line=\"\">this<\/code> from the code that contains the arrow function.<\/p>\n<p id=\"c311\" class=\"graf graf--p graf-after--p\">For example, look at the <code class=\"\" data-line=\"\">setTimeout<\/code> function below:<\/p>\n<pre id=\"2063\" class=\"graf graf--pre graf-after--p\">\/\/ ES5\nvar obj = {\n  id: 42,\n  counter: function counter() {\n    setTimeout(function() {\n      console.log(this.id);\n    }.bind(this), 1000);\n  }\n};<\/pre>\n<p id=\"ce67\" class=\"graf graf--p graf-after--pre\">In the ES5 example,\u00a0<code class=\"\" data-line=\"\">.bind(this)<\/code> is required to help pass the <code class=\"\" data-line=\"\">this<\/code> context into the function. Otherwise, by default <code class=\"\" data-line=\"\">this<\/code> would be undefined.<\/p>\n<pre id=\"c6ea\" class=\"graf graf--pre graf-after--p\">\/\/ ES6\nvar obj = {\n  id: 42,\n  counter: function counter() {\n    setTimeout(() =&gt; {\n      console.log(this.id);\n    }, 1000);\n  }\n};<\/pre>\n<p id=\"dbf8\" class=\"graf graf--p graf-after--pre\">ES6 arrow functions can\u2019t be bound to a <code class=\"\" data-line=\"\">this<\/code> keyword, so it will lexically go up a scope, and use the value of <code class=\"\" data-line=\"\">this<\/code> in the scope in which it was defined.<\/p>\n<h3 id=\"d1b0\" class=\"graf graf--h3 graf-after--p\">When you should not use Arrow Functions<\/h3>\n<p id=\"bb5a\" class=\"graf graf--p graf-after--h3\">After learning a little more about arrow functions, I hope you understand that they do not replace regular functions.<\/p>\n<p id=\"7611\" class=\"graf graf--p graf-after--p\">Here are some instances where you probably wouldn\u2019t want to use them:<\/p>\n<ol class=\"postList\">\n<li id=\"3014\" class=\"graf graf--li graf-after--p\">Object methods<\/li>\n<\/ol>\n<p id=\"6a86\" class=\"graf graf--p graf-after--li\">When you call <code class=\"\" data-line=\"\">cat.jumps<\/code>, the number of lives does not decrease. It is because <code class=\"\" data-line=\"\">this<\/code> is not bound to anything, and will inherit the value of <code class=\"\" data-line=\"\">this<\/code> from its parent scope.<\/p>\n<pre id=\"9026\" class=\"graf graf--pre graf-after--p\">var cat = {\n  lives: 9,\n  jumps: () =&gt; {\n    this.lives--;\n  }\n}<\/pre>\n<p id=\"be6f\" class=\"graf graf--p graf-after--pre\">2. Callback functions with dynamic context<\/p>\n<p id=\"4212\" class=\"graf graf--p graf-after--p\">If you need your context to be dynamic, arrow functions are not the right choice. Take a look at this event handler below:<\/p>\n<pre id=\"1216\" class=\"graf graf--pre graf-after--p\">var button = document.getElementById('press');\nbutton.addEventListener('click', () =&gt; {\n  this.classList.toggle('on');\n});<\/pre>\n<p id=\"7410\" class=\"graf graf--p graf-after--pre\">If we click the button, we would get a TypeError. It is because <code class=\"\" data-line=\"\">this<\/code> is not bound to the button, but instead bound to its parent scope.<\/p>\n<p id=\"8fcf\" class=\"graf graf--p graf-after--p\">3. When it makes your code less readable<\/p>\n<p id=\"fad6\" class=\"graf graf--p graf-after--p\">It is worth taking into consideration the variety of syntax we covered earlier. With regular functions, people know what to expect. With arrow functions, it may be hard to decipher what you are looking at straightaway.<\/p>\n<h3 id=\"0cc3\" class=\"graf graf--h3 graf-after--p\">When you should use\u00a0them<\/h3>\n<p id=\"fad1\" class=\"graf graf--p graf-after--h3\"><span class=\"markup--quote markup--p-quote is-other\" data-creator-ids=\"anon\">Arrow functions shine best with anything that requires <code class=\"\" data-line=\"\">this<\/code> to be bound to the context, and not the function itself.<\/span><\/p>\n<p id=\"b8d6\" class=\"graf graf--p graf-after--p\">Despite the fact that they are anonymous, I also like using them with methods such as <code class=\"\" data-line=\"\">map<\/code> and <code class=\"\" data-line=\"\">reduce<\/code>, because I think it makes my code more readable. To me, the pros outweigh the cons.<\/p>\n<p id=\"a9a4\" class=\"graf graf--p graf-after--p graf--trailing\">Thanks for reading my article, and clap if you liked it! Check out my other articles like <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/medium.freecodecamp.org\/how-i-built-my-pomodoro-clock-app-and-the-lessons-i-learned-along-the-way-51288983f5ee\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/medium.freecodecamp.org\/how-i-built-my-pomodoro-clock-app-and-the-lessons-i-learned-along-the-way-51288983f5ee\">How I built my Pomodoro Clock app, and the lessons I learned along the way<\/a>, and <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/medium.freecodecamp.org\/demystifying-javascripts-new-keyword-874df126184c\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/medium.freecodecamp.org\/demystifying-javascripts-new-keyword-874df126184c\">Let\u2019s demystify JavaScript\u2019s \u2018new\u2019 keyword<\/a>.<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Nice reminder. Arrow functions (also called \u201cfat arrow functions\u201d) are undoubtedly one of the more popular features of ES6. They introduced a new way of\u2026 Sorgente: When (and why) you should use ES6 arrow functions \u2014 and when you shouldn\u2019t<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2018\/06\/13\/when-and-why-you-should-use-es6-arrow-functions-and-when-you-shouldnt\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72,50],"tags":[],"class_list":["post-4373","post","type-post","status-publish","format-standard","hentry","category-documentations","category-javascript"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-18x","jetpack-related-posts":[{"id":5164,"url":"https:\/\/monodes.com\/predaelli\/2019\/01\/31\/these-are-the-features-in-es6-that-you-should-know\/","url_meta":{"origin":4373,"position":0},"title":"These are the features in ES6 that you should know","author":"Paolo Redaelli","date":"2019-01-31","format":false,"excerpt":"These are the features in ES6 that you should know These are the features in ES6 that you should knowby Cristi SalcescuES6 brings more features to the JavaScript language. Some new syntax allows you to write code in a more expressive way, some features complete the functional programming toolbox, and\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3264,"url":"https:\/\/monodes.com\/predaelli\/2017\/08\/10\/this-in-javascript-zell-liew\/","url_meta":{"origin":4373,"position":1},"title":"This in JavaScript | Zell Liew","author":"Paolo Redaelli","date":"2017-08-10","format":"link","excerpt":"https:\/\/zellwk.com\/blog\/this\/ This is really nice to read Hire me This in JavaScript 21st Jun 2017 Are you confused by the this keyword in JavaScript? It confuses everyone in the beginning, so don\u2019t worry about it. You\u2019re not alone. But that doesn\u2019t mean you can go on without understanding this forever.\u2026","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2140,"url":"https:\/\/monodes.com\/predaelli\/2017\/02\/03\/2140\/","url_meta":{"origin":4373,"position":2},"title":"http:\/\/jamesknelson.com\/using-es6-in-the-browser-with-babel-6-and-webpack\/","author":"Paolo Redaelli","date":"2017-02-03","format":false,"excerpt":"http:\/\/jamesknelson.com\/using-es6-in-the-browser-with-babel-6-and-webpack\/","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5713,"url":"https:\/\/monodes.com\/predaelli\/2019\/06\/12\/5713\/","url_meta":{"origin":4373,"position":3},"title":"Different ways to achieve encapsulation\u2026","author":"Paolo Redaelli","date":"2019-06-12","format":"link","excerpt":"Different ways to achieve encapsulation in JavaScript(ES6) Iskander Samatov","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8190,"url":"https:\/\/monodes.com\/predaelli\/2021\/02\/21\/typeorm\/","url_meta":{"origin":4373,"position":4},"title":"Typeorm","author":"Paolo Redaelli","date":"2021-02-21","format":"link","excerpt":"typeorm.io is Object\u2013relational mapping for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5128,"url":"https:\/\/monodes.com\/predaelli\/2019\/01\/15\/removing-javascripts-this-keyword-makes-it-a-better-language-heres-why\/","url_meta":{"origin":4373,"position":5},"title":"Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s why.","author":"Paolo Redaelli","date":"2019-01-15","format":false,"excerpt":"Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s why. Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s\u00a0why. Cristi Salcescu Jan this is of course the source of much confusion in JavaScript. The reason being that this depends on how the function was invoked, not where the\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/4373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=4373"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/4373\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=4373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=4373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=4373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}