Skip to content
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

TRACKING: master → feature/redux #1084

Closed
wants to merge 108 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
fcd98f1
Add redux and react-redux dependencies
langpavel Apr 16, 2016
69fb34f
Redux + React-redux
langpavel Apr 16, 2016
ced8a93
Merge branch 'langpavel-redux' into feature/redux
koistya Apr 18, 2016
64ab5ce
Merge branch 'master' into feature/redux
koistya Apr 21, 2016
cf55d63
Merge branch 'master' into feature/redux
langpavel Apr 23, 2016
6b40eb7
Merge pull request #618 from langpavel/feature/redux
koistya Apr 24, 2016
51ffc76
Merge branch 'master' into feature/redux
koistya Apr 28, 2016
4a73920
Merge branch 'master' into feature/redux
koistya May 3, 2016
2ea534e
Add support for helpers in redux-thunk actions (#650)
langpavel May 17, 2016
9ecbcbc
[feature/redux] Fix: Redux helpers client configuration (#663)
langpavel May 18, 2016
7f7e9a2
Merge branch 'master' into feature/redux
langpavel May 18, 2016
02393af
Merge branch 'master' into feature/redux
koistya May 19, 2016
cf07117
Enhanced Redux Logger
langpavel Jun 5, 2016
f0efee8
Add eslint global-require exception (#703)
EdikoCruz Jun 16, 2016
9b59658
Merge branch 'master' into feature/redux
salttis Jun 20, 2016
5cc2777
fix conflicts
salttis Jun 20, 2016
8aab2f3
Updated some packages
salttis Jun 23, 2016
3ba4ecc
ignore react/jsx-no-bind
salttis Jun 28, 2016
19ac41a
Updated packages
salttis Jun 28, 2016
178cc8e
include store in server side context
salttis Jun 28, 2016
0dd8363
Merge branch 'master' into feature/redux
langpavel Jul 10, 2016
cb0eb7f
[feature/redux] merge master (#733)
langpavel Jul 10, 2016
888088c
Revert "[feature/redux] merge master (#733)"
langpavel Jul 10, 2016
96bf03b
Merge branch 'feature-redux-merge-master' into feature/redux
langpavel Jul 10, 2016
6b34329
Merge branch 'better-redux-logger' into feature/redux
langpavel Jul 10, 2016
64a7582
Merge branch 'feature/redux' of https://github.com/3bola/react-starte…
langpavel Jul 14, 2016
06cb583
Merge branch '3bola-feature/redux' into feature/redux
langpavel Jul 14, 2016
c9d5d70
Merge branch 'master' into feature/redux
langpavel Jul 18, 2016
f749a6d
Merge branch 'master' into feature/redux
langpavel Jul 27, 2016
1c74e77
Merge branch 'master' into feature/redux
langpavel Jul 29, 2016
d4dc11f
Isomorphic redirect
langpavel Jul 29, 2016
173f9e1
Merge pull request #776 from langpavel/isomorphic-redirect
langpavel Jul 31, 2016
b16bc90
Exclude `navigate` from <a> in Link component [closes #788]
langpavel Aug 4, 2016
9195ea1
Merge pull request #791 from langpavel/fix-788
langpavel Aug 4, 2016
d75f2fa
Merge branch 'master' into feature/redux
langpavel Aug 4, 2016
f6bc091
Merge branch 'master' into feature/redux
langpavel Aug 7, 2016
9534fd4
Merge branch 'master' into feature/redux
langpavel Sep 2, 2016
01f0914
Fix lint errors
langpavel Sep 2, 2016
4a10ea6
Merge branch 'master' into feature/redux
langpavel Sep 4, 2016
453c5a9
Merge branch 'master' into feature/redux
langpavel Sep 6, 2016
7889588
Merge branch 'master' into feature/redux
langpavel Sep 12, 2016
13e3397
A bare minimum Redux integration
koistya Sep 27, 2016
7d577ed
Merge remote-tracking branch 'koistya/redux' into new-redux
langpavel Oct 3, 2016
b9d6aa7
Merge branch 'feature/redux' into new-redux
langpavel Oct 3, 2016
76cb841
Merge pull request #894 from langpavel/new-redux
langpavel Oct 3, 2016
f0dd23e
[feature/redux] Pass context to router
langpavel Oct 5, 2016
44f6176
Merge branch 'master' into feature/redux
langpavel Oct 9, 2016
ba46426
Add empty user reducer and clean import react.children (cherry-picked)
keremciu Oct 12, 2016
785b44e
Merge branch 'master' into feature/redux
langpavel Oct 17, 2016
51aed5f
fixed test for required store props in App Layout
granda Oct 17, 2016
188bafb
fixed eslint errors about semicolon and absolute import priority
granda Oct 17, 2016
3f8a98d
Merge branch 'master' into feature/redux
langpavel Oct 21, 2016
7f347c4
Merge branch 'master' into feature/redux
langpavel Oct 21, 2016
c4809b1
Merge branch 'fix/redux-test' of https://github.com/granda/react-star…
langpavel Oct 22, 2016
7bd938e
Merge branch 'granda-fix/redux-test' into feature/redux
langpavel Oct 22, 2016
3250501
Better test code
langpavel Oct 22, 2016
eb1011a
Merge branch 'master' into feature/redux
langpavel Oct 25, 2016
d65beba
Pin redux packages versions
langpavel Oct 25, 2016
f15b19a
Merge branch 'master' into feature/redux
langpavel Nov 2, 2016
f1304cf
fix lint
langpavel Nov 2, 2016
b7bd543
Merge branch 'master' into feature/redux
langpavel Nov 10, 2016
91546e5
Merge branch 'master' into feature/redux
langpavel Nov 11, 2016
d4c1693
Merge branch 'master' into feature/redux
langpavel Dec 1, 2016
2589743
Merge master to feature-redux
langpavel Dec 10, 2016
835b7ca
Merge branch 'master' into feature/redux
langpavel Dec 15, 2016
111fbdd
Merge pull request #1040 from kriasoft/master
langpavel Dec 20, 2016
8b14ce9
Merge branch 'master' into feature/redux
awesomejerry Jan 11, 2017
be51d42
Merge pull request #1077 from awesomejerry/feature/redux
langpavel Jan 12, 2017
0269d46
Merge branch 'master' into feature/redux
langpavel Feb 1, 2017
43671da
No await on return
langpavel Feb 1, 2017
2db64df
Merge branch 'master' into feature/redux
langpavel Feb 11, 2017
4455ecb
Merge branch 'master' into feature/redux
langpavel Feb 13, 2017
1a7599a
Merge branch 'master' into feature/redux
langpavel Feb 14, 2017
6fcb193
Merge branch 'master' into feature/redux
langpavel Feb 16, 2017
e432077
Merge branch 'master' into feature/redux
langpavel Feb 27, 2017
bb36158
Merge branch 'master' into feature/redux
langpavel Mar 12, 2017
cdb874f
Merge branch 'master' into feature/redux
langpavel Mar 16, 2017
fd46817
Custom Redux logger on server
langpavel Mar 25, 2017
04fd6b0
Upgrade redux-logger, update packages
langpavel Mar 31, 2017
9aa7619
Merge branch 'master' into feature/redux
langpavel Apr 10, 2017
8185c13
Merge branch 'master' into feature/redux
langpavel Apr 16, 2017
f448fbe
Merge branch 'master' into feature/redux
langpavel Apr 29, 2017
fe90e5e
Merge branch 'master' into feature/redux
langpavel May 23, 2017
cc4bd69
Merge branch 'master' into feature/redux
langpavel May 25, 2017
0b88fdf
Merge branch 'master' into feature/redux
langpavel Jun 28, 2017
59ae7af
Merge branch 'master' into feature/redux
langpavel Jun 30, 2017
3f5eadd
Merge branch 'master' into feature/redux
langpavel Jul 1, 2017
65b1142
Merge branch 'master' into feature/redux
langpavel Jul 10, 2017
eb73d72
Merge branch 'master' into feature/redux
langpavel Jul 14, 2017
2fe5f87
Merge branch 'master' into feature/redux
langpavel Aug 11, 2017
e065640
Merge branch 'master' into feature/redux
langpavel Aug 22, 2017
87271da
Merge branch 'master' into feature/redux
langpavel Aug 22, 2017
e18f7d9
Merge branch 'master' into feature/redux
langpavel Jan 5, 2018
26173d3
Minimize differences between master and feature/redux
langpavel Jan 7, 2018
703472f
Merge branch 'master' into feature/redux
langpavel Jan 8, 2018
a857017
Merge branch 'master' into feature/redux
langpavel Jan 14, 2018
ccd18a3
Merge branch 'master' into feature/redux
langpavel Jan 23, 2018
74c989c
Change a reference url for redux store fix (#1202)
zirho Jan 31, 2018
ebdd710
Merge branch 'master' into feature/redux
langpavel Jan 31, 2018
d61a501
Merge branch 'master' into feature/redux
langpavel Feb 8, 2018
c51416c
chore(redux): use redux-devtools-extension package
langpavel Feb 8, 2018
efea26d
Merge branch 'master' into feature/redux
langpavel Mar 24, 2018
10fa71b
chore: yarn upgrade
langpavel Mar 24, 2018
d8df5bd
chore: pick docs from master branch - decrease diversity
langpavel Mar 24, 2018
9309fc7
Merge branch 'master' into feature/redux
langpavel Mar 24, 2018
5787cec
docs: Redux Actions
langpavel Mar 24, 2018
020e25b
Merge branch 'master' into feature/redux
langpavel Mar 25, 2018
2d16e49
[feature/redux] Merge master in feature/redux (#1877)
patsa Feb 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ module.exports = {
'prettier/react',
],

plugins: ['flowtype', 'css-modules', 'prettier'],
plugins: ['flowtype', 'css-modules', 'prettier', 'jest'],

globals: {
__DEV__: true,
},

env: {
browser: true,
jest: true,
},

rules: {
Expand Down Expand Up @@ -87,6 +88,9 @@ module.exports = {
// ESLint plugin for prettier formatting
// https://github.com/prettier/eslint-plugin-prettier
'prettier/prettier': 'error',

'react/forbid-prop-types': 'off',
'react/destructuring-assignment': 'off',
},

settings: {
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: node_js
node_js:
- 'stable'
- '12'
- '10'
- '8'
- '6'
env:
- CXX=g++-4.8
addons:
Expand All @@ -11,6 +12,7 @@ addons:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
cache: yarn
script:
- yarn lint
- yarn test
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ All notable changes to this project will be documented in this file.
- Move page / screen components into the `src/routes` folder along with the routing information for them (BREAKING CHANGE). [6553936](https://github.com/kriasoft/react-starter-kit/commit/6553936e693e24a8ac6178f4962af15e0ea87dfd)

### [v0.5.1]

> 2016-03-02

- Remove `Html` React component in favor of compiled Jade templates (`src/views`) (BREAKING CHANGE). [e188388](https://github.com/kriasoft/react-starter-kit/commit/e188388f87069cdc7d501b385d6b0e46c98fed60)
- Add global error handling in Node.js/Express app. [e188388](https://github.com/kriasoft/react-starter-kit/commit/e188388f87069cdc7d501b385d6b0e46c98fed60)
- Add support for Markdown and HTML for static pages. [#469](https://github.com/kriasoft/react-starter-kit/pull/469), [#477](https://github.com/kriasoft/react-starter-kit/pull/477)

### [v0.5.0]

> 2016-02-27

- Replace RESTful API endpoint (`src/api`) with GraphQL (`src/data`)
Expand All @@ -54,6 +56,7 @@ All notable changes to this project will be documented in this file.
- Add `CHANGELOG.md` file with a list of notable changes to this project

### [v0.4.1]

> 2015-10-04

- Replace React Hot Loader (deprecated) with React Transform
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ files right from GitHub website as described [here](https://help.github.com/arti

Before opening an issue, please:

* Check the [Getting Started](https://github.com/kriasoft/react-starter-kit/blob/master/docs/getting-started.md) guide.
* Search the [issue tracker](https://github.com/kriasoft/react-starter-kit/issues) to make sure
- Check the [Getting Started](https://github.com/kriasoft/react-starter-kit/blob/master/docs/getting-started.md) guide.
- Search the [issue tracker](https://github.com/kriasoft/react-starter-kit/issues) to make sure
your issue hasn’t already been reported.
* If your issue sounds more like a question, please post it on StackOverflow.com instead with the
- If your issue sounds more like a question, please post it on StackOverflow.com instead with the
tag [react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit).

### Pull Requests

Before you submit a [pull request](https://help.github.com/articles/using-pull-requests/) from your
forked repo, check that it meets these guidelines:

* If the pull request adds functionality, the docs should be updated as part of the same PR.
* Create a separate PR for each small feature or bug fix.
* [Squash](http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git)
- If the pull request adds functionality, the docs should be updated as part of the same PR.
- Create a separate PR for each small feature or bug fix.
- [Squash](http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git)
your commits into one for each PR.
* Run `yarn test` to make sure that your code style is OK and there are no any regression bugs.
* When contributing to an opt-in feature, apply the `[feature/...]` tag as a prefix to your PR title
- Run `yarn test` to make sure that your code style is OK and there are no any regression bugs.
- When contributing to an opt-in feature, apply the `[feature/...]` tag as a prefix to your PR title

#### Style Guide

Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8.10.0-alpine
FROM node:8.16.2-alpine

# Set a working directory
WORKDIR /usr/src/app
Expand All @@ -12,7 +12,14 @@ RUN yarn install --production --no-progress
# Copy application files
COPY ./build .

# Set permissions for "node" user
RUN chown -R node:node /usr/src/app
RUN chmod 755 /usr/src/app

# Run the container under "node" user by default
USER node

# Set NODE_ENV env variable to "production" for faster expressjs
ENV NODE_ENV production

CMD [ "node", "server.js" ]
74 changes: 34 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,36 @@ and newcomers to the industry.
<sup><a href="https://x-team.com/join/?utm_source=reactstarterkit&utm_medium=github-link&utm_campaign=reactstarterkit-june">Hiring</a></sup>
</p>


### Getting Started

* Follow the [getting started guide](./docs/getting-started.md) to download and run the project
([Node.js](https://nodejs.org/) >= 6.5)
* Check the [code recipes](./docs/recipes) used in this boilerplate, or share yours

- Follow the [getting started guide](./docs/getting-started.md) to download and run the project
([Node.js](https://nodejs.org/) >= 8.16.2)
- Check the [code recipes](./docs/recipes) used in this boilerplate, or share yours

### Customization

The `master` branch of React Starter Kit doesn't include a Flux implementation or any other
advanced integrations. Nevertheless, we have some integrations available to you in *feature*
advanced integrations. Nevertheless, we have some integrations available to you in _feature_
branches that you can use either as a reference or merge into your project:

* [feature/redux](https://github.com/kriasoft/react-starter-kit/tree/feature/redux) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1084))
— isomorphic Redux by [Pavel Lang](https://github.com/langpavel)
(see [how to integrate Redux](./docs/recipes/how-to-integrate-redux.md)) (based on `master`)
* [feature/apollo](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1147))
— isomorphic Apollo Client by [Pavel Lang](https://github.com/langpavel)
(see [Tracking PR #1147](https://github.com/kriasoft/react-starter-kit/pull/1147)) (based on `feature/redux`)
* [feature/react-intl](https://github.com/kriasoft/react-starter-kit/tree/feature/react-intl) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1135))
— isomorphic Redux and React Intl by [Pavel Lang](https://github.com/langpavel)
(see [how to integrate React Intl](./docs/recipes/how-to-integrate-react-intl.md)) (based on `feature/apollo`)
- [feature/redux](https://github.com/kriasoft/react-starter-kit/tree/feature/redux) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1084))
— isomorphic Redux by [Pavel Lang](https://github.com/langpavel)
(see [how to integrate Redux](./docs/recipes/how-to-integrate-redux.md)) (based on `master`)
- [feature/apollo](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1147))
— isomorphic Apollo Client by [Pavel Lang](https://github.com/langpavel)
(see [Tracking PR #1147](https://github.com/kriasoft/react-starter-kit/pull/1147)) (based on `feature/redux`)
- [feature/react-intl](https://github.com/kriasoft/react-starter-kit/tree/feature/react-intl) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1135))
— isomorphic Redux and React Intl by [Pavel Lang](https://github.com/langpavel)
(see [how to integrate React Intl](./docs/recipes/how-to-integrate-react-intl.md)) (based on `feature/apollo`)
- [feature/apollo-pure](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo-pure) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1666))
— Apollo devtools and TypeScript integration by [piglovesyou](https://github.com/piglovesyou) (based on `master`)

You can see status of most reasonable merge combination as [PRs labeled as `TRACKING`](https://github.com/kriasoft/react-starter-kit/labels/TRACKING)

If you think that any of these features should be on `master`, or vice versa, some features should
removed from the `master` branch, please [let us know](https://gitter.im/kriasoft/react-starter-kit).
We love your feedback!


### Comparison

<table width="100%">
Expand Down Expand Up @@ -149,7 +148,6 @@ We love your feedback!
</tr>
</table>


### Backers

♥ React Starter Kit? Help us keep it alive by donating funds to cover project
Expand Down Expand Up @@ -178,45 +176,40 @@ expenses via [OpenCollective](https://opencollective.com/react-starter-kit) or
<img src="https://opencollective.com/static/images/become_backer.svg" width="64" height="64" alt="">
</a>


### How to Contribute

Anyone and everyone is welcome to [contribute](CONTRIBUTING.md) to this project. The best way to
start is by checking our [open issues](https://github.com/kriasoft/react-starter-kit/issues),
[submit a new issues](https://github.com/kriasoft/react-starter-kit/issues/new?labels=bug) or
[submit a new issue](https://github.com/kriasoft/react-starter-kit/issues/new?labels=bug) or
[feature request](https://github.com/kriasoft/react-starter-kit/issues/new?labels=enhancement),
participate in discussions, upvote or downvote the issues you like or dislike, send [pull
requests](CONTRIBUTING.md#pull-requests).


### Learn More

* [Getting Started with React.js](http://facebook.github.io/react/)
* [Getting Started with GraphQL and Relay](https://quip.com/oLxzA1gTsJsE)
* [React.js Questions on StackOverflow](http://stackoverflow.com/questions/tagged/reactjs)
* [React.js Discussion Board](https://discuss.reactjs.org/)
* [Flux Architecture for Building User Interfaces](http://facebook.github.io/flux/)
* [Enzyme — JavaScript Testing utilities for React](http://airbnb.io/enzyme/)
* [Flow — A static type checker for JavaScript](http://flowtype.org/)
* [The Future of React](https://github.com/reactjs/react-future)
* [Learn ES6](https://babeljs.io/docs/learn-es6/), [ES6 Features](https://github.com/lukehoban/es6features#readme)

- [Getting Started with React.js](http://facebook.github.io/react/)
- [Getting Started with GraphQL and Relay](https://quip.com/oLxzA1gTsJsE)
- [React.js Questions on StackOverflow](http://stackoverflow.com/questions/tagged/reactjs)
- [React.js Discussion Board](https://discuss.reactjs.org/)
- [Flux Architecture for Building User Interfaces](http://facebook.github.io/flux/)
- [Enzyme — JavaScript Testing utilities for React](http://airbnb.io/enzyme/)
- [Flow — A static type checker for JavaScript](http://flowtype.org/)
- [The Future of React](https://github.com/reactjs/react-future)
- [Learn ES6](https://babeljs.io/docs/learn-es6/), [ES6 Features](https://github.com/lukehoban/es6features#readme)

### Related Projects

* [GraphQL Starter Kit](https://github.com/kriasoft/graphql-starter-kit) — Boilerplate for building data APIs with Node.js, JavaScript (via Babel) and GraphQL
* [Membership Database](https://github.com/membership/membership.db) — SQL schema boilerplate for user accounts, profiles, roles, and auth claims
* [Babel Starter Kit](https://github.com/kriasoft/babel-starter-kit) — Boilerplate for authoring JavaScript/React.js libraries

- [GraphQL Starter Kit](https://github.com/kriasoft/graphql-starter-kit) — Boilerplate for building data APIs with Node.js, JavaScript (via Babel) and GraphQL
- [Membership Database](https://github.com/membership/membership.db) — SQL schema boilerplate for user accounts, profiles, roles, and auth claims
- [Babel Starter Kit](https://github.com/kriasoft/babel-starter-kit) — Boilerplate for authoring JavaScript/React.js libraries

### Support

* [#react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit) on Stack Overflow — Questions and answers
* [#react-starter-kit](https://gitter.im/kriasoft/react-starter-kit) on Gitter — Watch announcements, share ideas and feedback
* [GitHub issues](https://github.com/kriasoft/react-starter-kit/issues), or [Scrum board](https://waffle.io/kriasoft/react-starter-kit) — File issues, send feature requests
* [appear.in/react](https://appear.in/react) — Open hours! Exchange ideas and experiences (React, GraphQL, startups and pet projects)
* [@koistya](https://twitter.com/koistya) on [Codementor](https://www.codementor.io/koistya), or [Skype](http://hatscripts.com/addskype?koistya) — Private consulting

- [#react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit) on Stack Overflow — Questions and answers
- [#react-starter-kit](https://gitter.im/kriasoft/react-starter-kit) on Gitter — Watch announcements, share ideas and feedback
- [GitHub issues](https://github.com/kriasoft/react-starter-kit/issues), or [Scrum board](https://waffle.io/kriasoft/react-starter-kit) — File issues, send feature requests
- [appear.in/react](https://appear.in/react) — Open hours! Exchange ideas and experiences (React, GraphQL, startups and pet projects)
- [@koistya](https://twitter.com/koistya) on [Codementor](https://www.codementor.io/koistya), or [Skype](http://hatscripts.com/addskype?koistya) — Private consulting

### License

Expand All @@ -226,6 +219,7 @@ file. The documentation to the project is licensed under the
[CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/) license.

---

Made with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya)) and [contributors](https://github.com/kriasoft/react-starter-kit/graphs/contributors)

[rsk]: https://www.reactstarterkit.com
Expand Down
5 changes: 4 additions & 1 deletion .babelrc.js → babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ module.exports = {
},
},
],
'@babel/preset-stage-2',
'@babel/preset-flow',
'@babel/preset-react',
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import',
],
ignore: ['node_modules', 'build'],
};
26 changes: 13 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

### General

* [Getting Started](./getting-started.md)
* [React Style Guide](./react-style-guide.md)
* [How to configure text editors and IDEs](./how-to-configure-text-editors.md)
* [Data fetching with WHATWG Fetch](./data-fetching.md)
* [Testing your application](./testing-your-application.md)
- [Getting Started](./getting-started.md)
- [React Style Guide](./react-style-guide.md)
- [How to configure text editors and IDEs](./how-to-configure-text-editors.md)
- [Data fetching with WHATWG Fetch](./data-fetching.md)
- [Testing your application](./testing-your-application.md)

### Questions

* [Which module bundler should I use?](https://github.com/kriasoft/react-starter-kit/issues/3)
* [Which Flux implementation should I use?](https://github.com/kriasoft/react-starter-kit/issues/22)
- [Which module bundler should I use?](https://github.com/kriasoft/react-starter-kit/issues/3)
- [Which Flux implementation should I use?](https://github.com/kriasoft/react-starter-kit/issues/22)

### Recipes

* [How to Implement Routing and Navigation](./recipes/how-to-implement-routing.md)
* [How to Integrate Redux](./recipes/how-to-integrate-redux.md)
* [How to Integrate React Intl](./recipes/how-to-integrate-react-intl.md)
* [How to Integrate Disqus](./recipes/how-to-integrate-disqus.md)
* [How to Use Sass/SCSS](./recipes/how-to-use-sass.md)
* [How to Configure Facebook Login](./recipes/how-to-configure-facebook-login.md)
- [How to Implement Routing and Navigation](./recipes/how-to-implement-routing.md)
- [How to Integrate Redux](./recipes/how-to-integrate-redux.md)
- [How to Integrate React Intl](./recipes/how-to-integrate-react-intl.md)
- [How to Integrate Disqus](./recipes/how-to-integrate-disqus.md)
- [How to Use Sass/SCSS](./recipes/how-to-use-sass.md)
- [How to Configure Facebook Login](./recipes/how-to-configure-facebook-login.md)
26 changes: 17 additions & 9 deletions docs/data-fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,28 @@ React components as follows:
#### React Component

```js
class Post extends React.Component {
static contextTypes = { fetch: PropTypes.func.isRequired };
handleDelete = (event) => {
event.preventDefault();
const id = event.target.dataset['id'];
this.context.fetch(`/api/posts/${id}`, { method: 'DELETE' }).then(...);
};
render() { ... }
import {useContext} from 'react';
import ApplicationContext from '../ApplicationContext';

function Post() {
const {context} = useContext(ApplicationContext);
return (
<div>
...
<a onClick={(event) => {
event.preventDefault();
const id = event.target.dataset['id'];
// Use context.fetch to make it work in both server-side and client-side
context.fetch(`/api/posts/${id}`, { method: 'DELETE' }).then(...);
}}>Delete</a>
</div>
);
}
```

#### Related articles

* [That's so fetch!](https://jakearchibald.com/2015/thats-so-fetch/) by
- [That's so fetch!](https://jakearchibald.com/2015/thats-so-fetch/) by
[Jake Archibald](https://twitter.com/jaffathecake)

[fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
Expand Down
18 changes: 9 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

### Requirements

* Mac OS X, Windows, or Linux
* [Yarn](https://yarnpkg.com/) package + [Node.js](https://nodejs.org/) v6.5 or
- Mac OS X, Windows, or Linux
- [Yarn](https://yarnpkg.com/) package + [Node.js](https://nodejs.org/) v8.16.2 or
newer
* Text editor or IDE pre-configured with React/JSX/Flow/ESlint
- Text editor or IDE pre-configured with React/JSX/Flow/ESlint
([learn more](./how-to-configure-text-editors.md))

### Directory Layout
Expand Down Expand Up @@ -99,7 +99,7 @@ compiled output files are not optimized and minimized in this case. You can use
(production) mode:

```shell
$ yarn start -- --release
$ yarn start --release
```

_NOTE: double dashes are required_
Expand All @@ -115,13 +115,13 @@ $ yarn run build
or, for a production build:

```shell
$ yarn run build -- --release
$ yarn run build --release
```

or, for a production docker build:

```shell
$ yarn run build -- --release --docker
$ yarn run build --release --docker
```

_NOTE: double dashes are required_
Expand All @@ -139,11 +139,11 @@ $ yarn run lint
To launch unit tests:

```shell
$ yarn run test # Run unit tests with Mocha
$ yarn run test:watch # Launch unit test runner and start watching for changes
$ yarn run test # Run unit tests with Jest
$ yarn run test-watch # Launch unit test runner and start watching for changes
```

By default, [Mocha](https://mochajs.org/) test runner is looking for test files
By default, [Jest](https://jestjs.io/) test runner is looking for test files
matching the `src/**/*.test.js` pattern. Take a look at
`src/components/Layout/Layout.test.js` as an example.

Expand Down
Loading