-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize a new HTTP client for each web request #1237
Conversation
Looks similar to one I have on redux branch, definitely better than global import. Have you HoC letting you access fetch in any component? |
Currently, the class MyComponent extends React.Component {
static contextTypes = { fetch: PropTypes.func.isRequired };
handleClick = (event) => {
this.context.fetch('/api/products').then(x => x.json()).then(data => this.setState({ data });
}
render() { ... }
} |
@koistya Do You plan to merge it ? This might be a BC break. |
@phpeek Yes, this is breaking change, but I really like see this discussion again. |
docs/data-fetching.md
Outdated
export const path = '/products'; | ||
export const action = async () => { | ||
export const action = async ({ fetch }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example here is on router. But I believe users are importing fetch on more nested components so HoC implementation and React HoC component withFetch()
which correctly bridge context
will be needed for users.
// Universal HTTP client | ||
fetch: createFetch({ | ||
baseUrl: window.App.apiUrl, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add credentials: 'same-origin'
here?
9d7c5ac
to
6b03906
Compare
@phpeek yes, we need to move the project forward, in all my universal web app projects I had to initialize a new HTTP client object for each web request on the Node.js side. This must be included into the boilerplate project in one way or another. And the remaining updates in this PR is just an attempt to simplify the project structure a little. It shouldn't be hard to merge them into your project, assuming you're using a good Diff and 3-way Merge Tool (GUI). What's your concern with that? |
@langpavel So now how i will use fetch on redux actions? |
@Shadowman4205 Same way as you did. |
@langpavel u mean i will use this way
cause i get an error
18-> is return await fetch(query) where query is url /api/v/..... |
I tried this
and it say i cannot use config on client side.
but i get
|
@Shadowman4205 export function myAction(data) {
return async (dispatch, getState, { client, history, fetch }) => { // see all helpers in src/store/createHelpers.js
dispatch({ type: 'MY_ACTION_START' /* ... */ });
// await fetch(...)
dispatch({ type: 'MY_ACTION_SUCCESS' /* ... */ });
}
} |
@langpavel
|
Ok i had to write all
|
@Shadowman4205 Why you cannot write only |
It looks like we stopped using it in 1ed83b6 (kriasoft#1237).
It looks like we stopped using it in 1ed83b6 (kriasoft#1237).
* Update to webpack-assets-manifest v3.0.0 (#1594) * Update packages (#1595) * chore: Update packages * fix: "Deprecation warning for String based operators" sequelize/sequelize#8417 * Let Yarn handle package.json formatting, not lint-staged (#1614) * Upgrade dependencies for Node v10 compatibility (#1613) * Enable Yarn caching on Travis (#1629) See https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Caching-with-yarn * Remove unused dependency core-js (#1631) It was added in 79e5575 to work around an npm issue, but we instead use yarn as of 78868e6. * Remove unused dependency bluebird (#1630) It looks like we stopped using it in 1ed83b6 (#1237). * Upgrade packages (#1637) * chore: upgrade packages * chore: make babel and jest working after upgrade * Updated tests from Mocha and Chai to Jest (#1624) * Updated from Mocha to Jest Still need to update React-intl * modified tests to jest instead of mocha and chai * left react-intl example the same due to yarn eval * Sets NODE_ENV environment var to `production` when building docker image. (#1173) * Add a line linked to `feature/apollo-pure` branch * small README.md grammar change (#1675) * Upgrade all dependencies including Babel 7 (#1673) * Upgrade all dependencies including Babel 7 1. ncu --upgradeAll 4. Leave "graphql" to be "^13.2.0" that apollo packages depend on 2. Apply patch of "npx babel-upgrade" output 3. Leave only necessary babel plugins 4. Pass "yarn fix" by disabling stricter rules fixes #1654 #1626 #1607 * Also ignore babel config file from webpack.config.js * remove mocha form docs (getting started) (#1729) * fix: support Node 12 (#1730) * Update sqlite3 * Add Ci builds against the latest active LTS (10) * Fix styles error in Home.css and deprecation warnings (#1726) * Fix styles error in Home.css * Fix deprecation warnings * Introduce PostCSS Preset Env (#1733) Fixes #1731 * Change node from 6.5 to 6.9 on README (#1735) * fix: change node from 6.5 to 6.9 * fix: change node 6.5 -> 6.9 on getting-started * describe TypeScript integration in readme (#1745) * Update PR link to feature/apollo-pure (#1748) * Bump sequelize from 4.38.1 to 5.15.1 (#1751) Bumps [sequelize](https://github.com/sequelize/sequelize) from 4.38.1 to 5.15.1. - [Release notes](https://github.com/sequelize/sequelize/releases) - [Commits](sequelize/sequelize@v4.38.1...v5.15.1) Signed-off-by: dependabot[bot] <[email protected]> * Upgrade react, react-dom and isomorphic-style-loader (#1759) * yarn add react@latest react-dom@latest * yarn add isomorphic-style-loader@latest * git cherry-pick 812d8ac With respect I used @mglace 's react-starter-kit folk * change deps versions (adopted higher ones) * include minimum change of react-style-guide.md Fixes #1715 * fix: update react-test-renderer too * Bump webpack-bundle-analyzer from 3.0.2 to 3.3.2 (#1752) Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 3.0.2 to 3.3.2. - [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases) - [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/webpack-bundle-analyzer@v3.0.2...v3.3.2) Signed-off-by: dependabot[bot] <[email protected]> * Bump merge from 1.2.0 to 1.2.1 (#1753) Bumps [merge](https://github.com/yeikos/js.merge) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/yeikos/js.merge/releases) - [Commits](swordev/merge@v1.2.0...v1.2.1) Signed-off-by: dependabot[bot] <[email protected]> * Bump handlebars from 4.0.11 to 4.5.1 (#1754) Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.0.11 to 4.5.1. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/wycats/handlebars.js/blob/v4.5.1/release-notes.md) - [Commits](handlebars-lang/handlebars.js@v4.0.11...v4.5.1) Signed-off-by: dependabot[bot] <[email protected]> * Bump mixin-deep from 1.3.1 to 1.3.2 (#1755) Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2) Signed-off-by: dependabot[bot] <[email protected]> * Bump eslint-utils from 1.3.1 to 1.4.3 (#1756) Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.3. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](mysticatea/eslint-utils@v1.3.1...v1.4.3) Signed-off-by: dependabot[bot] <[email protected]> * Bump url-parse from 1.4.1 to 1.4.7 (#1757) Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.1 to 1.4.7. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](unshiftio/url-parse@1.4.1...1.4.7) Signed-off-by: dependabot[bot] <[email protected]> * Bump lodash.template from 4.4.0 to 4.5.0 (#1758) Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.4.0...4.5.0) Signed-off-by: dependabot[bot] <[email protected]> * Prettier **/*.md (#1761) ``` find . -path ./node_modules -prune -o -name '*.md' | xargs yarn prettier --write ``` * Bump js-yaml from 3.12.0 to 3.13.1 (#1760) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.12.0...3.13.1) Signed-off-by: dependabot[bot] <[email protected]> * [Security] Bump extend from 3.0.1 to 3.0.2 (#1764) Bumps [extend](https://github.com/justmoon/node-extend) from 3.0.1 to 3.0.2. **This update includes a security fix.** - [Release notes](https://github.com/justmoon/node-extend/releases) - [Changelog](https://github.com/justmoon/node-extend/blob/master/CHANGELOG.md) - [Commits](justmoon/node-extend@v3.0.1...v3.0.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Stop supporting Node v6 (#1769) * [Node v6 has already ended being maintained by April 2019](https://nodejs.org/en/blog/release/v6.9.0/) * Add v12 to support all versions of v8+ * Some dependencies stops supporting Node v6 * [eslint-loader](https://travis-ci.org/kriasoft/react-starter-kit/builds/606828978?utm_source=github_status&utm_medium=notification) * [lint-staged](https://travis-ci.org/kriasoft/react-starter-kit/builds/606829247?utm_source=github_status&utm_medium=notification) * By the end of 2019, v8 ends by the way * Bump body-parser from 1.18.3 to 1.19.0 (#1763) Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.18.3 to 1.19.0. - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](expressjs/body-parser@1.18.3...1.19.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump eslint-loader from 2.1.1 to 3.0.2 (#1765) Bumps [eslint-loader](https://github.com/webpack-contrib/eslint-loader) from 2.1.1 to 3.0.2. - [Release notes](https://github.com/webpack-contrib/eslint-loader/releases) - [Changelog](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/eslint-loader@2.1.1...v3.0.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump sequelize from 5.15.1 to 5.21.2 (#1766) Bumps [sequelize](https://github.com/sequelize/sequelize) from 5.15.1 to 5.21.2. - [Release notes](https://github.com/sequelize/sequelize/releases) - [Commits](sequelize/sequelize@v5.15.1...v5.21.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump lint-staged from 7.3.0 to 9.4.2 (#1767) * Bump lint-staged from 7.3.0 to 9.4.2 Bumps [lint-staged](https://github.com/okonet/lint-staged) from 7.3.0 to 9.4.2. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](lint-staged/lint-staged@v7.3.0...v9.4.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * yarn fix with the new lint-staged * Bump jest from 23.6.0 to 24.9.0 (#1768) Bumps [jest](https://github.com/facebook/jest) from 23.6.0 to 24.9.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](jestjs/jest@v23.6.0...v24.9.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump file-loader from 2.0.0 to 4.2.0 (#1771) Bumps [file-loader](https://github.com/webpack-contrib/file-loader) from 2.0.0 to 4.2.0. - [Release notes](https://github.com/webpack-contrib/file-loader/releases) - [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/file-loader@v2.0.0...v4.2.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump rimraf from 2.7.1 to 3.0.0 (#1773) Bumps [rimraf](https://github.com/isaacs/rimraf) from 2.7.1 to 3.0.0. - [Release notes](https://github.com/isaacs/rimraf/releases) - [Changelog](https://github.com/isaacs/rimraf/blob/master/CHANGELOG.md) - [Commits](isaacs/rimraf@v2.7.1...v3.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump raw-loader from 0.5.1 to 3.1.0 (#1772) Bumps [raw-loader](https://github.com/webpack-contrib/raw-loader) from 0.5.1 to 3.1.0. - [Release notes](https://github.com/webpack-contrib/raw-loader/releases) - [Changelog](https://github.com/webpack-contrib/raw-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/raw-loader/commits/v3.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump css-loader from 1.0.1 to 3.2.0 (#1774) * Bump css-loader from 1.0.1 to 3.2.0 Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 1.0.1 to 3.2.0. - [Release notes](https://github.com/webpack-contrib/css-loader/releases) - [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/css-loader@v1.0.1...v3.2.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Update css-loader option structure * Use cssnano inside of the postcss-loader options * Bump front-matter from 2.3.0 to 3.0.2 (#1775) Bumps [front-matter](https://github.com/jxson/front-matter) from 2.3.0 to 3.0.2. - [Release notes](https://github.com/jxson/front-matter/releases) - [Commits](jxson/front-matter@v2.3.0...v3.0.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump markdown-it from 8.4.2 to 10.0.0 (#1776) Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 8.4.2 to 10.0.0. - [Release notes](https://github.com/markdown-it/markdown-it/releases) - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](markdown-it/markdown-it@8.4.2...10.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump stylelint-order from 1.0.0 to 2.2.1 (#1777) Bumps [stylelint-order](https://github.com/hudochenkov/stylelint-order) from 1.0.0 to 2.2.1. - [Release notes](https://github.com/hudochenkov/stylelint-order/releases) - [Changelog](https://github.com/hudochenkov/stylelint-order/blob/master/CHANGELOG.md) - [Commits](hudochenkov/stylelint-order@1.0.0...2.2.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump eslint-plugin-prettier from 2.7.0 to 3.1.1 (#1778) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 2.7.0 to 3.1.1. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v2.7.0...v3.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump husky from 1.3.1 to 3.0.9 (#1779) Bumps [husky](https://github.com/typicode/husky) from 1.3.1 to 3.0.9. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](typicode/husky@v1.3.1...v3.0.9) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump eslint-config-prettier from 3.6.0 to 6.5.0 (#1780) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 3.6.0 to 6.5.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](prettier/eslint-config-prettier@v3.6.0...v6.5.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump serialize-javascript from 1.9.1 to 2.1.0 (#1781) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 1.9.1 to 2.1.0. - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v1.9.1...v2.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/preset-env from 7.6.3 to 7.7.1 (#1782) Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.3 to 7.7.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.3...v7.7.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump babel-jest from 23.6.0 to 24.9.0 (#1783) Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 23.6.0 to 24.9.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v24.9.0/packages/babel-jest) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump flow-bin from 0.81.0 to 0.111.3 (#1784) Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.81.0 to 0.111.3. - [Release notes](https://github.com/flowtype/flow-bin/releases) - [Commits](flow/flow-bin@v0.81.0...v0.111.3) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump passport-facebook from 2.1.1 to 3.0.0 (#1785) Bumps [passport-facebook](https://github.com/jaredhanson/passport-facebook) from 2.1.1 to 3.0.0. - [Release notes](https://github.com/jaredhanson/passport-facebook/releases) - [Commits](jaredhanson/passport-facebook@v2.1.1...v3.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump svg-url-loader from 2.3.3 to 3.0.2 (#1786) Bumps [svg-url-loader](https://github.com/bhovhannes/svg-url-loader) from 2.3.3 to 3.0.2. - [Release notes](https://github.com/bhovhannes/svg-url-loader/releases) - [Commits](bhovhannes/svg-url-loader@v2.3.3...v3.0.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/node from 7.6.3 to 7.7.0 (#1787) Bumps [@babel/node](https://github.com/babel/babel) from 7.6.3 to 7.7.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.3...v7.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump eslint-plugin-flowtype from 2.50.3 to 3.13.0 (#1788) Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 2.50.3 to 3.13.0. - [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases) - [Commits](gajus/eslint-plugin-flowtype@v2.50.3...v3.13.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump null-loader from 0.1.1 to 3.0.0 (#1789) Bumps [null-loader](https://github.com/webpack-contrib/null-loader) from 0.1.1 to 3.0.0. - [Release notes](https://github.com/webpack-contrib/null-loader/releases) - [Changelog](https://github.com/webpack-contrib/null-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/null-loader/commits/v3.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump react-error-overlay from 4.0.1 to 6.0.3 (#1790) Bumps [react-error-overlay](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-error-overlay) from 4.0.1 to 6.0.3. - [Release notes](https://github.com/facebook/create-react-app/releases) - [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md) - [Commits](https://github.com/facebook/create-react-app/commits/[email protected]/packages/react-error-overlay) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/core from 7.6.4 to 7.7.2 (#1792) Bumps [@babel/core](https://github.com/babel/babel) from 7.6.4 to 7.7.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.4...v7.7.2) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump opn-cli from 3.1.0 to 5.0.0 (#1793) Bumps [opn-cli](https://github.com/sindresorhus/open-cli) from 3.1.0 to 5.0.0. - [Release notes](https://github.com/sindresorhus/open-cli/releases) - [Commits](sindresorhus/open-cli@v3.1.0...v5.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/plugin-proposal-class-properties from 7.5.5 to 7.7.0 (#1794) Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel) from 7.5.5 to 7.7.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.5.5...v7.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump express-graphql from 0.6.12 to 0.8.0 (#1795) Bumps [express-graphql](https://github.com/graphql/express-graphql) from 0.6.12 to 0.8.0. - [Release notes](https://github.com/graphql/express-graphql/releases) - [Commits](graphql/express-graphql@v0.6.12...v0.8.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/polyfill from 7.6.0 to 7.7.0 (#1796) Bumps [@babel/polyfill](https://github.com/babel/babel) from 7.6.0 to 7.7.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.0...v7.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump stylelint from 9.10.1 to 10.1.0 (#1798) Bumps [stylelint](https://github.com/stylelint/stylelint) from 9.10.1 to 10.1.0. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md) - [Commits](stylelint/stylelint@9.10.1...10.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump @babel/preset-react from 7.6.3 to 7.7.0 (#1799) Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.6.3 to 7.7.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.3...v7.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump pixrem from 4.0.1 to 5.0.0 (#1800) Bumps [pixrem](https://github.com/robwierzbowski/node-pixrem) from 4.0.1 to 5.0.0. - [Release notes](https://github.com/robwierzbowski/node-pixrem/releases) - [Changelog](https://github.com/robwierzbowski/node-pixrem/blob/master/CHANGELOG.md) - [Commits](https://github.com/robwierzbowski/node-pixrem/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump chokidar from 2.1.8 to 3.3.0 (#1801) Bumps [chokidar](https://github.com/paulmillr/chokidar) from 2.1.8 to 3.3.0. - [Release notes](https://github.com/paulmillr/chokidar/releases) - [Commits](https://github.com/paulmillr/chokidar/commits/3.3.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump prettier from 1.18.2 to 1.19.1 (#1802) Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](prettier/prettier@1.18.2...1.19.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Use Function Components and Hooks (#1797) * Use function component and hooks * update docs * Bump url-loader from 1.1.2 to 2.2.0 (#1805) Bumps [url-loader](https://github.com/webpack-contrib/url-loader) from 1.1.2 to 2.2.0. - [Release notes](https://github.com/webpack-contrib/url-loader/releases) - [Changelog](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/url-loader@v1.1.2...v2.2.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump universal-router from 6.0.0 to 8.3.0 (#1807) Bumps [universal-router](https://github.com/kriasoft/universal-router) from 6.0.0 to 8.3.0. - [Release notes](https://github.com/kriasoft/universal-router/releases) - [Changelog](https://github.com/kriasoft/universal-router/blob/master/CHANGELOG.md) - [Commits](kriasoft/universal-router@v6.0.0...v8.3.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump glob from 7.1.5 to 7.1.6 (#1809) Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.5 to 7.1.6. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md) - [Commits](isaacs/node-glob@v7.1.5...v7.1.6) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump stylelint-config-standard from 18.3.0 to 19.0.0 (#1806) Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 18.3.0 to 19.0.0. - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/master/CHANGELOG.md) - [Commits](stylelint/stylelint-config-standard@18.3.0...19.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump stylelint-order from 2.2.1 to 3.1.1 (#1808) Bumps [stylelint-order](https://github.com/hudochenkov/stylelint-order) from 2.2.1 to 3.1.1. - [Release notes](https://github.com/hudochenkov/stylelint-order/releases) - [Changelog](https://github.com/hudochenkov/stylelint-order/blob/master/CHANGELOG.md) - [Commits](hudochenkov/stylelint-order@2.2.1...3.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump stylelint from 10.1.0 to 11.1.1 (#1810) Bumps [stylelint](https://github.com/stylelint/stylelint) from 10.1.0 to 11.1.1. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md) - [Commits](stylelint/stylelint@10.1.0...11.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump flow-bin from 0.111.3 to 0.112.0 (#1811) Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.111.3 to 0.112.0. - [Release notes](https://github.com/flowtype/flow-bin/releases) - [Commits](flow/flow-bin@v0.111.3...v0.112.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump react-dev-utils from 5.0.3 to 9.1.0 (#1812) Bumps [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) from 5.0.3 to 9.1.0. - [Release notes](https://github.com/facebook/create-react-app/releases) - [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md) - [Commits](https://github.com/facebook/create-react-app/commits/[email protected]/packages/react-dev-utils) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump postcss-calc from 6.0.2 to 7.0.1 (#1813) Bumps [postcss-calc](https://github.com/postcss/postcss-calc) from 6.0.2 to 7.0.1. - [Release notes](https://github.com/postcss/postcss-calc/releases) - [Changelog](https://github.com/postcss/postcss-calc/blob/master/CHANGELOG.md) - [Commits](postcss/postcss-calc@6.0.2...7.0.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump babel-eslint from 9.0.0 to 10.0.3 (#1814) Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 9.0.0 to 10.0.3. - [Release notes](https://github.com/babel/babel-eslint/releases) - [Commits](babel/babel-eslint@v9.0.0...v10.0.3) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump graphql from 0.13.2 to 14.5.8 (#1815) Bumps [graphql](https://github.com/graphql/graphql-js) from 0.13.2 to 14.5.8. - [Release notes](https://github.com/graphql/graphql-js/releases) - [Commits](graphql/graphql-js@v0.13.2...v14.5.8) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump lint-staged from 9.4.2 to 9.4.3 (#1816) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 9.4.2 to 9.4.3. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](lint-staged/lint-staged@v9.4.2...v9.4.3) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump query-string from 6.8.3 to 6.9.0 (#1817) Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.8.3 to 6.9.0. - [Release notes](https://github.com/sindresorhus/query-string/releases) - [Commits](sindresorhus/query-string@v6.8.3...v6.9.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump express-graphql from 0.8.0 to 0.9.0 (#1818) Bumps [express-graphql](https://github.com/graphql/express-graphql) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/graphql/express-graphql/releases) - [Commits](graphql/express-graphql@v0.8.0...v0.9.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump react-dom from 16.11.0 to 16.12.0 (#1819) Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.11.0 to 16.12.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.12.0/packages/react-dom) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump react from 16.11.0 to 16.12.0 (#1820) Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.11.0 to 16.12.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.12.0/packages/react) Signed-off-by: dependabot-preview[bot] <[email protected]> * Bump react-test-renderer from 16.11.0 to 16.12.0 (#1821) Bumps [react-test-renderer](https://github.com/facebook/react/tree/HEAD/packages/react-test-renderer) from 16.11.0 to 16.12.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.12.0/packages/react-test-renderer) Signed-off-by: dependabot-preview[bot] <[email protected]> * Test "yarn start" (#1828) * mod: Use execa * mod: Connect IO to the front process by default * Test "yarn start" * "starts GraphiQL" should fail. Should downgrade express-graphql to 0.8.9. * Downgrade express-graphql for quick fix for #1822 * chore(deps-dev): bump husky from 3.0.9 to 3.1.0 (#1824) Bumps [husky](https://github.com/typicode/husky) from 3.0.9 to 3.1.0. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](typicode/husky@v3.0.9...v3.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump eslint-config-prettier from 6.5.0 to 6.6.0 (#1826) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.5.0 to 6.6.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](prettier/eslint-config-prettier@v6.5.0...v6.6.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump postcss from 7.0.21 to 7.0.23 (#1827) Bumps [postcss](https://github.com/postcss/postcss) from 7.0.21 to 7.0.23. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/master/CHANGELOG.md) - [Commits](postcss/postcss@7.0.21...7.0.23) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump stylelint from 11.1.1 to 12.0.0 (#1825) Bumps [stylelint](https://github.com/stylelint/stylelint) from 11.1.1 to 12.0.0. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md) - [Commits](stylelint/stylelint@11.1.1...12.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Update getting-started.md (#1829) From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded * chore(deps-dev): bump @babel/preset-env from 7.7.1 to 7.7.4 (#1832) Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.7.1 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.7.1...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/core from 7.7.2 to 7.7.4 (#1831) Bumps [@babel/core](https://github.com/babel/babel) from 7.7.2 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.7.2...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/preset-flow from 7.0.0 to 7.7.4 (#1833) Bumps [@babel/preset-flow](https://github.com/babel/babel) from 7.0.0 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.0.0...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/preset-react from 7.7.0 to 7.7.4 (#1834) Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.7.0 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.7.0...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/node from 7.7.0 to 7.7.4 (#1837) Bumps [@babel/node](https://github.com/babel/babel) from 7.7.0 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.7.0...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/plugin-transform-react-inline-elements (#1836) Bumps [@babel/plugin-transform-react-inline-elements](https://github.com/babel/babel) from 7.2.0 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.2.0...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump eslint-config-prettier from 6.6.0 to 6.7.0 (#1830) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.6.0 to 6.7.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump @babel/plugin-proposal-class-properties (#1838) Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel) from 7.7.0 to 7.7.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.7.0...v7.7.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * chore(deps-dev): bump url-loader from 2.2.0 to 2.3.0 (#1839) Bumps [url-loader](https://github.com/webpack-contrib/url-loader) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/webpack-contrib/url-loader/releases) - [Changelog](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/url-loader@v2.2.0...v2.3.0) Signed-off-by: dependabot-preview[bot] <[email protected]> * Use test-watch instead of test:watch (#1851) According to the read me it should go: yarn run test-watch # Run unit tests in watch mode * chore(deps): [security] bump serialize-javascript from 2.1.0 to 2.1.1 (#1866) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 2.1.0 to 2.1.1. **This update includes a security fix.** - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v2.1.0...v2.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> * Update Dockerfile (#1870) * Update node base image to 8.16.2 Update node alpine image to fix the engine "node" incompatible error. * Set permissions for "node" user Fix SequelizeConnectionError: SQLITE_CANTOPEN: unable to open database file Co-authored-by: Maksim Markelov <[email protected]> Co-authored-by: Joseph Frazier <[email protected]> Co-authored-by: Pavel Lang <[email protected]> Co-authored-by: wwendyc <[email protected]> Co-authored-by: Paweł Małolepszy <[email protected]> Co-authored-by: Soichi Takamura <[email protected]> Co-authored-by: Ryan Whitworth <[email protected]> Co-authored-by: Agustina Chaer <[email protected]> Co-authored-by: Alexey Kutalo <[email protected]> Co-authored-by: Fabricio Asfora Lira <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Mаартен - Maarten <[email protected]> Co-authored-by: Milagros Gómez <[email protected]> Co-authored-by: Tan Shuai <[email protected]>
In the context of building isomorphic (universal) apps, it's better to initialize a new HTTP client for each web request during server-side rendering, it unlocks a couple of optimization techniques. This HTTP client can be used now as follows:
Before
After
src/createFetch.js
that provides deafult values forfetch
src/core/fetch
in favor toisomorphic-fetch
fetch
) for each HTTP request, seesrc/server.js
config.js
to have a single export, it's only supposed to be used on the serverHtml
component intowindow.App
variablesrc/core
folder, it's better to put core framework modules (router.js
,history.js
etc.) right into the/src
folder