---
title: "Discussion on \"Creating a middleware with react using useRef and useContext hooks\" | Hashnode"
description: "Discussion on \"Creating a middleware with react using useRef and useContext hooks\". How we created a state tracker using useRef and passing down the tracker to all components without UI re-rendering."
url: "https://hashnode.com/posts/creating-a-middleware-with-react-using-useref-and-usecontext-hooks/623766888e4fae3f767dfb07"
---

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

Discussion

# [Creating a middleware with react using useRef and useContext hooks](https://forehead.dev/creating-a-middleware-with-react-using-useref-and-usecontext-hooks?utm_source=hashnode&utm_medium=feed)

How we created a state tracker using useRef and passing down the tracker to all components without UI re-rendering.

Mar 20, 2022 · 6 min read · forehead.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#frontend](https://hashnode.com/tag/frontend)

## Written by

[Prajwal Pradhan](https://hashnode.com/@ctrlx-altf4)

@ctrlx-altf4 · Kathmandu, Nepal

  
[View profile](https://hashnode.com/@ctrlx-altf4)

Frontend Engineer

## Responses 1

Markdown supported · ⌘↵ to post

No responses yet.
