Skip to content

Instantly share code, notes, and snippets.

View dselkirk's full-sized avatar
🏠
Working from home

Denis Prostatov dselkirk

🏠
Working from home
View GitHub Profile
// actions/list.js
import API from '../api'
export const FETCH_ITEMS = 'FETCH_ITEMS';
export const FETCH_ITEMS_SUCCESS = 'FETCH_ITEMS_SUCCESS';
export const FETCH_ITEMS_FAILURE = 'FETCH_ITEMS_FAILURE';
export function fetchItems() {
return {
type: FETCH_ITEMS,
payload: API.getList()
<script type="text/javascript">
// First let's create an array of JavaScript Date
// objects.
// More info about the Date class:
// http://w3schools.com/js/js_obj_date.asp
var dates = [
new Date(2010, 4, 10, 10, 07, 16),
new Date(2010, 4, 8, 9, 16, 09),
new Date(2010, 3, 30, 0, 15, 49),