---
title: "Discussion on \"Custom Hooks in React: useMediaQuery\" | Hashnode"
description: "Discussion on \"Custom Hooks in React: useMediaQuery\". This tutorial shows you how to create a hook, useMediaQuery, that can help with conditionally rendering JSX based on specified media queries."
url: "https://hashnode.com/posts/custom-hooks-in-react-usemediaquery/61adfe8f9dc5a836391baa5f"
---

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

Discussion

# [Custom Hooks in React: useMediaQuery](https://blog.alyssaholland.me/custom-hooks-in-react-usemediaquery?utm_source=hashnode&utm_medium=feed)

This tutorial shows you how to create a hook, useMediaQuery, that can help with conditionally rendering JSX based on specified media queries.

Dec 6, 2021 · 4 min read · blog.alyssaholland.me  
Updated Aug 2, 2022  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#media-queries](https://hashnode.com/tag/media-queries)

## Written by

[Alyssa Holland](https://hashnode.com/@AlyssaCodes)

@AlyssaCodes

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

Programming. Productivity. Positivity

Welcome to my blog 👋🏽 I'm a Front-End Developer with a passion for learning! I write about Programming 👩🏽‍💻 and Productivity Tips ✅

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
