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-US"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="initial-scale=1, user-scalable=yes" /> | |
<title>Invoice INV0002</title> | |
<!-- Fonts loading --> | |
<link | |
href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" | |
rel="stylesheet" |
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
#!/bin/sh | |
dateDir=`date +%Y-%m-%d-%H-%M` | |
baseDir="/tmp/$dateDir" | |
mkdir -p $baseDir | |
for specName in `find ./cypress/integration/ -type f -printf "%f\n"`; do | |
rm -rf ./test-results/mochawesome | |
workDir=$baseDir/$specName |
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
User types "a" User types "b" Client's value is "ab" | |
^ | |
+----------------------------+------------------------------------------------------------------------------> | |
+ + | | |
| | |
+--------------------------+ +--------------------------+ | | |
debounce rate | debounce rate | | | |
| | | | |
| | + | |
v v this.isSaving = false |
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 { | |
booksSummarySelector, | |
usersSummarySelector, | |
userDetailsSelector, | |
bookDetailsSelector | |
} from "./selectors"; | |
class NotRealState { | |
constructor(state) { | |
Object.defineProperty(this, "_state", { |
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 { compose } from "redux"; | |
import { createSelector } from "reselect"; | |
const getBooks = state => state.books; | |
const getUsers = state => state.users; | |
const getComments = state => state.comments; | |
const usersSummary = createSelector( | |
[getUsers, getComments], | |
(users, comments) => |
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
/* other derived state methods */ | |
const moveToApp = state => | |
Object.defineProperties(state, { | |
users: { | |
get: function() { | |
return this.app.users; | |
}, | |
enumerable: false, | |
configurable: true |
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 { compose } from "redux"; | |
const usersSummary = function() { | |
return this.users.map(user => ({ | |
...user, | |
booksCount: user.books.length, | |
commentsCount: this.comments.filter(c => c.user === user.id).length | |
})); | |
}; |
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 { deriveState } from "./deriveState"; | |
export const enhanceStore = createStore => ( | |
reducer, | |
preloadedState, | |
enhancer | |
) => { | |
const store = createStore(reducer, preloadedState, enhancer); | |
const _getState = store.getState; | |
store.getState = () => deriveState(_getState()); |
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 { compose } from "redux"; | |
const usersSummary = function() { | |
return this.users.map(user => ({ | |
...user, | |
booksCount: user.books.length, | |
commentsCount: this.comments.filter(c => c.user === user.id).length | |
})); | |
}; |
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 { createStore, applyMiddleware, compose } from "redux"; | |
import { initialState } from "./initialState"; | |
import { reducer } from "./reducer"; | |
import { enhanceStore } from "./storeEnhancer"; | |
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | |
export const store = createStore( | |
reducer, | |
initialState, |