This file contains 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
/* global gapi */ | |
const API_KEY = 'YOURAPIKEYHERE'; | |
import React, { Component } from 'react'; | |
class App extends Component { | |
loadYoutubeApi() { | |
const script = document.createElement("script"); |
This file contains 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 express from 'express'; | |
import webpack from 'webpack'; | |
import webpackDevMiddleware from 'webpack-dev-middleware'; | |
import path from 'path'; | |
import config from '../../webpack.config.dev'; | |
import open from 'open'; | |
/* eslint-disable no-console */ | |
const port = 3000; |
This file contains 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 webpack from 'webpack'; | |
import HtmlWebpackPlugin from 'html-webpack-plugin'; | |
import CleanWebpackPlugin from 'clean-webpack-plugin'; | |
export default { | |
entry: [ | |
'./app/index' | |
], | |
devtool: 'inline-source-map', |
This file contains 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 lang="en"> | |
<head> | |
<title>Jifts</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="./dist/bundle.js"></script> | |
</body> | |
</html> |
This file contains 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 express from 'express'; | |
import webpack from 'webpack'; | |
import webpackDevMiddleware from 'webpack-dev-middleware'; | |
import path from 'path'; | |
import config from '../../webpack.config.dev'; | |
import open from 'open'; | |
/* eslint-disable no-console */ | |
const port = 3000; |
This file contains 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 express from 'express'; | |
import webpack from 'webpack'; | |
import webpackDevMiddleware from 'webpack-dev-middleware'; | |
import path from 'path'; | |
import config from '../../webpack.config.dev'; | |
import open from 'open'; | |
/* eslint-disable no-console */ | |
const port = 3000; |
This file contains 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
const func = () => { | |
if (condition) { | |
return asyncCall().then(() => { | |
if (condition) { | |
if (condition) { | |
// continue looping | |
return func(); | |
} else { | |
console.log('some logic'); | |
} |
This file contains 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
const func = () => { | |
if (condition) { | |
return asyncCall().then(() => { | |
if (condition) { | |
if (condition) { | |
// continue looping | |
return func(); | |
} else { | |
console.log('some logic'); | |
} |
This file contains 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
const func = () => { | |
if (condition) { | |
return asyncCall().then(() => { | |
if (condition) { | |
if (condition) { | |
// continue looping | |
return func(); | |
} else { | |
console.log('some logic'); | |
} |
This file contains 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
const outerFunc = () => { | |
var i = 0 | |
return new Promise(resolve => { | |
if (i < 3) { | |
i++ | |
const innerFunc = () => { | |
return new Promise(resolve => { | |
return log.asyncCall().then(log => { | |
if (log) { | |
// some logic |
NewerOlder