Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into changeset-release/main
Browse files Browse the repository at this point in the history
  • Loading branch information
egjiri authored Jul 17, 2024
2 parents e61a261 + f916a00 commit 4f6db51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-hooks/src/hooks/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useState, useEffect, useLayoutEffect} from 'react';
type EffectHook = typeof useEffect | typeof useLayoutEffect;

function createUseMediaFactory(useEffectHook: EffectHook) {
return (query: string, {initialValue}: {initialValue?: boolean} = {}) => {
return (query: string, {initialValue}: {initialValue?: boolean}) => {
const [match, setMatch] = useState(() =>
initialValue === undefined
? window.matchMedia(query).matches
Expand Down

0 comments on commit 4f6db51

Please sign in to comment.