Skip to content

Instantly share code, notes, and snippets.

View jonkemp's full-sized avatar

Jonathan Kemp jonkemp

View GitHub Profile
@jonkemp
jonkemp / index.js
Created March 29, 2021 17:55
The Module Pattern from Learning JavaScript Design Patterns by Addy Osmani
const testModule = (() => {
let counter = 0;
return {
incrementCounter() {
return counter++;
},
@jonkemp
jonkemp / HelloWorld.js
Last active February 29, 2024 14:10
React Component in Next.js with Styled Components, Jest, React Testing Library and Storybook [Template]
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
const Wrapper = styled.div``;
const HelloWorld = () => {
return <Wrapper>
<h1>Hello World!</h1>
<Wrapper />;