-
Import and apply the Redux Thunk middleware
-
Add some initial content to the
db.json
file:{
"lists": [{
ReactDOM.render
call, wrap your components in a Provider
to provide the store to connected components.Board
component, mapping the lists
property of the state to the lists
prop of the board component.var axios = require('axios'); | |
var findPassTime = function(latitude, longitude) { | |
return axios.get('http://api.open-notify.org/iss-pass.json', { | |
params: { | |
lat: latitude, | |
lon: longitude | |
} | |
}) |
var Local = function() { | |
var path = document.location.pathname.split("/"); | |
path = path[4]; | |
var ajax = $.ajax({ | |
url: "/" + path + "/files" | |
}); | |
ajax.done(this.onGetFiles.bind(this)); | |
this.data = { | |
description: decodeURI(path) + "#no-index #crumbs", |
<canvas id="canvas"></canvas> |
{ | |
"/work": "8ad52561445ec13c0d04", | |
"/about": "e63b610e2ce53f4d6aba", | |
"/local": "f7c18ce5e76151cbaf93" | |
} |
ul.list { | |
list-style-type: none; | |
padding: 0; | |
font-size: 2em; | |
text-align: center; | |
} | |