{"id":2421,"date":"2024-09-03T13:07:08","date_gmt":"2024-09-03T12:07:08","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=2421"},"modified":"2024-09-03T14:41:59","modified_gmt":"2024-09-03T13:41:59","slug":"react-useeffect-for-data-fetching","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/","title":{"rendered":"Using React.useEffect for Data Fetching"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Introduction<\/h4>\n\n\n\n<p>React&#8217;s useEffect hook is a powerful tool for managing side effects in functional components. One of the most common use cases is using React.useEffect for data fetching from an API. In this article, we\u2019ll explore how to effectively use React.useEffect for data fetching, covering best practices and potential pitfalls to avoid.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">What is React.useEffect?<\/h4>\n\n\n\n<p>The <code>useEffect<\/code> hook in React is used to perform side effects in functional components. Side effects can include things like fetching data, setting up subscriptions, or manually changing the DOM. <code>useEffect<\/code> allows you to specify a function that React will execute after every render, or only when certain dependencies change.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Basic Example of Data Fetching with useEffect<\/h4>\n\n\n\n<p>Here\u2019s a basic example of how you can use <code>useEffect<\/code> to fetch data from an API:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, { useState, useEffect } from 'react';\n\nfunction DataFetchingComponent() {\n    const [data, setData] = useState([]);\n    const [loading, setLoading] = useState(true);\n\n    useEffect(() =&gt; {\n        fetch('https:\/\/api.example.com\/data')\n            .then(response =&gt; response.json())\n            .then(data =&gt; {\n                setData(data);\n                setLoading(false);\n            })\n            .catch(error =&gt; {\n                console.error('Error fetching data:', error);\n                setLoading(false);\n            });\n    }, []); \/\/ Empty array means this effect runs only once, similar to componentDidMount\n\n    if (loading) {\n        return &lt;div&gt;Loading...&lt;\/div&gt;;\n    }\n\n    return (\n        &lt;div&gt;\n            &lt;ul&gt;\n                {data.map(item =&gt; (\n                    &lt;li key={item.id}&gt;{item.name}&lt;\/li&gt;\n                ))}\n            &lt;\/ul&gt;\n        &lt;\/div&gt;\n    );\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Best Practices for Data Fetching with useEffect<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Dependency Array:<\/strong> Always be mindful of the dependency array in <code>useEffect<\/code>. An empty array (<code>[]<\/code>) means the effect will only run once, similar to <code>componentDidMount<\/code>. If you include variables in the array, the effect will re-run whenever those variables change.<\/li>\n\n\n\n<li><strong>Cleanup:<\/strong> If your effect creates subscriptions or requires cleanup, return a function from <code>useEffect<\/code> to clean up after the effect. This is crucial to avoid memory leaks, especially when dealing with subscriptions or timers.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">useEffect(() =&gt; {\n    const interval = setInterval(() =&gt; {\n        console.log('This will run every second!');\n    }, 1000);\n\n    return () =&gt; clearInterval(interval); \/\/ Cleanup function\n}, []);\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Handling Errors:<\/strong> Always handle potential errors in your data fetching logic to ensure that your component doesn\u2019t break unexpectedly. You can use a <code>try-catch<\/code> block or handle the error in the <code>catch<\/code> method of the promise.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Pitfalls to Avoid<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Infinite Loops:<\/strong> Be cautious with what you include in the dependency array. If you include a state variable that is updated inside the effect, it could cause an infinite loop of rendering.<\/li>\n\n\n\n<li><strong>Race Conditions:<\/strong> If your component unmounts before a fetch request is completed, you may encounter a race condition where the component tries to update the state after it has unmounted. You can prevent this by canceling the request or using a cleanup function.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Conclusion<\/h4>\n\n\n\n<p>The <code>useEffect<\/code> hook is a versatile tool in React for managing side effects like data fetching. By understanding how to use it effectively, you can ensure your components are efficient, responsive, and free of common pitfalls. Whether you\u2019re building a simple application or a complex one, mastering <code>useEffect<\/code> for data fetching will help you manage asynchronous operations with ease.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/phps-autoload-functionality\/\">Understanding PHP&#8217;s Autoload functionality<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction React&#8217;s useEffect hook is a powerful tool for managing side effects in functional components. One of the<\/p>\n","protected":false},"author":3,"featured_media":2425,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[73],"tags":[99],"class_list":["post-2421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-react-js","tag-software-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>React.useEffect for Data Fetching<\/title>\n<meta name=\"description\" content=\"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React.useEffect for Data Fetching\" \/>\n<meta property=\"og:description\" content=\"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-03T12:07:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-03T13:41:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1120\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kene Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/\"},\"author\":{\"name\":\"Kene Samuel\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\"},\"headline\":\"Using React.useEffect for Data Fetching\",\"datePublished\":\"2024-09-03T12:07:08+00:00\",\"dateModified\":\"2024-09-03T13:41:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/\"},\"wordCount\":389,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/IMG-20240903-WA0008.jpg\",\"keywords\":[\"software development\"],\"articleSection\":[\"react js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/\",\"name\":\"React.useEffect for Data Fetching\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/IMG-20240903-WA0008.jpg\",\"datePublished\":\"2024-09-03T12:07:08+00:00\",\"dateModified\":\"2024-09-03T13:41:59+00:00\",\"description\":\"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/IMG-20240903-WA0008.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/IMG-20240903-WA0008.jpg\",\"width\":1120,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-useeffect-for-data-fetching\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"react js\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/react-js\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using React.useEffect for Data Fetching\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\",\"name\":\"Kene Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"caption\":\"Kene Samuel\"},\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/kene\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"React.useEffect for Data Fetching","description":"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/","og_locale":"en_US","og_type":"article","og_title":"React.useEffect for Data Fetching","og_description":"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...","og_url":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/","article_published_time":"2024-09-03T12:07:08+00:00","article_modified_time":"2024-09-03T13:41:59+00:00","og_image":[{"width":1120,"height":630,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","type":"image\/jpeg"}],"author":"Kene Samuel","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/"},"author":{"name":"Kene Samuel","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206"},"headline":"Using React.useEffect for Data Fetching","datePublished":"2024-09-03T12:07:08+00:00","dateModified":"2024-09-03T13:41:59+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/"},"wordCount":389,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","keywords":["software development"],"articleSection":["react js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/","url":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/","name":"React.useEffect for Data Fetching","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","datePublished":"2024-09-03T12:07:08+00:00","dateModified":"2024-09-03T13:41:59+00:00","description":"Learn how to effectively use React.useEffect for data fetching in your React applications. This guide covers best practices ...","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","width":1120,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/react-useeffect-for-data-fetching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"react js","item":"https:\/\/codeflarelimited.com\/blog\/react-js\/"},{"@type":"ListItem","position":3,"name":"Using React.useEffect for Data Fetching"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206","name":"Kene Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","caption":"Kene Samuel"},"url":"https:\/\/codeflarelimited.com\/blog\/author\/kene\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/09\/IMG-20240903-WA0008.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=2421"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2421\/revisions"}],"predecessor-version":[{"id":2422,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2421\/revisions\/2422"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/2425"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=2421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=2421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=2421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}