<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>react on Curtis Timson</title><link>https://hugo.curtiscode.dev/tags/react/</link><description>Recent content in react on Curtis Timson</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><lastBuildDate>Fri, 11 Feb 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://hugo.curtiscode.dev/tags/react/index.xml" rel="self" type="application/rss+xml"/><item><title>Filtering duplicate data points on Chart.js</title><link>https://hugo.curtiscode.dev/post/js/chartjs-filtering-duplicate-data/</link><pubDate>Fri, 11 Feb 2022 00:00:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/js/chartjs-filtering-duplicate-data/</guid><description>With large data sets, Chart.js data points can start to look cluttered and impact performance. This article looks at how these could be filtered.
What is Chart.js? Chart.js is an open-source library which provides simple and flexible Javascript charting.
There is also an npm package, react-chartjs-2, which provides Chart.js as React components.
Duplicate data points When using a line chart with a lot of data and unchanging values on the y-axis, there can be a lot of overlapping data points, which aren&amp;rsquo;t providing much value to the user:</description></item><item><title>Adding a body class in GatsbyJs to prevent flashing content</title><link>https://hugo.curtiscode.dev/post/gatsbyjs/add-body-class-gatsbyjs-fouc/</link><pubDate>Tue, 10 Sep 2019 10:55:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/gatsbyjs/add-body-class-gatsbyjs-fouc/</guid><description>Recently I&amp;rsquo;ve been working on a GatsbyJs project which includes the use of a theme where a body class is used to prevent flashing of unstyled content (FOUC).
This post aims to walk you through how to add a &amp;ldquo;no-js&amp;rdquo; class to the body server-side with GatsbyJs, and then remove it on client load.
What is FOUC? This concept isn&amp;rsquo;t new and has been around for at least a decade, as Paul Irish&amp;rsquo;s post shows.</description></item><item><title>ReactJs Snapshot unit testing and mocking components</title><link>https://hugo.curtiscode.dev/post/reactjs/reactjs-jest-snapshot-mocking/</link><pubDate>Tue, 14 Aug 2018 17:27:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/reactjs/reactjs-jest-snapshot-mocking/</guid><description>What are Jest Snapshots? Snapshot ReactJs Components Mocking ReactJs Components GitHub Repository What are Jest Snapshots? Jest is a javascript unit testing framework developed by Facebook. This is primarily used with React, however can also be used with other frameworks, such as AngularJs.
Snapshots are a feature of Jest which will record an expected output state of a component.
Capture snapshots of React trees or other serializable values to simplify testing and to analyze how state changes over time.</description></item></channel></rss>