{"id":4000,"date":"2023-11-04T23:13:59","date_gmt":"2023-11-04T23:13:59","guid":{"rendered":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/"},"modified":"2023-11-05T05:48:24","modified_gmt":"2023-11-05T05:48:24","slug":"how-to-build-a-calculator-app-with-vue-js-and-vuex","status":"publish","type":"post","link":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/","title":{"rendered":"How to Build a Calculator App with Vue.js and Vuex"},"content":{"rendered":"

In this tutorial, we will build a simple calculator app using Vue.js and Vuex. Vue.js is a progressive JavaScript framework for building user interfaces, and Vuex is a state management pattern and library for Vue.js applications. By using Vuex, we can manage the state of our calculator app more efficiently.<\/p>\n

Prerequisites<\/h2>\n

To follow this tutorial, you should have basic knowledge of HTML, CSS, and JavaScript. You should also have Node.js and npm (Node Package Manager) installed on your development machine. If you don’t have them installed, you can download them from the official Node.js website (https:\/\/nodejs.org).<\/p>\n

Setting Up Project<\/h2>\n

Let’s start by creating a new Vue.js project using the Vue CLI.<\/p>\n

Open your terminal or command prompt and run the following command:<\/p>\n

vue create calculator-app\n<\/code><\/pre>\n

This command will create a new directory named “calculator-app” and scaffold a new Vue.js project inside it. You will be prompted to choose a preset configuration for your project. For this tutorial, you can choose the default preset by pressing the Enter key.<\/p>\n

Once the project is created, navigate into the project directory by running the following command:<\/p>\n

cd calculator-app\n<\/code><\/pre>\n

Now, let’s install the Vuex library by running the following command:<\/p>\n

npm install vuex\n<\/code><\/pre>\n

Creating the Calculator Component<\/h2>\n

Next, let’s create a new file called “Calculator.vue” inside the “src\/components” directory. This file will contain the main logic and markup for our calculator app.<\/p>\n

Open the “Calculator.vue” file and add the following code:<\/p>\n

<template>\n  <div class=\"calculator\">\n    <input type=\"text\" v-model=\"input\" readonly>\n    <div class=\"buttons\">\n      <button v-for=\"button in buttons\" :key=\"button\" @click=\"handleClick(button)\">\n        {{ button }}\n      <\/button>\n    <\/div>\n  <\/div>\n<\/template>\n\n<script>\nexport default {\n  data() {\n    return {\n      input: \"\",\n      buttons: [\"7\", \"8\", \"9\", \"\/\", \"4\", \"5\", \"6\", \"*\", \"1\", \"2\", \"3\", \"-\", \"0\", \".\", \"=\", \"+\"]\n    };\n  },\n  methods: {\n    handleClick(button) {\n      if (button === \"=\") {\n        this.calculate();\n      } else {\n        this.input += button;\n      }\n    },\n    calculate() {\n      try {\n        this.input = eval(this.input);\n      } catch (error) {\n        this.input = \"Error\";\n      }\n    }\n  }\n};\n<\/script>\n<\/code><\/pre>\n

In this code, we define a Vue.js component called “Calculator”. We use the v-model<\/code> directive to bind the “input” data property to the text input field. This allows us to update the input value based on user interactions.<\/p>\n

We also define a “buttons” array that contains all the buttons we want to display on our calculator. We loop through this array using the v-for<\/code> directive to generate the buttons dynamically.<\/p>\n

Inside the methods section, we define two methods: “handleClick” and “calculate”. The “handleClick” method is called whenever a button is clicked. If the button is the equal (=) sign, we call the “calculate” method. Otherwise, we concatenate the button value to the input value.<\/p>\n

The “calculate” method uses the eval<\/code> function to evaluate the mathematical expression in the input field. If an error occurs during evaluation, we display the “Error” message.<\/p>\n

Importing and Using the Calculator Component<\/h2>\n

Now that we have created the “Calculator” component, let’s import and use it in the main App component.<\/p>\n

Open the “src\/App.vue” file and replace its contents with the following code:<\/p>\n

<template>\n  <div id=\"app\">\n    <Calculator \/>\n  <\/div>\n<\/template>\n\n<script>\nimport Calculator from \".\/components\/Calculator\";\n\nexport default {\n  name: \"App\",\n  components: {\n    Calculator\n  }\n};\n<\/script>\n\n<style>\n#app {\n  margin: 0 auto;\n  max-width: 300px;\n  padding: 20px;\n  text-align: center;\n}\n<\/style>\n<\/code><\/pre>\n

In this code, we import the “Calculator” component and register it as a local component inside the “App” component. Then we use the “Calculator” component within the template of the “App” component.<\/p>\n

We also add some basic styling to center the app on the page and limit its width to 300 pixels.<\/p>\n

Setting Up Vuex<\/h2>\n

Now let’s set up Vuex to manage the state of our calculator app.<\/p>\n

Create a new directory called “store” inside the “src” directory. Inside the “store” directory, create a new file called “index.js” and add the following code:<\/p>\n

import Vuex from \"vuex\";\n\nexport default new Vuex.Store({\n  state: {\n    input: \"\"\n  },\n  mutations: {\n    setInput(state, input) {\n      state.input = input;\n    }\n  },\n  actions: {\n    updateInput({ commit }, input) {\n      commit(\"setInput\", input);\n    }\n  },\n  getters: {\n    getInput(state) {\n      return state.input;\n    }\n  }\n});\n<\/code><\/pre>\n

In this code, we import Vuex and create a new Vuex store. Inside the store, we define the initial state with an empty “input” property.<\/p>\n

We also define a “setInput” mutation that is responsible for updating the “input” property in the state. The “updateInput” action is used to commit the “setInput” mutation and pass the new input value as an argument.<\/p>\n

Finally, we define a “getInput” getter to retrieve the current input value from the state.<\/p>\n

Connecting Vuex to the Calculator Component<\/h2>\n

Now let’s connect the Vuex store to the “Calculator” component.<\/p>\n

Open the “Calculator.vue” file and update its code as follows:<\/p>\n

<template>\n  <div class=\"calculator\">\n    <input type=\"text\" :value=\"input\" readonly>\n    <div class=\"buttons\">\n      <button v-for=\"button in buttons\" :key=\"button\" @click=\"handleClick(button)\">\n        {{ button }}\n      <\/button>\n    <\/div>\n  <\/div>\n<\/template>\n\n<script>\nimport { mapGetters, mapActions } from \"vuex\";\n\nexport default {\n  computed: {\n    ...mapGetters([\"getInput\"]),\n    input: {\n      get() {\n        return this.getInput;\n      },\n      set(value) {\n        this.updateInput(value);\n      }\n    }\n  },\n  methods: {\n    ...mapActions([\"updateInput\"]),\n    handleClick(button) {\n      if (button === \"=\") {\n        this.calculate();\n      } else {\n        this.input += button;\n      }\n    },\n    calculate() {\n      try {\n        this.input = eval(this.input);\n      } catch (error) {\n        this.input = \"Error\";\n      }\n    }\n  }\n};\n<\/script>\n\n<style>\n.button {\n  margin: 0.5rem;\n  padding: 0.5rem 1rem;\n}\n<\/style>\n<\/code><\/pre>\n

In this code, we import the mapGetters<\/code> and mapActions<\/code> functions from Vuex to map the store’s getters and actions to the component’s computed properties and methods, respectively.<\/p>\n

We use the mapGetters<\/code> function to add a getInput<\/code> computed property to the component. This property retrieves the input value from the store.<\/p>\n

We also modify the input<\/code> computed property to use the Vuex store. It gets the value from the getInput<\/code> computed property and sets the value using the updateInput<\/code> action.<\/p>\n

Finally, we use the mapActions<\/code> function to add the updateInput<\/code> action to the component’s methods.<\/p>\n

Registering the Store in the App<\/h2>\n

Now that we have set up the store and connected it to the “Calculator” component, let’s register the store in the main App component.<\/p>\n

Open the “src\/main.js” file and update its code as follows:<\/p>\n

import Vue from \"vue\";\nimport App from \".\/App.vue\";\nimport store from \".\/store\";\n\nVue.config.productionTip = false;\n\nnew Vue({\n  store,\n  render: h => h(App)\n}).$mount(\"#app\");\n<\/code><\/pre>\n

In this code, we import the store from the “store” directory and pass it as a property to the Vue instance. This registers the store globally for all components in the app.<\/p>\n

Running the App<\/h2>\n

Finally, let’s run the app and see the calculator in action!<\/p>\n

Open your terminal or command prompt and run the following command:<\/p>\n

npm run serve\n<\/code><\/pre>\n

This command will compile the app and start a local development server. Once the compilation is complete, the server will provide you with a local URL (e.g., http:\/\/localhost:8080\/) where you can access the app.<\/p>\n

Open your web browser and navigate to the URL provided by the development server. You should see the calculator app rendered on the page.<\/p>\n

Try using the calculator app by clicking on the buttons. The input field should update accordingly, and the result will be displayed when you click the equal (=) sign.<\/p>\n

Congratulations! You have successfully built a calculator app with Vue.js and Vuex. You can now extend and customize the app based on your requirements.<\/p>\n

Conclusion<\/h2>\n

In this tutorial, we learned how to build a simple calculator app using Vue.js and Vuex. We started by setting up a new Vue.js project using the Vue CLI and installed the Vuex library. Then we created a “Calculator” component to handle the logic and markup of the app.<\/p>\n

We imported and used the “Calculator” component in the main App component, and added basic styling to the app. We also set up a Vuex store to manage the state of the app and connected it to the “Calculator” component.<\/p>\n

Finally, we registered the store in the main App component and ran the app to see the calculator in action.<\/p>\n

Vue.js and Vuex provide a powerful combination for building complex and scalable applications. With Vuex, you can easily manage state and achieve a more predictable flow of data in your app.<\/p>\n","protected":false},"excerpt":{"rendered":"

In this tutorial, we will build a simple calculator app using Vue.js and Vuex. Vue.js is a progressive JavaScript framework for building user interfaces, and Vuex is a state management pattern and library for Vue.js applications. By using Vuex, we can manage the state of our calculator app more efficiently. Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[775,50,156,776,276,777,774,49,356,773],"yoast_head":"\nHow to Build a Calculator App with Vue.js and Vuex - Pantherax Blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build a Calculator App with Vue.js and Vuex\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will build a simple calculator app using Vue.js and Vuex. Vue.js is a progressive JavaScript framework for building user interfaces, and Vuex is a state management pattern and library for Vue.js applications. By using Vuex, we can manage the state of our calculator app more efficiently. Continue Reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\" \/>\n<meta property=\"og:site_name\" content=\"Pantherax Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-04T23:13:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-05T05:48:24+00:00\" \/>\n<meta name=\"author\" content=\"Panther\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Panther\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t \"@context\": \"https:\/\/schema.org\",\n\t \"@graph\": [\n\t {\n\t \"@type\": \"Article\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#article\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\"\n\t },\n\t \"author\": {\n\t \"name\": \"Panther\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\"\n\t },\n\t \"headline\": \"How to Build a Calculator App with Vue.js and Vuex\",\n\t \"datePublished\": \"2023-11-04T23:13:59+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:24+00:00\",\n\t \"mainEntityOfPage\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\"\n\t },\n\t \"wordCount\": 1077,\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"keywords\": [\n\t \"\\\"Building calculator app\\\"\",\n\t \"\\\"Front-end development\\\"]\",\n\t \"\\\"JavaScript\\\"\",\n\t \"\\\"State management\\\"\",\n\t \"\\\"Vue.js tutorial\\\"\",\n\t \"\\\"Vuex tutorial\\\"]\",\n\t \"\\\"Vuex\\\"\",\n\t \"\\\"Web development\\\"\",\n\t \"[\\\"calculator app\\\"\",\n\t \"[\\\"Vue.js\\\"\"\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"WebPage\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\",\n\t \"url\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\",\n\t \"name\": \"How to Build a Calculator App with Vue.js and Vuex - Pantherax Blogs\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#website\"\n\t },\n\t \"datePublished\": \"2023-11-04T23:13:59+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:24+00:00\",\n\t \"breadcrumb\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#breadcrumb\"\n\t },\n\t \"inLanguage\": \"en-US\",\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"ReadAction\",\n\t \"target\": [\n\t \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/\"\n\t ]\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"BreadcrumbList\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#breadcrumb\",\n\t \"itemListElement\": [\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 1,\n\t \"name\": \"Home\",\n\t \"item\": \"http:\/\/localhost:10003\/\"\n\t },\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 2,\n\t \"name\": \"How to Build a Calculator App with Vue.js and Vuex\"\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"WebSite\",\n\t \"@id\": \"http:\/\/localhost:10003\/#website\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"description\": \"\",\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"SearchAction\",\n\t \"target\": {\n\t \"@type\": \"EntryPoint\",\n\t \"urlTemplate\": \"http:\/\/localhost:10003\/?s={search_term_string}\"\n\t },\n\t \"query-input\": \"required name=search_term_string\"\n\t }\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"Organization\",\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"logo\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\",\n\t \"url\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"contentUrl\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"width\": 1024,\n\t \"height\": 1024,\n\t \"caption\": \"Pantherax Blogs\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\"\n\t }\n\t },\n\t {\n\t \"@type\": \"Person\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\",\n\t \"name\": \"Panther\",\n\t \"image\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/image\/\",\n\t \"url\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"contentUrl\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"caption\": \"Panther\"\n\t },\n\t \"sameAs\": [\n\t \"http:\/\/localhost:10003\"\n\t ],\n\t \"url\": \"http:\/\/localhost:10003\/author\/pepethefrog\/\"\n\t }\n\t ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Build a Calculator App with Vue.js and Vuex - Pantherax Blogs","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":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/","og_locale":"en_US","og_type":"article","og_title":"How to Build a Calculator App with Vue.js and Vuex","og_description":"In this tutorial, we will build a simple calculator app using Vue.js and Vuex. Vue.js is a progressive JavaScript framework for building user interfaces, and Vuex is a state management pattern and library for Vue.js applications. By using Vuex, we can manage the state of our calculator app more efficiently. Continue Reading","og_url":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/","og_site_name":"Pantherax Blogs","article_published_time":"2023-11-04T23:13:59+00:00","article_modified_time":"2023-11-05T05:48:24+00:00","author":"Panther","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Panther","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#article","isPartOf":{"@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/"},"author":{"name":"Panther","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7"},"headline":"How to Build a Calculator App with Vue.js and Vuex","datePublished":"2023-11-04T23:13:59+00:00","dateModified":"2023-11-05T05:48:24+00:00","mainEntityOfPage":{"@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/"},"wordCount":1077,"publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"keywords":["\"Building calculator app\"","\"Front-end development\"]","\"JavaScript\"","\"State management\"","\"Vue.js tutorial\"","\"Vuex tutorial\"]","\"Vuex\"","\"Web development\"","[\"calculator app\"","[\"Vue.js\""],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/","url":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/","name":"How to Build a Calculator App with Vue.js and Vuex - Pantherax Blogs","isPartOf":{"@id":"http:\/\/localhost:10003\/#website"},"datePublished":"2023-11-04T23:13:59+00:00","dateModified":"2023-11-05T05:48:24+00:00","breadcrumb":{"@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/localhost:10003\/how-to-build-a-calculator-app-with-vue-js-and-vuex\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/localhost:10003\/"},{"@type":"ListItem","position":2,"name":"How to Build a Calculator App with Vue.js and Vuex"}]},{"@type":"WebSite","@id":"http:\/\/localhost:10003\/#website","url":"http:\/\/localhost:10003\/","name":"Pantherax Blogs","description":"","publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/localhost:10003\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/localhost:10003\/#organization","name":"Pantherax Blogs","url":"http:\/\/localhost:10003\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/","url":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","contentUrl":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","width":1024,"height":1024,"caption":"Pantherax Blogs"},"image":{"@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7","name":"Panther","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","caption":"Panther"},"sameAs":["http:\/\/localhost:10003"],"url":"http:\/\/localhost:10003\/author\/pepethefrog\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4000"}],"collection":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/comments?post=4000"}],"version-history":[{"count":1,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4000\/revisions"}],"predecessor-version":[{"id":4536,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4000\/revisions\/4536"}],"wp:attachment":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/media?parent=4000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/categories?post=4000"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/tags?post=4000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}