{"id":16295691,"url":"https://github.com/hamlim/react-media","last_synced_at":"2025-04-09T13:17:44.312Z","repository":{"id":74220932,"uuid":"92672517","full_name":"hamlim/react-media","owner":"hamlim","description":"A simple react component implementing window.matchMedia","archived":false,"fork":false,"pushed_at":"2018-01-02T13:18:51.000Z","size":16,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T00:47:47.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamlim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-28T16:18:37.000Z","updated_at":"2018-01-07T23:24:23.000Z","dependencies_parsed_at":"2023-07-30T08:00:39.432Z","dependency_job_id":null,"html_url":"https://github.com/hamlim/react-media","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"9803adb82ec0703ff99e437a5d7c75b6ba3adade"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamlim","download_url":"https://codeload.github.com/hamlim/react-media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045271,"owners_count":21038557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T20:19:32.312Z","updated_at":"2025-04-09T13:17:44.284Z","avatar_url":"https://github.com/hamlim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MatchMedia Component\n\nThis component is a simple wrapper around the `window.matchMedia` functionality,\nas such it will only work (as intended) in browsers at or above the versions from this\ntable: https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n\n## Example:\n\n```Javascript\nimport MatchMedia from '@matthamlin/react-media';\n\nconst MyComponent = props =\u003e (\n  \u003cdiv\u003e\n    \u003cMatchMedia media=\"(min-width: 400px)\"\u003e\n      {matches =\u003e matches ? (\u003cMatchedComponent /\u003e) : (\u003cNonMatchedComponent /\u003e)}\n    \u003c/MatchMedia\u003e\n  \u003c/div\u003e\n);\n```\n\n## API:\n\nMatchMedia accepts two props, the first being `media` which is a media query string, the\nsecond is children which is a callback function that accepts one parameter that is a\nboolean if the media query has matched or not.\n\n## Contributing:\n\nIf you have found an issue or want to add features/tests feel free to open a PR\nand explain what the PR is fixing/adding and I will work with you in getting that fix\nmerged into the master branch!\n\n## Questions?\n\nFeel free to open an issue and I will get back to you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Freact-media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamlim%2Freact-media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Freact-media/lists"}