index.js 220 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 import axios from 'axios' import { FETCH_USER } from './types' export const fetchUser = () => async dispatch => { const res = await axios.get('/api/current_user') dispatch({ type: FETCH_USER, payload: res.data }) }