Skip to content

Commit 4c3ac61

Browse files
authored
Merge pull request #14 from reactjs/sync-99e97c33
Sync with reactjs.org @ 99e97c3
2 parents bfc06b6 + 9c7a835 commit 4c3ac61

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

content/docs/codebase-overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Its main goals are:
211211
* Ability to return multiple elements from `render()`.
212212
* Better support for error boundaries.
213213

214-
You can read more about React Fiber Architecture [here](https://github.com/acdlite/react-fiber-architecture) and [here](https://blog.ag-grid.com/index.php/2018/11/29/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react). While it has shipped with React 16, the async features are not enabled by default yet.
214+
You can read more about React Fiber Architecture [here](https://github.com/acdlite/react-fiber-architecture) and [here](https://medium.com/react-in-depth/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react-e1c04700ef6e). While it has shipped with React 16, the async features are not enabled by default yet.
215215

216216
Its source code is located in [`packages/react-reconciler`](https://github.com/facebook/react/tree/master/packages/react-reconciler).
217217

content/docs/higher-order-components.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent);
1414

1515
Whereas a component transforms props into UI, a higher-order component transforms a component into another component.
1616

17-
HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html).
17+
HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reactjs/react-redux/blob/master/docs/api/connect.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html).
1818

1919
In this document, we'll discuss why higher-order components are useful, and how to write your own.
2020

@@ -396,4 +396,4 @@ import MyComponent, { someFunction } from './MyComponent.js';
396396

397397
While the convention for higher-order components is to pass through all props to the wrapped component, this does not work for refs. That's because `ref` is not really a prop — like `key`, it's handled specially by React. If you add a ref to an element whose component is the result of a HOC, the ref refers to an instance of the outermost container component, not the wrapped component.
398398

399-
The solution for this problem is to use the `React.forwardRef` API (introduced with React 16.3). [Learn more about it in the forwarding refs section](/docs/forwarding-refs.html).
399+
The solution for this problem is to use the `React.forwardRef` API (introduced with React 16.3). [Learn more about it in the forwarding refs section](/docs/forwarding-refs.html).

content/docs/hooks-overview.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hooks are [backwards-compatible](/docs/hooks-intro.html#no-breaking-changes). Th
1616
1717
**↑↑↑ Each section ends with a yellow box like this.** They link to detailed explanations.
1818

19-
## 📌 State Hook {#-state-hook}
19+
## 📌 State Hook {#state-hook}
2020

2121
This example renders a counter. When you click the button, it increments the value:
2222

@@ -68,7 +68,7 @@ React provides a few built-in Hooks like `useState`. You can also create your ow
6868
>
6969
>You can learn more about the State Hook on a dedicated page: [Using the State Hook](/docs/hooks-state.html).
7070
71-
## ⚡️ Effect Hook {#️-effect-hook}
71+
## ⚡️ Effect Hook {#effect-hook}
7272

7373
You've likely performed data fetching, subscriptions, or manually changing the DOM from React components before. We call these operations "side effects" (or "effects" for short) because they can affect other components and can't be done during rendering.
7474

@@ -159,7 +159,7 @@ Hooks let you organize side effects in a component by what pieces are related (s
159159
>
160160
>You can learn more about `useEffect` on a dedicated page: [Using the Effect Hook](/docs/hooks-effect.html).
161161
162-
## ✌️ Rules of Hooks {#️-rules-of-hooks}
162+
## ✌️ Rules of Hooks {#rules-of-hooks}
163163

164164
Hooks are JavaScript functions, but they impose two additional rules:
165165

@@ -172,7 +172,7 @@ We provide a [linter plugin](https://www.npmjs.com/package/eslint-plugin-react-h
172172
>
173173
>You can learn more about these rules on a dedicated page: [Rules of Hooks](/docs/hooks-rules.html).
174174
175-
## 💡 Building Your Own Hooks {#-building-your-own-hooks}
175+
## 💡 Building Your Own Hooks {#building-your-own-hooks}
176176

177177
Sometimes, we want to reuse some stateful logic between components. Traditionally, there were two popular solutions to this problem: [higher-order components](/docs/higher-order-components.html) and [render props](/docs/render-props.html). Custom Hooks let you do this, but without adding more components to your tree.
178178

@@ -239,7 +239,7 @@ You can write custom Hooks that cover a wide range of use cases like form handli
239239
>
240240
>You can learn more about custom Hooks on a dedicated page: [Building Your Own Hooks](/docs/hooks-custom.html).
241241
242-
## 🔌 Other Hooks {#-other-hooks}
242+
## 🔌 Other Hooks {#other-hooks}
243243

244244
There are a few less commonly used built-in Hooks that you might find useful. For example, [`useContext`](/docs/hooks-reference.html#usecontext) lets you subscribe to React context without introducing nesting:
245245

content/docs/hooks-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function reducer(state, action) {
199199
}
200200
}
201201

202-
function Counter({initialCount}) {
202+
function Counter({initialState}) {
203203
const [state, dispatch] = useReducer(reducer, initialState);
204204
return (
205205
<>

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"normalize.css": "^8.0.0",
4747
"prettier": "^1.7.4",
4848
"prismjs": "^1.15.0",
49-
"react": "16.7.0-alpha.0",
50-
"react-dom": "16.7.0-alpha.0",
49+
"react": "16.8.2",
50+
"react-dom": "16.8.2",
5151
"react-helmet": "^5.2.0",
5252
"react-live": "1.8.0-0",
5353
"remarkable": "^1.7.1",

src/components/LayoutFooter/Footer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (
179179
color: colors.subtleOnDark,
180180
paddingTop: 15,
181181
}}>
182-
Copyright © 2018 Facebook Inc.
182+
Copyright © 2019 Facebook Inc.
183183
</p>
184184
</section>
185185
</div>

src/site-constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// NOTE: We can't just use `location.toString()` because when we are rendering
99
// the SSR part in node.js we won't have a proper location.
1010
const urlRoot = 'https://reactjs.org';
11-
const version = '16.8.1';
11+
const version = '16.8.2';
1212
const babelURL = 'https://unpkg.com/[email protected]/babel.min.js';
1313

1414
export {urlRoot, version, babelURL};

0 commit comments

Comments
 (0)