Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wsmd on github.
  • I am wsmd (https://keybase.io/wsmd) on keybase.
  • I have a public key ASBixkp491IFMT0FdiQ9DunNkByMAX1L1tip5TdkF-xAIwo

To claim this, I am signing this object:

@wsmd
wsmd / recent-activity
Last active April 5, 2021 23:42
⚡️ Recent Activity
💬 Commented on #147 in wsmd/react-use-form-state
💬 Commented on #36808 in nodejs/node
💬 Commented on #1398 in remy/nodemon
💬 Commented on #576 in typestack/routing-controllers
💬 Commented on #6179 in typeorm/typeorm
@wsmd
wsmd / 01 CounterButton.js
Last active October 29, 2017 20:00
Counter Button in React
import React, { Component } from 'react';
import classNames from 'classnames';
import './CounterButton.css';
const WIDTH_DIFF_THRESHOLD = 2.5;
const PARSABLE_PROPERTIES = ['margin-left', 'animation-duration'];
const getComputedProperty = (node, property) => {
const value = window.getComputedStyle(node)[property];
if (PARSABLE_PROPERTIES.includes(property)) {