Skip to content

Instantly share code, notes, and snippets.

View JohnIrle's full-sized avatar
💻

John Irle JohnIrle

💻
View GitHub Profile
@JohnIrle
JohnIrle / useMedia.jsx
Created March 25, 2021 20:27 — forked from cassidoo/useMedia.jsx
An example of checking on a media query with React Hooks
function useMedia(query) {
const [matches, setMatches] = useState(window.matchMedia(query).matches)
useEffect(() => {
const media = window.matchMedia(query)
if (media.matches !== matches) {
setMatches(media.matches)
}
const listener = () => {
setMatches(media.matches)
@JohnIrle
JohnIrle / semantic-commit-messages.md
Created February 4, 2021 03:11 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@JohnIrle
JohnIrle / README-Template.md
Created June 23, 2018 06:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites