This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>React with Wordpress API</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
var path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
devtool: 'source-map', | |
devServer: { | |
historyApiFallback: true, // This will make the server understand "/some-link" routs instead of "/#/some-link" | |
}, | |
entry: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
var path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
devtool: 'cheap-module-source-map', | |
devServer: { | |
historyApiFallback: true, // This will make the server understand "/some-link" routs instead of "/#/some-link" | |
}, | |
entry: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "wp-api-react", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "webpack-dev-server --inline --progress --config webpack.dev.js", | |
"build": "npm run clean && webpack -p --progress --config webpack.production.js", | |
"clean": "rimraf ./build/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stripe.transfers.create( | |
{ | |
amount: 100, | |
currency: "usd", | |
destination: "default_for_currency", | |
source_type: "bank_account" | |
}, | |
{stripe_account: "acct_19qSMyGNNhYMoOcx"} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"object": { | |
"object": "balance", | |
"available": [ | |
{ | |
"currency": "usd", | |
"amount": 4247538, | |
"source_types": { | |
"card": 4247538 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Nav from './Nav.js'; | |
export default class App extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {render} from 'react-dom'; | |
import App from './components/App.js'; | |
import Home from './components/Home.js'; | |
import views from './components/views.js'; | |
import { | |
browserHistory, | |
IndexRoute, | |
Redirect, |