---
title: "Discussion on \"WeakMap in react-scan vs next-mdx source code.\" | Hashnode"
description: "Discussion on \"WeakMap in react-scan vs next-mdx source code.\". In this article, we will review the below code snippet picked from react-scan source code.\nconst cache = new WeakMap<object, string>();\n\nexport function fastSerialize(value: unknown, depth = 0): string {\n  ...\n  if (value === null) return 'null';\n\n  ..."
url: "https://hashnode.com/posts/weakmap-in-react-scan-vs-next-mdx-source-code/67d3c288f6184722e07d7583"
---

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

Discussion

# [WeakMap in react-scan vs next-mdx source code.](https://thinkthroo.com/blog/weakmap-in-react-scan-vs-next-mdx-source-code?utm_source=hashnode&utm_medium=feed)

In this article, we will review the below code snippet picked from react-scan source code. const cache = new WeakMap<object, string>(); export function fastSerialize(value: unknown, depth = 0): string { ... if (value === null) return 'null'; ...

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

-   [#nextmdx](https://hashnode.com/tag/nextmdx)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#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.
