Skip to content

Instantly share code, notes, and snippets.

View pokorson's full-sized avatar

Mateusz Pokora pokorson

  • Motimate
  • Lodz
View GitHub Profile
@pokorson
pokorson / Enhance.js
Created September 8, 2017 12:58 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@pokorson
pokorson / nvmrc
Created January 10, 2017 10:47 — forked from xiaolai/nvmrc
bash function for load .nvmrc automatically
# for nvm
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
elif [[ $(nvm version) != $(nvm version default) ]]; then
echo "Reverting to nvm default version"
nvm use default