Skip to content

Commit 7a957cc

Browse files
authored
Merge pull request #260 from reactjs/sync-d2ade76c
Sync with reactjs.org @ d2ade76
2 parents 551c5ac + 5ce17f3 commit 7a957cc

15 files changed

+92
-8
lines changed

content/blog/2018-11-27-react-16-roadmap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function App() {
175175
// provide Suspense integrations with similar APIs.
176176
```
177177

178-
There is no official documentation for how to fetch data with Suspense yet, but you can find some early information in [this talk](https://youtu.be/ByBPyMBTzM0?t=1312) and [this small demo](https://github.com/facebook/react/tree/master/fixtures/unstable-async/suspense). We'll write documentation for React Cache (and how to write your own Suspense-compatible library) closer to this React release, but if you're curious, you can find its very early source code [here](https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js).
178+
There is no official documentation for how to fetch data with Suspense yet, but you can find some early information in [this talk](https://youtu.be/ByBPyMBTzM0?t=1312) and [this small demo](https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md#suspense-toggle). We'll write documentation for React Cache (and how to write your own Suspense-compatible library) closer to this React release, but if you're curious, you can find its very early source code [here](https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js).
179179

180180
The low-level Suspense mechanism (suspending rendering and showing a fallback) is expected to be stable even in React 16.6. We've used it for code splitting in production for months. However, the higher-level APIs for data fetching are very unstable. React Cache is rapidly changing, and will change at least a few more times. There are some low-level APIs that are [missing](https://github.com/reactjs/rfcs/pull/89) for a good higher-level API to be possible. We don't recommend using React Cache anywhere except very early experiments. Note that React Cache itself isn't strictly tied to React releases, but the current alphas lack basic features as cache invalidation, and you'll run into a wall very soon. We expect to have something usable with this React release.
181181

content/community/articles.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ permalink: community/articles.html
1616
- [The Hands-On Guide to Learning React Hooks](https://www.telerik.com/kendo-react-ui/react-hooks-guide/) - Eric Bishard's step-by-step guide to learning React Hooks.
1717
- [How to Use the React Profiler Component to Measure Render Performance](https://medium.com/@adamhenson/how-to-use-the-react-profiler-component-to-measure-performance-improvements-from-hooks-d43b7092d7a8) - Adam Henson's article exemplifying a use case for `<React.Profiler />`.
1818
- [Thinking in React Hooks](https://wattenberger.com/blog/react-hooks) - Amelia Wattenberger's provides visualizations and highlighting the mindset change needed switching from classes to functional components + hooks.
19+
- [React/Redux Links](https://github.com/markerikson/react-redux-links) - Curated tutorial and resource links by Mark Erikson collected on React, Redux, ES6, and more. Very helpful for all kind of developers because of it's categorised content.

content/community/conferences.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1212

1313
## Upcoming Conferences {#upcoming-conferences}
1414

15+
### React Summit 2019 {#reactsummit2019}
16+
November 30, 2019 in Lagos, Nigeria
17+
18+
[Website](https://reactsummit2019.splashthat.com) -[Twitter](https://twitter.com/react_summit)
19+
1520
### React Conf 2019 {#react-conf-2019}
1621
October 24-25, 2019 in Henderson, Nevada USA
1722

@@ -37,6 +42,11 @@ February 27 & 28, 2020 in Sydney, Australia
3742

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

45+
### React Summit Amsterdam 2020 {#react-summit-2020}
46+
April 15-17, 2020 in Amsterdam, The Netherlands
47+
48+
[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
49+
4050
### Render-Atlanta 2020 {#render-atlanta-2020}
4151
May 4-6, 2020. Atlanta, GA, USA.
4252

@@ -85,12 +95,12 @@ November 2-4 in Bratislava, Slovakia
8595
### React.js Conf 2016 {#reactjs-conf-2016}
8696
February 22 & 23 in San Francisco, CA
8797

88-
[Website](http://conf.reactjs.com/) - [Schedule](http://conf.reactjs.com/schedule.html) - [Videos](https://www.youtube.com/playlist?list=PLb0IAmt7-GS0M8Q95RIc2lOM6nc77q1IY)
98+
[Website](http://conf2016.reactjs.org/) - [Schedule](http://conf2016.reactjs.org/schedule.html) - [Videos](https://www.youtube.com/playlist?list=PLb0IAmt7-GS0M8Q95RIc2lOM6nc77q1IY)
8999

90100
### React Amsterdam 2016 {#react-amsterdam-2016}
91101
April 16 in Amsterdam, The Netherlands
92102

93-
[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
103+
[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
94104

95105
### ReactEurope 2016 {#reacteurope-2016}
96106
June 2 & 3 in Paris, France
@@ -140,7 +150,7 @@ March 28th at the [QEII Centre, London](http://qeiicentre.london/)
140150
### React Amsterdam 2017 {#react-amsterdam-2017}
141151
April 21st in Amsterdam, The Netherlands
142152

143-
[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
153+
[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
144154

145155
### ReactEurope 2017 {#reacteurope-2017}
146156
May 18th & 19th in Paris, France
@@ -245,7 +255,7 @@ March 31 in Kiev, Ukraine
245255
### React Amsterdam 2018 {#react-amsterdam-2018}
246256
April 13 in Amsterdam, The Netherlands
247257

248-
[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam)
258+
[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam)
249259

250260
### React Finland 2018 {#react-finland-2018}
251261
April 24-26 in Helsinki, Finland
@@ -350,7 +360,7 @@ April 4-5, 2019 in Kraków, Poland
350360
### React Amsterdam 2019 {#react-amsterdam-2019}
351361
April 12, 2019 in Amsterdam, The Netherlands
352362

353-
[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
363+
[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
354364

355365
### React Finland 2019 {#react-finland-2019}
356366
April 24-26 in Helsinki, Finland

content/community/meetups.md

+3
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
102102

103103
## Philippines {#philippines}
104104
* [Manila](https://www.meetup.com/reactjs-developers-manila/)
105+
* [Manila - ReactJS PH](https://www.meetup.com/ReactJS-Philippines/)
105106

106107
## Poland {#poland}
107108
* [Warsaw](https://www.meetup.com/React-js-Warsaw/)
@@ -130,6 +131,8 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
130131
* [Austin, TX - ReactJS](https://www.meetup.com/ReactJS-Austin-Meetup/)
131132
* [Boston, MA - ReactJS](https://www.meetup.com/ReactJS-Boston/)
132133
* [Boston, MA - React Native](https://www.meetup.com/Boston-React-Native-Meetup/)
134+
* [Charlotte, NC - ReactJS](https://www.meetup.com/ReactJS-Charlotte/)
135+
* [Charlotte, NC - React Native](https://www.meetup.com/cltreactnative/)
133136
* [Chicago, IL - ReactJS](https://www.meetup.com/React-Chicago/)
134137
* [Columbus, OH - ReactJS](https://www.meetup.com/ReactJS-Columbus-meetup/)
135138
* [Dallas, TX - ReactJS](https://www.meetup.com/ReactDallas/)

content/community/tools-ui-components.md

+1
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ permalink: community/ui-components.html
8282
* **[KendoReact](https://www.telerik.com/kendo-react-ui/)**: UI for React Developers.
8383
* **[Mobiscroll React UI Components](https://mobiscroll.com/react)** Mobile UI Controls for the Productive React Developer.
8484
* **[React UI Toolkit](https://react-ui-tools.com/)**: 115+ professionally maintainted UI components ranging from a robust grid to charts and more. Try for FREE and build React apps faster.
85+
* **[Flatlogic React Admin Templates](https://flatlogic.com/templates/react)** 5+ Paid and Free React Admin templates with a lot of components to speed up web development. No jQuery.

content/docs/hooks-reference.md

+42
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,48 @@ const value = useContext(MyContext);
197197
>
198198
> `useContext(MyContext)` は現在のコンテクストの値を**読み取り**、その変化を購読することしかできません。コンテクストの値を**設定**するために、今後もツリーの上の階層で `<MyContext.Provider>` が必要です。
199199
200+
**Context.Provider と組み合わせて使用する方法**
201+
```js{31-36}
202+
const themes = {
203+
light: {
204+
foreground: "#000000",
205+
background: "#eeeeee"
206+
},
207+
dark: {
208+
foreground: "#ffffff",
209+
background: "#222222"
210+
}
211+
};
212+
213+
const ThemeContext = React.createContext(themes.light);
214+
215+
function App() {
216+
return (
217+
<ThemeContext.Provider value={themes.dark}>
218+
<Toolbar />
219+
</ThemeContext.Provider>
220+
);
221+
}
222+
223+
function Toolbar(props) {
224+
return (
225+
<div>
226+
<ThemedButton />
227+
</div>
228+
);
229+
}
230+
231+
function ThemedButton() {
232+
const theme = useContext(ThemeContext);
233+
234+
return (
235+
<button style={{ background: theme.background, color: theme.foreground }}>
236+
I am styled by theme context!
237+
</button>
238+
);
239+
}
240+
```
241+
この例は[コンテクストのガイド](/docs/context.html)をフック用に変更したものです。コンテクストをいつどのように使うべきかについては同記事を参照してください。
200242

201243
## 追加のフック {#additional-hooks}
202244

content/docs/lifting-state-up.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ state のリフトアップは双方向のバインディング (two-way binding
324324

325325
props もしくは state から作りだす事のできるデータについては、おそらく state に保持すべきではないでしょう。例えば、今回は `celsiusValue``fahrenheitValue` の両方を保存する代わりに、最後に変更された `temperature` と、その値の `scale` のみを保存しています。もう一方の入力の値は常に `render()` メソッド内で計算することができます。これにより元のユーザ入力の精度を全く損なうことなくもう一方の入力フィールドに丸めを適用したり、もう一方の入力フィールドをクリアしたりできます。
326326

327-
UI で何かおかしな箇所があれば、[React Developer Tools](https://github.com/facebook/react-devtools) を使用して props を調査したり state の更新について責任を持っているコンポーネントに辿り着くまでツリーをさかのぼることができます。これによりバグをその原因まで追いかけることができます。
327+
UI で何かおかしな箇所があれば、[React Developer Tools](https://github.com/facebook/react/tree/master/packages/react-devtools) を使用して props を調査したり state の更新について責任を持っているコンポーネントに辿り着くまでツリーをさかのぼることができます。これによりバグをその原因まで追いかけることができます。
328328

329329
<img src="../images/docs/react-devtools-state.gif" alt="Monitoring State in React DevTools" max-width="100%" height="100%">
330330

content/docs/uncontrolled-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: 非制御コンポーネント
44
permalink: docs/uncontrolled-components.html
55
---
66

7-
ほとんどの場合では、フォームの実装には[制御されたコンポーネント](/docs/forms.html)を使用することをお勧めしています。制御されたコンポーネントでは、フォームのデータは React コンポーネントが扱います。非制御コンポーネントはその代替となるものであり、フォームデータを DOM 自身が扱います。
7+
ほとんどの場合では、フォームの実装には[制御されたコンポーネント](/docs/forms.html#controlled-components)を使用することをお勧めしています。制御されたコンポーネントでは、フォームのデータは React コンポーネントが扱います。非制御コンポーネントはその代替となるものであり、フォームデータを DOM 自身が扱います。
88

99
非制御コンポーネントを記述するには、各 state の更新に対してイベントハンドラを書く代わりに、[ref を使用](/docs/refs-and-the-dom.html)して DOM からフォームの値を取得します。
1010

gatsby-config.js

+15
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,20 @@ module.exports = {
160160
},
161161
'gatsby-plugin-react-helmet',
162162
'gatsby-plugin-catch-links',
163+
{
164+
resolve: `gatsby-plugin-manifest`,
165+
options: {
166+
name: 'React Docs',
167+
short_name: 'React', // eg. React [%LANG_CODE%]
168+
// Translators: please change this and two above options (see https://www.gatsbyjs.org/packages/gatsby-plugin-manifest/#feature-configuration---optional)
169+
lang: 'en',
170+
start_url: '/',
171+
background_color: '#20232a',
172+
theme_color: '#20232a',
173+
display: 'standalone',
174+
icon: 'static/logo-512x512.png',
175+
legacy: true,
176+
},
177+
},
163178
],
164179
};

src/components/LayoutFooter/Footer.js

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (
3131
[media.size('sidebarFixed')]: {
3232
paddingTop: 40,
3333
},
34+
'@media print': {
35+
display: 'none',
36+
},
3437
}}>
3538
<Container>
3639
<div

src/components/LayoutHeader/Header.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const Header = ({location}: {location: Location}) => (
2929
width: '100%',
3030
top: 0,
3131
left: 0,
32+
'@media print': {
33+
display: 'none',
34+
},
3235
}}>
3336
<Container>
3437
<div

src/html.js

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export default class HTML extends React.Component {
1919
content="width=device-width, initial-scale=1.0"
2020
/>
2121
<link rel="icon" href="/favicon.ico" />
22+
23+
<meta name="apple-mobile-web-app-capable" content="yes" />
24+
<link rel="apple-touch-icon" href="/logo-180x180.png" />
25+
<meta name="apple-mobile-web-app-title" content="React" />
26+
2227
{this.props.headComponents}
2328
</head>
2429
<body {...this.props.bodyAttributes}>

static/_redirects

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/tips/controlled-input-null-value.html /docs/forms.html#controlled-input-null-value
33
/hooks /docs/hooks-intro.html
44
/tutorial /tutorial/tutorial.html
5+
/your-story https://www.surveymonkey.co.uk/r/MVQV2R9 301

static/logo-180x180.png

9.43 KB
Loading

static/logo-512x512.png

41.4 KB
Loading

0 commit comments

Comments
 (0)