Skip to content

Commit

Permalink
Merge branch 'master' into api/synthetic-event
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 authored Mar 31, 2020
2 parents af0538f + 7811263 commit 5f06ebd
Show file tree
Hide file tree
Showing 74 changed files with 7,331 additions and 6,456 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:8
- image: circleci/node:12
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- dependencies-{{ checksum "yarn.lock" }}
- run:
name: Install
command: yarn install --pure-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/carbon
lts/erbium
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repo contains the source code and documentation powering [reactjs.org](http
### Prerequisites

1. Git
1. Node: any 8.x version starting with 8.4.0 or greater
1. Node: any 12.x version starting with v12.0.0 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A fork of the repo (for any contributions)
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
Expand Down Expand Up @@ -36,7 +36,7 @@ The documentation is divided into several sections with a different tone and pur

### Make the change

1. Follow the "Running locally" instructions
1. Follow the ["Running locally"](#running-locally) instructions
1. Save the files and check in the browser
1. Changes to React components in `src` will hot-reload
1. Changes to markdown files in `content` will hot-reload
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2013-06-19-community-roundup-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Since the launch we have received a lot of feedback and are actively working on

[Andrew Greig](http://www.andrewgreig.com/) made a blog post that gives a high level description of what React is.

> I have been using Facebooks recently released JavaScript framework called React.js for the last few days and have managed to obtain a rather high level understanding of how it works and formed a good perspective on how it fits in to the entire javascript framework ecosystem.
> I have been using Facebook's recently released JavaScript framework called React.js for the last few days and have managed to obtain a rather high level understanding of how it works and formed a good perspective on how it fits in to the entire javascript framework ecosystem.
>
> Basically, React is not an MVC framework. It is not a replacement for Backbone or Knockout or Angular, instead it is designed to work with existing frameworks and help extend their functionality.
>
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2015-03-26-introducing-react-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ For more details, see [Tom Occhino's post on the Facebook Engineering blog](http
>
> *It's worth noting that we're not chasing “write once, run anywhere.” Different platforms have different looks, feels, and capabilities, and as such, we should still be developing discrete apps for each platform, but the same set of engineers should be able to build applications for whatever platform they choose, without needing to learn a fundamentally different set of technologies for each. We call this approach “learn once, write anywhere.”*
To learn more, visit the [React Native website](https://facebook.github.io/react-native/).
To learn more, visit the [React Native website](https://reactnative.dev/).
2 changes: 1 addition & 1 deletion content/blog/2015-05-01-graphql-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "GraphQL Introduction"
author: [schrockn]
---

At the React.js conference in late January 2015, we revealed our next major technology in the React family: [Relay](http://facebook.github.io/react/blog/2015/02/20/introducing-relay-and-graphql.html).
At the React.js conference in late January 2015, we revealed our next major technology in the React family: [Relay](/blog/2015/02/20/introducing-relay-and-graphql.html).

Relay is a new way of structuring client applications that co-locates data-fetching requirements and React components. Instead of placing data fetching logic in some other part of the client application – or embedding this logic in a custom endpoint on the server – we instead co-locate a *declarative* data-fetching specification alongside the React component. The language of this declarative specification is GraphQL.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ React will ask the `Form` component what element tree it returns, given those `p
}
```
This is a part of the process that React calls [reconciliation](/docs/reconciliation.html) which starts when you call [`ReactDOM.render()`](/docs/top-level-api.html#reactdom.render) or [`setState()`](/docs/component-api.html#setstate). By the end of the reconciliation, React knows the result DOM tree, and a renderer like `react-dom` or `react-native` applies the minimal set of changes necessary to update the DOM nodes (or the platform-specific views in case of React Native).
This is a part of the process that React calls [reconciliation](/docs/reconciliation.html) which starts when you call [`ReactDOM.render()`](/docs/top-level-api.html#reactdom.render) or [`setState()`](/docs/component-api.html#setstate). By the end of the reconciliation, React knows the resulting DOM tree, and a renderer like `react-dom` or `react-native` applies the minimal set of changes necessary to update the DOM nodes (or the platform-specific views in case of React Native).
This gradual refining process is also the reason React apps are easy to optimize. If some parts of your component tree become too large for React to visit efficiently, you can tell it to [skip this “refining” and diffing certain parts of the tree if the relevant props have not changed](/docs/advanced-performance.html). It is very fast to calculate whether the props have changed if they are immutable, so React and immutability work great together, and can provide great optimizations with the minimal effort.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Problems arise when any of these constraints are changed. This typically comes i

A common misconception is that `getDerivedStateFromProps` and `componentWillReceiveProps` are only called when props "change". These lifecycles are called any time a parent component rerenders, regardless of whether the props are "different" from before. Because of this, it has always been unsafe to _unconditionally_ override state using either of these lifecycles. **Doing so will cause state updates to be lost.**

Let’s consider an example to demonstrate the problem. Here is a `EmailInput` component that "mirrors" an email prop in state:
Let’s consider an example to demonstrate the problem. Here is an `EmailInput` component that "mirrors" an email prop in state:
```js
class EmailInput extends Component {
state = { email: this.props.email };
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2018-11-13-react-conf-recap.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ On the morning of Day 2, Andrew Clark and Brian Vaughn presented Concurrent Rend

<iframe width="560" height="315" src="https://www.youtube.com/embed/UcqRXTriUVI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

In the afternoon, Parashuram N spoke in detail about React Native’s New Architecture, a long-term project that the React Native team has been working on over the past year and [announced in June](https://facebook.github.io/react-native/blog/2018/06/14/state-of-react-native-2018). We’re really excited about the potential of this project to improve performance, simplify interoperability with other libraries, and set a strong foundation for the future of React Native.
In the afternoon, Parashuram N spoke in detail about React Native’s New Architecture, a long-term project that the React Native team has been working on over the past year and [announced in June](https://reactnative.dev/blog/2018/06/14/state-of-react-native-2018). We’re really excited about the potential of this project to improve performance, simplify interoperability with other libraries, and set a strong foundation for the future of React Native.

Now that the conference is over, all 28 conference talks are [available to stream online](https://www.youtube.com/playlist?list=PLPxbbTqCLbGE5AihOSExAa4wUM-P42EIJ). There are tons of great ones from both days. We can’t wait until next year!
2 changes: 1 addition & 1 deletion content/blog/2018-11-27-react-16-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Hooks represent our vision for the future of React. They solve both problems tha

### React 16.x (~Q2 2019): The One with Concurrent Mode {#react-16x-q2-2019-the-one-with-concurrent-mode}

*Concurrent Mode* lets React apps be more responsive by rendering component trees without blocking the main thread. It is opt-in and allows React to interrupt a long-running render (for example, rendering a new feed story) to handle a high-priority event (for example, text input or hover). Concurrent Mode also improves the user experience of Suspense by skipping unnecessary loading states on fast connections.
*Concurrent Mode* lets React apps be more responsive by rendering component trees without blocking the main thread. It is opt-in and allows React to interrupt a long-running render (for example, rendering a news feed story) to handle a high-priority event (for example, text input or hover). Concurrent Mode also improves the user experience of Suspense by skipping unnecessary loading states on fast connections.

>Note
>
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2019-02-23-is-react-translated-yet.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Creating the [sync script](https://github.com/reactjs/reactjs.org-translation/bl

The problem was finding a place for the bot to run. I'm a frontend developer for a reason -- Heroku and its ilk are alien to me and *endlessly* frustrating. In fact, until this past Tuesday, I was running the script by hand on my local machine!

The biggest challenge was space. Each fork of the repo is around 100MB -- which takes minutes to clone on my local machine. We have *32* forks, and the free tiers or most deployment platforms I checked limited you to 512MB of storage.
The biggest challenge was space. Each fork of the repo is around 100MB -- which takes minutes to clone on my local machine. We have *32* forks, and the free tiers of most deployment platforms I checked limited you to 512MB of storage.

After lots of notepad calculations, I found a solution: delete each repo once we've finished the script and limit the concurrency of `sync` scripts that run at once to be within the storage requirements. Luckily, Heroku dynos have a much faster Internet connection and are able to clone even the React repo quickly.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2019-08-08-react-v16.9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ These estimates were too optimistic, and we've needed to adjust them.

**tldr:** We shipped Hooks on time, but we're regrouping Concurrent Mode and Suspense for Data Fetching into a single release that we intend to release later this year.

In February, we [shipped a stable 16.8 release](/blog/2019/02/06/react-v16.8.0.html) including React Hooks, with React Native support coming [a month later](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059). However, we underestimated the follow-up work for this release, including the lint rules, developer tools, examples, and more documentation. This shifted the timeline by a few months.
In February, we [shipped a stable 16.8 release](/blog/2019/02/06/react-v16.8.0.html) including React Hooks, with React Native support coming [a month later](https://reactnative.dev/blog/2019/03/12/releasing-react-native-059). However, we underestimated the follow-up work for this release, including the lint rules, developer tools, examples, and more documentation. This shifted the timeline by a few months.

Now that React Hooks are rolled out, the work on Concurrent Mode and Suspense for Data Fetching is in full swing. The [new Facebook website that's currently in active development](https://twitter.com/facebook/status/1123322299418124289) is built on top of these features. Testing them with real code helped discover and address many issues before they can affect the open source users. Some of these fixes involved an internal redesign of these features, which has also caused the timeline to slip.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2019-10-22-react-release-channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Releases in Next are published with the `next` tag on npm. Versions are generate

The Next channel is designed to support integration testing between React and other projects.

All changes to React go through extensive internal testing before they are released to the public. However, there are a myriad of environments and configurations used throughout the React ecosystem, and it's not possible for us to test against every single one.
All changes to React go through extensive internal testing before they are released to the public. However, there are myriad environments and configurations used throughout the React ecosystem, and it's not possible for us to test against every single one.

If you're the author of a third party React framework, library, developer tool, or similar infrastructure-type project, you can help us keep React stable for your users and the entire React community by periodically running your test suite against the most recent changes. If you're interested, follow these steps:

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2020-02-26-react-v16.13.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Warning: Cannot update a component from inside the function body of a different

**This warning will help you find application bugs caused by unintentional state changes.** In the rare case that you intentionally want to change the state of another component as a result of rendering, you can wrap the `setState` call into `useEffect`.

### Warnings for conflicting style rules
### Warnings for conflicting style rules {#warnings-for-conflicting-style-rules}

When dynamically applying a `style` that contains longhand and shorthand versions of CSS properties, particular combinations of updates can cause inconsistent styling. For example:

Expand Down
34 changes: 14 additions & 20 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### React Barcamp Cologne 2020 {#react-barcamp-cologne-2020}
February 1-2, 2020 in Cologne, Germany

[Website](https://react-barcamp.de/) - [Twitter](https://twitter.com/ReactBarcamp) - [Facebook](https://www.facebook.com/reactbarcamp)

### ReactConf AU 2020 {#reactconfau}
February 27 & 28, 2020 in Sydney, Australia

[Website](https://reactconfau.com/) - [Twitter](https://twitter.com/reactconfau) - [Facebook](https://www.facebook.com/reactconfau) - [Instagram](https://www.instagram.com/reactconfau/)

### ReactConf Japan 2020 {#reactconfjp-2020}
March 21, 2020 in Tokyo, Japan

[Website](https://reactconf.jp/) - [Twitter](https://twitter.com/reactjp)

### Reactathon 2020 {#reactathon-2020}
March 30 - 31, 2020 in San Francisco, CA

Expand All @@ -52,11 +37,6 @@ May 1, 2020. Streamed online on YouTube.

[Website](https://www.bytesized.xyz) - [Twitter](https://twitter.com/bytesizedcode) - [YouTube](https://www.youtube.com/channel/UC046lFvJZhiwSRWsoH8SFjg)

### render(ATL) 2020 {#render-atlanta-2020}
May 4-6, 2020. Atlanta, GA, USA.

[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/)

### ReactEurope 2020 {#reacteurope-2020}
May 14-15, 2020 in Paris, France

Expand Down Expand Up @@ -92,6 +72,11 @@ July 29-30, 2020. Portland, Oregon, USA.

[Website](https://infinite.red/ChainReactConf) - [Twitter](https://twitter.com/ChainReactConf)

### render(ATL) 2020 {#render-atlanta-2020}
August 24-26, 2020. Atlanta, GA, USA.

[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl)

### ComponentsConf 2020 {#components20}
September 1, 2020 in Melbourne, Australia

Expand Down Expand Up @@ -511,3 +496,12 @@ December 6, 2019 in Berlin, Germany

[Website](https://reactday.berlin) - [Twitter](https://twitter.com/reactdayberlin) - [Facebook](https://www.facebook.com/reactdayberlin/) - [Videos](https://www.youtube.com/reactdayberlin)

### React Barcamp Cologne 2020 {#react-barcamp-cologne-2020}
February 1-2, 2020 in Cologne, Germany

[Website](https://react-barcamp.de/) - [Twitter](https://twitter.com/ReactBarcamp) - [Facebook](https://www.facebook.com/reactbarcamp)

### ReactConf AU 2020 {#reactconfau}
February 27 & 28, 2020 in Sydney, Australia

[Website](https://reactconfau.com/) - [Twitter](https://twitter.com/reactconfau) - [Facebook](https://www.facebook.com/reactconfau) - [Instagram](https://www.instagram.com/reactconfau/)
1 change: 1 addition & 0 deletions content/community/meetups.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
* [Chennai](https://www.meetup.com/React-Chennai/)
* [Delhi NCR](https://www.meetup.com/React-Delhi-NCR/)
* [Jaipur](https://www.meetup.com/JaipurJS-Developer-Meetup/)
* [Pune](https://www.meetup.com/ReactJS-and-Friends/)

## Indonesia {#indonesia}
* [Indonesia](https://www.meetup.com/reactindonesia/)
Expand Down
6 changes: 3 additions & 3 deletions content/docs/addons-animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The [`ReactTransitionGroup`](#low-level-api-reacttransitiongroup) add-on compone
**Importing**

```javascript
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; // ES6
var ReactCSSTransitionGroup = require('react-addons-css-transition-group'); // ES5 with npm
import ReactCSSTransitionGroup from 'react-transition-group'; // ES6
var ReactCSSTransitionGroup = require('react-transition-group'); // ES5 with npm
```

```javascript{31-36}
Expand Down Expand Up @@ -199,7 +199,7 @@ render() {
In the example above, we rendered a list of items into `ReactCSSTransitionGroup`. However, the children of `ReactCSSTransitionGroup` can also be one or zero items. This makes it possible to animate a single element entering or leaving. Similarly, you can animate a new element replacing the current element. For example, we can implement a simple image carousel like this:

```javascript{10}
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import ReactCSSTransitionGroup from 'react-transition-group';
function ImageCarousel(props) {
return (
Expand Down
Loading

0 comments on commit 5f06ebd

Please sign in to comment.