---
title: "Discussion on \"`createHighlightCanvas` function in react-scan source code.\" | Hashnode"
description: "Discussion on \"`createHighlightCanvas` function in react-scan source code.\". In this article, we will review the below code snippet from react-scan source code.\nexport const createHighlightCanvas = (root: HTMLElement) => {\n  highlightCanvas = document.createElement('canvas');\n  highlightCtx = highlightCanvas.getContext('2d', ..."
url: "https://hashnode.com/posts/createhighlightcanvas-function-in-react-scan-source-code/67cfcd40fe1930cd3f45b06e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\`createHighlightCanvas\` function in react-scan source code.](https://thinkthroo.com/blog/createhighlightcanvas-function-in-react-scan-source-code?utm_source=hashnode&utm_medium=feed)

In this article, we will review the below code snippet from react-scan source code. export const createHighlightCanvas = (root: HTMLElement) => { highlightCanvas = document.createElement('canvas'); highlightCtx = highlightCanvas.getContext('2d', ...

Mar 11, 2025 · 3 min read · thinkthroo.com  
Updated Apr 3, 2025  
Read the article

-   [#canvas](https://hashnode.com/tag/canvas)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#reactscan](https://hashnode.com/tag/reactscan)

## Written by

[Ramu Narasinga](https://hashnode.com/@ramunarasinga)

@ramunarasinga · India

  
[View profile](https://hashnode.com/@ramunarasinga)

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
