Skip to content

Commit cf3fcd6

Browse files
authored
Merge branch 'master' into add-docs-for-multiple-select
2 parents ed03a35 + 4a11063 commit cf3fcd6

File tree

245 files changed

+11182
-6588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+11182
-6588
lines changed

.babelrc

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
{
2-
"presets": ['react', 'es2015', 'stage-1'],
3-
"plugins": ['add-module-exports']
4-
}
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"loose": true,
7+
"modules": false,
8+
"useBuiltIns": "usage",
9+
"shippedProposals": true,
10+
"targets": {
11+
"browsers": [">0.25%", "not dead"],
12+
}
13+
}
14+
],
15+
[
16+
"@babel/preset-react",
17+
{
18+
"useBuiltIns": true,
19+
"pragma": "React.createElement",
20+
}
21+
],
22+
"@babel/flow"
23+
],
24+
"plugins": [
25+
[
26+
"@babel/plugin-proposal-class-properties",
27+
{
28+
"loose": true
29+
}
30+
],
31+
"@babel/plugin-syntax-dynamic-import",
32+
"babel-plugin-macros",
33+
[
34+
"@babel/plugin-transform-runtime",
35+
{
36+
"helpers": true,
37+
"regenerator": true
38+
}
39+
]
40+
]
41+
}

.circleci/config.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:latest
5+
- image: circleci/node:8
66
steps:
77
- checkout
88
- restore_cache:
99
keys:
10-
- dependencies-{{ checksum "package.json" }}
11-
# fallback to using the latest cache if no exact match is found
12-
- dependencies-
10+
- dependencies-{{ checksum "yarn.lock" }}
1311
- run:
1412
name: Install
15-
command: yarn install
13+
command: yarn install --pure-lockfile
1614
- save_cache:
1715
paths:
1816
- node_modules
19-
key: dependencies-{{ checksum "package.json" }}
17+
key: dependencies-{{ checksum "yarn.lock" }}
2018
- run:
2119
name: Check Prettier, ESLint, Flow
2220
command: yarn ci-check

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
2+
3+
<!--
4+
15
Thank you for the PR! Contributors like you keep React awesome!
26
37
Please see the Contribution Guide for guidelines:
48
59
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
610
7-
If your PR references an existing issue, please add the issue number below:
11+
If your PR references an existing issue, please add the issue number below
812
9-
#<Issue>
13+
-->

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.idea
44
node_modules
55
public
6+
yarn-error.log

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.4
1+
lts/carbon

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ so that you can understand what actions will and will not be tolerated.
1414

1515
The documentation is divided into sections to cater to different learning styles and use cases. When editing an article, try to match the surrounding text in tone and style. When creating a new article, try to match the tone of the other articles in the same section. Learn about the motivation behind each section below.
1616

17+
**[Installation](https://reactjs.org/docs/getting-started.html)** gives an overview of the docs, and demonstrates two different ways to use it: either as a simple `<script>` tag on the page, or as part of a complex JavaScript toolchain.
18+
1719
**[Tutorial](https://reactjs.org/tutorial/tutorial.html)** is relatively informal, and is designed for people who prefer a hands-on approach to learning, and can tolerate skipping theory in favor of practice. Its goal is to give the reader a feel for a typical React workflow rather than to explain fundamentals in detail. Here we focus on *what* to do and spend less time on *how* or *why* we did it. It is extremely important to do a lot of hand-holding and unambiguously describe every single change. It should be possible for a beginner to mechanically follow every instruction, and still get to a working tic-tac-toe game.
1820

19-
**[Quick Start](https://reactjs.org/docs/hello-world.html)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Quick Start builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Quick Start article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Quick Start also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them. This is, for example, why we introduce elements before components. Resist adding too much detail to Quick Start articles. They intentionally don't cover all corner cases, and focus on establishing firm foundations.
21+
**[Main Concepts](https://reactjs.org/docs/hello-world.html)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Main Concepts builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Main Concepts article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Main Concepts also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them. This is, for example, why we introduce elements before components. Resist adding too much detail to Main Concepts articles. They intentionally don't cover all corner cases, and focus on establishing firm foundations.
2022

2123
**[Advanced Guides](https://reactjs.org/docs/jsx-in-depth.html)** are deep dives into topics that aren't essential for a beginner developer but that everyone bumps into sooner or later. They don't have a specific order, and target more experienced developers. If you have a set of recipes fitting a particular use case, and those recipes aren't opinionated (most React users would agree on them), this is the place to add them.
2224

23-
**[Reference](https://reactjs.org/docs/react-api.html)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Quick Start or Advanced Guides should be mentioned in the reference documentation for the corresponding APIs.
25+
**[Reference](https://reactjs.org/docs/react-api.html)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Main Concepts or Advanced Guides should be mentioned in the reference documentation for the corresponding APIs.
2426

2527
**[Contributing](https://reactjs.org/docs/how-to-contribute.html)** should stay up-to-date and be friendly to relatively experienced developers.
2628

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This repo contains the source code and documentation powering [reactjs.org](http
77
### Prerequisites
88

99
1. Git
10-
1. Node: install version 8.4 or greater
10+
1. Node: any 8.x version starting with 8.4.0 or greater
1111
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
12-
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
1312
1. A fork of the repo (for any contributions)
13+
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
1414

1515
### Installation
1616

@@ -24,6 +24,10 @@ This repo contains the source code and documentation powering [reactjs.org](http
2424

2525
## Contributing
2626

27+
### Guidelines
28+
29+
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.
30+
2731
### Create a branch
2832

2933
1. `git checkout master` from any folder in your local `reactjs.org` repository
@@ -51,6 +55,12 @@ This repo contains the source code and documentation powering [reactjs.org](http
5155
1. Follow GitHub's instructions.
5256
1. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
5357

58+
## Translation
59+
60+
If you are interesting in translating `reactjs.org`, please join the Crowdin.
61+
62+
* [Crowdin - React](https://crowdin.com/project/react)
63+
5464
## Troubleshooting
5565

5666
- `yarn reset` to clear the local cache

content/authors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sebmarkbage:
6969
url: https://twitter.com/sebmarkbage
7070
sophiebits:
7171
name: Sophie Alpert
72-
url: https://sophiealpert.com
72+
url: https://sophiebits.com/
7373
steveluscher:
7474
name: Steven Luscher
7575
url: https://twitter.com/steveluscher

content/blog/2013-06-05-why-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ some pretty cool things with it:
8080
(including IE8) and automatically use
8181
[event delegation](http://davidwalsh.name/event-delegate).
8282

83-
Head on over to https://reactjs.org to check out what we have
83+
Head on over to [https://reactjs.org](https://reactjs.org) to check out what we have
8484
built. Our documentation is geared towards building apps with the framework,
8585
but if you are interested in the nuts and bolts
8686
[get in touch](/support.html) with us!

content/blog/2014-10-14-introducing-react-elements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "Introducing React Elements"
33
author: [sebmarkbage]
4-
redirect_from: "blog/2014/10/14/introducting-react-elements.html"
4+
redirect_from:
5+
- "blog/2014/10/14/introducting-react-elements.html"
56
---
67

78
The upcoming React 0.12 tweaks some APIs to get us close to the final 1.0 API. This release is all about setting us up for making the `ReactElement` type really FAST, [jest unit testing](https://facebook.github.io/jest/) easier, making classes simpler (in preparation for ES6 classes) and better integration with third-party languages!

0 commit comments

Comments
 (0)