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
documentViewPerf: createPerfFactors(({ perf }) => ({ | |
designLoadStart() { perf.start('design_load') }, | |
designLoadEnd() { perf.end('design_load') }, | |
})) | |
// bez hezkejch metod | |
documentViewPerf: createPerfomanceMeasurer() |
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
export default (fetch, appConfig) => ({ | |
getWords: input => fetch(`${appConfig.apiUrl}/words/?input=${input}`) | |
}) | |
// předání do root komponenty | |
export default class App extends React.PureComponent<null> { | |
render() { | |
return <RootContainer api={createApi(fetch, appConfig)} /> |
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 createCheckoutApiModule = ({ | |
getRequestOptions, | |
api // NOTE: metody get, put, post, delete ... | |
}) => { | |
get(url) { // NOTE: asi si budeš vrace promise | |
return new Promise((resolve, reject) => { | |
api.get({ | |
...getRequestOptions(), | |
url, | |
}, (err, result) => { |
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> | |
<head> | |
<meta name="referrer" content="origin"> | |
<meta property="og:type" content="website" class="next-head"/> | |
<meta property="og:site_name" content="Avocode" class="next-head"/> | |
<meta property="og:title" content="{{ title }}" class="next-head"/> | |
<meta property="og:image" content="{{ image }}" class="next-head"/> | |
<meta property="og:description" content="{{ description }}" class="next-head"/> | |
<meta name="twitter:card" content="summary_large_image" class="next-head"/> |
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 electron = require('electron') | |
const BrowserWindow = electron.BrowserWindow | |
const shell = electron.shell | |
const window = new BrowserWindoe({...}) | |
function handleRedirect(e, url) { | |
e.preventDefault() | |
if (url !== mainWindow.webContents.getURL()) { | |
shell.openExternal(url) |
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
Ahoj přátelé, | |
jak si určitě hodně z vás všimlo, tak po posledním kurzu Reactu je tu celkem ticho. | |
Je to z několika důvodů, ale hned musím říct, že vůbec nekončíme naší aktivitu a nechceme přestat pořádat přednášky. | |
Jako první důvod, proč teď máme takovou delší pauzu je to, že řešíme prostory. | |
Do nedávné doby jsme díky Avocode pořádali kurzy ve skvělých kancelářích na Náplavce, ale teď musím říct, že v Avocode rosteme a už nemáme dostatek míst na to, abychom umístili dalších 50 lidí :(. | |
Přes to všechno musím vyjádřít svůj obrovský dík Avocode, celému našemu týmu a všem kdo se snažili naše večery udělat zajímavými, pohodlnými a takovými, že přijdeš domů a řekneš si: "Kámo, dneska jsem byl na přednášce a měli jsme tam hustý materiály, zajímavé lidi a dokonce jsem se tam i najedl!" :-D | |
Taky bych chtěl moc poděkovat posledním přednášejícím z kurzu o Reactu - Vojtovi Trantovi a Petrovi Brzkovi. Velký dík za to, že jejich chuť pomoct ostatním opravdu stála za to. Nechtěli ani korunu a připravili celkem 20 hodin vý |
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
/* eslint quotes: ["double", "single"] */ | |
import chai, { expect } from 'chai' | |
const createRegex = (str) => { | |
return `^${ | |
str | |
.replace(/\/+/g, '/') | |
.replace(/:.+?(\/|$)/g, (pattern, g1) => { | |
return `(\\d+)${g1}` | |
}) |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>PHP a JS</title> | |
</head> | |
<body> | |
<h1>Aplikačka</h1> | |
<div id="app"></div> | |
</body> |
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
FB událost: | |
POZOR: Registrace na workshop probíhá přes EventBrite! Zde: <!! odkaz> | |
Třídílná série přednášek od lektorů - Petr Brzek, Jiří Vyhnálek a Vojta Tranta. | |
Každý lektor má na starosti jednu tématickou část - základy a filozofie - Vojta Tranta (@Avocode), React prakticky Petr Brzek (founder @Avocode), asynchronní kód a state management Jiří Vyhnálek (@Microsoft CZ). | |
Tato část kurzu už bude konečně o Reactu - Konečně React! |
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 createApiComponent = (requestFn, initialState = {}) => (component) => { | |
return class extends React.Component { | |
state = { loading: false, ...initialState } | |
componentDidMount() { | |
this.setState({ loading: true }) | |
requestFn() | |
.then(apiResult => { this.setState({ apiResult, loading: false }) }) | |
.catch(apiError => { this.setState({ apiError, loading: false }) }) | |
} |
NewerOlder