{"id":6999,"date":"2023-03-09T03:41:59","date_gmt":"2023-03-09T03:41:59","guid":{"rendered":"https:\/\/www.ardorsys.com\/blog\/?p=6999"},"modified":"2023-03-09T05:00:20","modified_gmt":"2023-03-09T05:00:20","slug":"creating-dynamic-scorecard-with-live-updates-in-next-js","status":"publish","type":"post","link":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/","title":{"rendered":"Creating Dynamic Scorecard with Live Updates in Next.js"},"content":{"rendered":"<p>Next.js is a widely used JavaScript framework for building <a href=\"https:\/\/www.ardorsys.com\/blog\/react-18-2-new-features-improvements-and-how-to-use-them\/\">server-rendered React applications<\/a>. It offers a great set of features that allow developers to easily create highly performant and scalable web applications. In this article, we will be exploring how to build a dynamic score card with a loading effect and live updates every 5 seconds in a Next.js application.<\/p>\n<p><strong>Step 1: Create the Score Card Component<\/strong><\/p>\n<p>The first step is to create a <code>ScoreCard<\/code> component that renders the score card. This component should have a state variable <code>loading<\/code> that is set to <code>true<\/code> when the component first mounts and is set to <code>false<\/code> once the data is loaded. We can use the <code>useState<\/code> hook from React to create this state variable.<\/p>\n<pre lang=\"javascript\" escaped=\"true\">\r\nimport { useState, useEffect } from 'react';\r\n\r\nfunction ScoreCard({ score }) {\r\n  const [loading, setLoading] = useState(true);\r\n\r\n  useEffect(() => {\r\n    setLoading(false);\r\n  }, [score]);\r\n\r\n  if (loading) {\r\n    return <div>Loading...<\/div>;\r\n  }\r\n\r\n  return (\r\n    <div>\r\n      <h1>Score: {score}<\/h1>\r\n    <\/div>\r\n  );\r\n}\r\n\r\n<\/pre>\n<p>In this example, we are using the <code>useEffect<\/code> hook to set the <code>loading<\/code> state variable to <code>false<\/code> once the score data is loaded. This will trigger a re-render of the component and display the score.<\/p>\n<p><strong>Step 2: Create the Interval Hook<\/strong><\/p>\n<p>The next step is to create a <code>useInterval<\/code> hook that can be used to update the score every 5 seconds. This hook will use the <code>setInterval<\/code> JavaScript function to call a callback function every 5 seconds.<\/p>\n<pre lang=\"javascript\" escaped=\"true\">\r\nimport { useState, useEffect } from 'react';\r\n\r\nfunction useInterval(callback, delay) {\r\n  const [intervalId, setIntervalId] = useState(null);\r\n\r\n  useEffect(() => {\r\n    function tick() {\r\n      callback();\r\n    }\r\n\r\n    if (delay !== null) {\r\n      const id = setInterval(tick, delay);\r\n      setIntervalId(id);\r\n    }\r\n\r\n    return () => {\r\n      clearInterval(intervalId);\r\n    };\r\n  }, [callback, delay]);\r\n}\r\n\r\n<\/pre>\n<p><strong>Step 3: Use the Score Card and Interval Hook in the Main Page<\/strong><\/p>\n<p>In the main <code>index<\/code> page of our <a href=\"https:\/\/www.ardorsys.com\/blog\/building-web-apps-with-node-js-advantages-limitations-and-best-practices\/\">Next.js application<\/a>, we can use the <code>useInterval<\/code> hook and the <code>ScoreCard<\/code> component to create the score card widget with live updates.<\/p>\n<pre lang=\"javascript\" escaped=\"true\">\r\nimport { useState } from 'react';\r\nimport ScoreCard from '.\/ScoreCard';\r\nimport useInterval from '.\/useInterval';\r\n\r\nexport default function Home() {\r\n  const [score, setScore] = useState(0);\r\n\r\n  useInterval(() => {\r\n    setScore(prevScore => prevScore + 1);\r\n  }, 5000);\r\n\r\n  return (\r\n    <div>\r\n      <ScoreCard score={score} \/>\r\n    <\/div>\r\n  );\r\n}\r\n\r\n<\/pre>\n<p>In this example, we are using the <code>useState<\/code> hook to create a state variable for the score and the <code>useInterval<\/code> hook to update the score every 5 seconds. We pass the <code>setScore<\/code> function as a callback to the <code>useInterval<\/code> hook, which will increment the score by 1 every 5 seconds.<\/p>\n<blockquote><p><strong>Read more:<\/strong>\u00a0<a href=\"https:\/\/www.ardorsys.com\/blog\/lazy-loading-components-on-scroll-in-react-next-js-improve-performance\/\" rel=\"bookmark\">Lazy Loading Components on Scroll in React Next.js: Improve Performance<\/a><\/p><\/blockquote>\n<p><strong>Step 4: Adding a Loading Spinner<\/strong><\/p>\n<p>To make the score card widget more visually appealing, we can add a loading spinner to the <code>ScoreCard<\/code> component while the score is being loaded. We can use a popular library such as \u201creact-spinners\u201d to accomplish this.<\/p>\n<pre lang=\"javascript\" escaped=\"true\">\r\nimport { useState, useEffect } from 'react';\r\nimport { CircleLoader } from 'react-spinners';\r\n\r\nfunction ScoreCard({ score }) {\r\n  const [loading, setLoading] = useState(true);\r\n\r\n  useEffect(() => {\r\n    setLoading(false);\r\n  }, [score]);\r\n\r\n  if (loading) {\r\n    return (\r\n      <div className=\"loading-spinner\">\r\n        <CircleLoader size={30} color={'#123abc'} loading={loading} \/>\r\n      <\/div>\r\n    );\r\n  }\r\n\r\n  return (\r\n    <div>\r\n      <h1>Score: {score}<\/h1>\r\n    <\/div>\r\n  );\r\n}\r\n\r\n<\/pre>\n<p>You can then style the <code>loading-spinner<\/code> class in your CSS to center the loading spinner on the page.<\/p>\n<p><strong>Step 5: Error Handling<\/strong><\/p>\n<p>It\u2019s always a good practice to add some error handling in case the data loading fails. We can add a state variable <code>error<\/code> and call the setError method in case of an error while loading the data.<\/p>\n<pre lang=\"javascript\" escaped=\"true\">\r\nimport { useState, useEffect } from 'react';\r\n\r\nfunction ScoreCard({ score }) {\r\n  const [loading, setLoading] = useState(true);\r\n  const [error, setError] = useState(false);\r\n  \r\n  useEffect(() => {\r\n    setLoading(false);\r\n  }, [score]);\r\n\r\n  if (loading) {\r\n    return <div>Loading...<\/div>;\r\n  }\r\n  if (error) {\r\n    return <div>Error Occured while loading data<\/div>;\r\n  }\r\n\r\n  return (\r\n    <div>\r\n      <h1>Score: {score}<\/h1>\r\n    <\/div>\r\n  );\r\n}\r\n<\/pre>\n<h3><strong>Conclusion:<\/strong><\/h3>\n<p>In this blog post, we have discussed how to create a score card widget with a loading effect and live updates every 5 seconds in a Next.js application. We have used the <code>useState<\/code> and <code>useEffect<\/code> hooks from React to create the score card component and the interval hook. We have also added a loading spinner and error handling to make the score card widget more visually appealing and robust. This is a basic example to give an idea about how you can create a score card widget with loading effect & live update after every 5 sec in Next.js. You can further customize and optimize the code as per your requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"Next.js is a widely used JavaScript framework for building server-rendered React applications. It offers a great set of features that allow developers to easily create highly performant and scalable web applications.\n","protected":false},"author":1,"featured_media":7056,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,62],"tags":[179,64,96],"class_list":["post-6999","post","type-post","status-publish","format-standard","has-post-thumbnail","category-javascript","category-react","tag-next-js","tag-reactjs","tag-reactjs-development"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ardorsys Insights -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Creating Dynamic Scorecard in Next.js - Ardorsys Insights\" \/>\n\t\t<meta property=\"og:description\" content=\"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp\" \/>\n\t\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-03-09T03:41:59+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-03-09T05:00:20+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/ardorsys\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@ardorsys\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Creating Dynamic Scorecard in Next.js - Ardorsys Insights\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#blogposting\",\"name\":\"Creating Dynamic Scorecard in Next.js - Ardorsys Insights\",\"headline\":\"Creating Dynamic Scorecard with Live Updates in Next.js\",\"author\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp\",\"width\":800,\"height\":500},\"datePublished\":\"2023-03-09T03:41:59+00:00\",\"dateModified\":\"2023-03-09T05:00:20+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#webpage\"},\"articleSection\":\"JavaScript, React, Next.Js, ReactJS, Reactjs Development\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog#listItem\",\"position\":1,\"name\":\"Ardorsys\",\"item\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"name\":\"Web Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/javascript\\\/#listItem\",\"name\":\"JavaScript\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog#listItem\",\"name\":\"Ardorsys\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/javascript\\\/#listItem\",\"position\":3,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/javascript\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#listItem\",\"name\":\"Creating Dynamic Scorecard with Live Updates in Next.js\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"name\":\"Web Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#listItem\",\"position\":4,\"name\":\"Creating Dynamic Scorecard with Live Updates in Next.js\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/category\\\/web-development\\\/javascript\\\/#listItem\",\"name\":\"JavaScript\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/#organization\",\"name\":\"Ardorsys Insights\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/ardorsys-logo.png\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#organizationLogo\",\"width\":350,\"height\":93},\"image\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.instagram.com\\\/ardorsystechnologies\",\"https:\\\/\\\/in.pinterest.com\\\/ardorsystechnologies\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/ardorsystechnologies\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f0a6e39134d168cf1a5573e9d071c32a8d99b252e76ae1bc7eb9d824cf4da43?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/\",\"name\":\"Creating Dynamic Scorecard in Next.js - Ardorsys Insights\",\"description\":\"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#mainImage\",\"width\":800,\"height\":500},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/creating-dynamic-scorecard-with-live-updates-in-next-js\\\/#mainImage\"},\"datePublished\":\"2023-03-09T03:41:59+00:00\",\"dateModified\":\"2023-03-09T05:00:20+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/\",\"name\":\"Ardorsys Insights\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ardorsys.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Creating Dynamic Scorecard in Next.js - Ardorsys Insights","description":"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.","canonical_url":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#blogposting","name":"Creating Dynamic Scorecard in Next.js - Ardorsys Insights","headline":"Creating Dynamic Scorecard with Live Updates in Next.js","author":{"@id":"https:\/\/www.ardorsys.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.ardorsys.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp","width":800,"height":500},"datePublished":"2023-03-09T03:41:59+00:00","dateModified":"2023-03-09T05:00:20+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#webpage"},"articleSection":"JavaScript, React, Next.Js, ReactJS, Reactjs Development"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog#listItem","position":1,"name":"Ardorsys","item":"https:\/\/www.ardorsys.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/#listItem","name":"Web Development"}},{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/#listItem","position":2,"name":"Web Development","item":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/#listItem","name":"JavaScript"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog#listItem","name":"Ardorsys"}},{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/#listItem","position":3,"name":"JavaScript","item":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#listItem","name":"Creating Dynamic Scorecard with Live Updates in Next.js"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/#listItem","name":"Web Development"}},{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#listItem","position":4,"name":"Creating Dynamic Scorecard with Live Updates in Next.js","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/#listItem","name":"JavaScript"}}]},{"@type":"Organization","@id":"https:\/\/www.ardorsys.com\/blog\/#organization","name":"Ardorsys Insights","url":"https:\/\/www.ardorsys.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/ardorsys-logo.png","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#organizationLogo","width":350,"height":93},"image":{"@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#organizationLogo"},"sameAs":["https:\/\/www.instagram.com\/ardorsystechnologies","https:\/\/in.pinterest.com\/ardorsystechnologies","https:\/\/www.linkedin.com\/company\/ardorsystechnologies"]},{"@type":"Person","@id":"https:\/\/www.ardorsys.com\/blog\/author\/admin\/#author","url":"https:\/\/www.ardorsys.com\/blog\/author\/admin\/","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/4f0a6e39134d168cf1a5573e9d071c32a8d99b252e76ae1bc7eb9d824cf4da43?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#webpage","url":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/","name":"Creating Dynamic Scorecard in Next.js - Ardorsys Insights","description":"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.ardorsys.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ardorsys.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.ardorsys.com\/blog\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp","@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#mainImage","width":800,"height":500},"primaryImageOfPage":{"@id":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/#mainImage"},"datePublished":"2023-03-09T03:41:59+00:00","dateModified":"2023-03-09T05:00:20+00:00"},{"@type":"WebSite","@id":"https:\/\/www.ardorsys.com\/blog\/#website","url":"https:\/\/www.ardorsys.com\/blog\/","name":"Ardorsys Insights","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.ardorsys.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ardorsys Insights -","og:type":"article","og:title":"Creating Dynamic Scorecard in Next.js - Ardorsys Insights","og:description":"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.","og:url":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/","og:image":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp","og:image:secure_url":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp","og:image:width":800,"og:image:height":500,"article:published_time":"2023-03-09T03:41:59+00:00","article:modified_time":"2023-03-09T05:00:20+00:00","article:publisher":"https:\/\/facebook.com\/ardorsys","twitter:card":"summary","twitter:site":"@ardorsys","twitter:title":"Creating Dynamic Scorecard in Next.js - Ardorsys Insights","twitter:description":"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.","twitter:image":"https:\/\/www.ardorsys.com\/blog\/wp-content\/uploads\/2023\/03\/creating-dynamic-scorecard-with-live-updates-in-next-js-ardorsys.webp"},"aioseo_meta_data":{"post_id":"6999","title":"Creating Dynamic Scorecard in Next.js #separator_sa #site_title","description":"Next.js is a JavaScript framework for building server-rendered React applications, allows developers to create highly performant and scalable web applications.","keywords":[],"keyphrases":{"focus":{"keyphrase":"Next.js","score":88,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":1},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":[]}},"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":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"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,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-01-20 05:23:20","updated":"2026-06-28 09:54:41","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ardorsys.com\/blog\" title=\"Ardorsys\">Ardorsys<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/\" title=\"Web Development\">Web Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/\" title=\"JavaScript\">JavaScript<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCreating Dynamic Scorecard with Live Updates in Next.js\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Ardorsys","link":"https:\/\/www.ardorsys.com\/blog"},{"label":"Web Development","link":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/"},{"label":"JavaScript","link":"https:\/\/www.ardorsys.com\/blog\/category\/web-development\/javascript\/"},{"label":"Creating Dynamic Scorecard with Live Updates in Next.js","link":"https:\/\/www.ardorsys.com\/blog\/creating-dynamic-scorecard-with-live-updates-in-next-js\/"}],"_links":{"self":[{"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/posts\/6999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/comments?post=6999"}],"version-history":[{"count":5,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/posts\/6999\/revisions"}],"predecessor-version":[{"id":7059,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/posts\/6999\/revisions\/7059"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/media\/7056"}],"wp:attachment":[{"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/media?parent=6999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/categories?post=6999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ardorsys.com\/blog\/wp-json\/wp\/v2\/tags?post=6999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}