Skip to content

Instantly share code, notes, and snippets.

View vdanchenkov's full-sized avatar

Vladimir Danchenkov vdanchenkov

View GitHub Profile
@vdanchenkov
vdanchenkov / current_user_header.js
Created March 28, 2016 11:39 — forked from st8998/header.js
Container component with loading
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { find, propEq } from 'ramda'
import Header from './header'
import { requestCurrent as requestCurrentUser } from 'users/users_actions'
@connect(
state => ({ currentUser: find(propEq('current', 1), state.users) }),
{ requestCurrentUser }
)