Here's an easy way to add easy cross-browser testing on your existing projects using browser-sync
npm i browser-sync --save-dev
"test:browser": "browser-sync start --config ./bs-config.js"
import store from './store' | |
export default class HttpClient { | |
getUser() { | |
const token = store.getState() | |
// fetch and pass along your token | |
} | |
} |
import httpClient from './httpClient' | |
const login = (email, password) => (dispatch) => { | |
return httpClient.login(email, password) | |
.then(response => { | |
httpClient.token = response.token | |
dispatch(loginSuccess(response)) | |
}) | |
} |
import React, { Component } from "react"; | |
import axios from "axios"; | |
import moment from "moment"; | |
export default class Feutred extends Component { | |
state = { | |
sports: [], | |
events: [], | |
isLoading: true, | |
errors: null |
'use strict'; | |
var path = require('path'); | |
var gulp = require('gulp'), | |
browserify = require('browserify'), | |
source = require('vinyl-source-stream'), | |
buffer = require('vinyl-buffer'), | |
sourcemaps = require('gulp-sourcemaps'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), |
const initialState = { | |
1: { | |
todos: [], | |
visibilityFilter: 'SHOW_ALL' | |
}, | |
2: { | |
todos: [], | |
visibilityFilter: 'SHOW_ALL' | |
}, | |
3: { |
function* countdown() { | |
yield call(delay, toMilliseconds(480)); | |
yield put(showLogoutWarning()); | |
yield call(delay, toMilliseconds(120)); | |
yield put(logout()); | |
} | |
function* watchForActivity() { | |
while (true) { | |
yield takeLatest(action => action.type !== ' SHOW_LOGOUT_WARNING', countdown); |
const Client = require('./Client') | |
const StatusSocket = require('./Socket') | |
/** | |
* Upload files to Transloadit using Tus. | |
*/ | |
module.exports = class Transloadit extends EventEmitter { | |
constructor (core, opts) { | |
super(core, opts) | |
this.type = 'uploader' |
.container { | |
margin-left: auto; | |
margin-right: auto; | |
padding-left: 15px; | |
padding-right: 15px; | |
} | |
.container::after { | |
content: ""; | |
display: table; | |
clear: both; |
Here's an easy way to add easy cross-browser testing on your existing projects using browser-sync
npm i browser-sync --save-dev
"test:browser": "browser-sync start --config ./bs-config.js"