From 7fd8a8dfd8b5ef639fac7f30cd4a014ae5e9dd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9liton=20Nordt?= Date: Sun, 28 Oct 2018 16:40:21 -0300 Subject: [PATCH 01/10] Fix typo in Hooks FAQ --- content/docs/hooks-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md index ca01054c1..395a33baf 100644 --- a/content/docs/hooks-faq.md +++ b/content/docs/hooks-faq.md @@ -407,7 +407,7 @@ function TodosApp() { } ``` -Any child in the tree inside `TodosApp` can read use the `dispatch` function to pass actions up to `TodosApp`: +Any child in the tree inside `TodosApp` can use the `dispatch` function to pass actions up to `TodosApp`: ```js{2,3} function DeepChild(props) { From e3f43f5bdd57dbc910aefa08e997ae8c8b82e3dc Mon Sep 17 00:00:00 2001 From: Romain Linsolas Date: Thu, 14 Feb 2019 01:24:52 +0100 Subject: [PATCH 02/10] Fix shallow renderer link on test utils page --- content/docs/addons-test-utils.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/addons-test-utils.md b/content/docs/addons-test-utils.md index bbbf5755c..20aae91b5 100644 --- a/content/docs/addons-test-utils.md +++ b/content/docs/addons-test-utils.md @@ -139,7 +139,7 @@ Pass a mocked component module to this method to augment it with useful methods > Note: > -> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/test-utils.html#shallow-rendering) or [`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead. +> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/shallow-renderer.html) or [`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead. * * * From cd7bfe7b2faebe72d7bd2500926fb7e9f0913c77 Mon Sep 17 00:00:00 2001 From: Farhad Yasir Date: Mon, 18 Feb 2019 11:55:05 +1100 Subject: [PATCH 03/10] fix(renderExamplePlaceholder): renderExamplePlaceholder removed as its never used --- src/pages/index.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index bc2d732fd..f52619ce2 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -310,13 +310,6 @@ Home.propTypes = { }).isRequired, }; -function renderExamplePlaceholder(containerId) { - ReactDOM.render( -

Loading code example...

, - document.getElementById(containerId), - ); -} - const CtaItem = ({children, primary = false}) => (
Date: Mon, 11 Feb 2019 20:27:14 -0200 Subject: [PATCH 04/10] It solves a broken link on HOC doc --- content/docs/higher-order-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/higher-order-components.md b/content/docs/higher-order-components.md index 4d15f5b97..55cd60914 100644 --- a/content/docs/higher-order-components.md +++ b/content/docs/higher-order-components.md @@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent); Whereas a component transforms props into UI, a higher-order component transforms a component into another component. -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). +HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reduxjs/react-redux/blob/master/docs/api/connect.md#connect) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html). In this document, we'll discuss why higher-order components are useful, and how to write your own. From aaefe69287eed6da8fbc8c9dee7a418dce265579 Mon Sep 17 00:00:00 2001 From: Vasiliy Vanchuk Date: Tue, 19 Feb 2019 15:27:43 +0400 Subject: [PATCH 05/10] Fix command for initializing tsconfig Project dependency doesn't add itself it global PATH. So call `tsc` will work either with globally installed typescript, or from npm/yarn script. --- content/docs/static-type-checking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md index b01b92fec..fd55d8bb6 100644 --- a/content/docs/static-type-checking.md +++ b/content/docs/static-type-checking.md @@ -219,7 +219,7 @@ Congrats! You've installed the latest version of TypeScript into your project. I The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run: ```bash -tsc --init +npx tsc --init ``` Looking at the now generated `tsconfig.json`, you can see that there are many options you can use to configure the compiler. For a detailed description of all the options, check [here](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html). From d4f7a2c2d9fcdf984526b1f43f04815361c02bf2 Mon Sep 17 00:00:00 2001 From: Deniz Susman Date: Tue, 19 Feb 2019 15:32:42 +0300 Subject: [PATCH 06/10] Fix typo in blog "collocation" instead of "colocation". --- content/blog/2015-08-11-relay-technical-preview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2015-08-11-relay-technical-preview.md b/content/blog/2015-08-11-relay-technical-preview.md index c574ccce2..65b1ac5fb 100644 --- a/content/blog/2015-08-11-relay-technical-preview.md +++ b/content/blog/2015-08-11-relay-technical-preview.md @@ -13,7 +13,7 @@ While React simplified the process of developing complex user-interfaces, it lef Declarative data-fetching means that Relay applications specify *what* data they need, not *how* to fetch that data. Just as React uses a description of the desired UI to manage view updates, Relay uses a data description in the form of GraphQL queries. Given these descriptions, Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates views as data changes. -Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This colocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data. +Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This collocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data. Relay is in use at Facebook in production apps, and we're using it more and more because *Relay lets developers focus on their products and move fast*. It's working for us and we'd like to share it with the community. From 67167457763fac15d0429eb443e8870179b3fe60 Mon Sep 17 00:00:00 2001 From: Vasiliy Vanchuk Date: Tue, 19 Feb 2019 18:42:05 +0400 Subject: [PATCH 07/10] Update static-type-checking.md --- content/docs/static-type-checking.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md index fd55d8bb6..553ea6354 100644 --- a/content/docs/static-type-checking.md +++ b/content/docs/static-type-checking.md @@ -216,9 +216,17 @@ Congrats! You've installed the latest version of TypeScript into your project. I ``` ### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler} -The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run: +The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file: -```bash +If you use [Yarn](https://yarnpkg.com/), run: + +```shell +yarn run tsc --init +``` + +If you use [npm](https://www.npmjs.com/), run: + +```shell npx tsc --init ``` From 2819a0f0ebee17646128edb4832aedd094051597 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 19 Feb 2019 17:50:35 +0000 Subject: [PATCH 08/10] Remove the "experimental" wording from Hooks intro (#1709) --- content/docs/hooks-intro.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/docs/hooks-intro.md b/content/docs/hooks-intro.md index b4cefcfbe..9470d614d 100644 --- a/content/docs/hooks-intro.md +++ b/content/docs/hooks-intro.md @@ -97,9 +97,7 @@ We know that React developers are focused on shipping products and don't have ti We also understand that the bar for adding a new primitive to React is extremely high. For curious readers, we have prepared a [detailed RFC](https://github.com/reactjs/rfcs/pull/68) that dives into motivation with more details, and provides extra perspective on the specific design decisions and related prior art. -**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** We are sharing this experimental API to get early feedback from those in the community who are interested in shaping the future of React — and we will iterate on Hooks in the open. - -Finally, there is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative. +**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** There is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative. We intend for Hooks to cover all existing use cases for classes, but **we will keep supporting class components for the foreseeable future.** At Facebook, we have tens of thousands of components written as classes, and we have absolutely no plans to rewrite them. Instead, we are starting to use Hooks in the new code side by side with classes. From 0569c21da09d4c15b8cb1e749bde85db146bbb39 Mon Sep 17 00:00:00 2001 From: "Juan J. Alvarez" Date: Tue, 19 Feb 2019 10:49:19 -0800 Subject: [PATCH 09/10] Added Reactathon 2019 to conferences.md (#1695) --- content/community/conferences.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/community/conferences.md b/content/community/conferences.md index 78f868d7f..c10cdb607 100644 --- a/content/community/conferences.md +++ b/content/community/conferences.md @@ -16,6 +16,11 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c January 31, 2019 in Tehran, Iran [Website](http://reactiran.com) - [Instagram](https://www.instagram.com/reactiran/) +### Reactathon 2019 {#reactathon-2019} +March 30-31, 2019 in San Francisco, USA + +[Website](https://www.reactathon.com/) - [Twitter](https://twitter.com/reactathon) + ### App.js Conf 2019 {#appjs-conf-2019} April 4-5, 2019 in Kraków, Poland From 0948bf553eac307d48622e4275953baf83dc1bcf Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 20 Feb 2019 01:48:07 +0300 Subject: [PATCH 10/10] Update static-type-checking.md --- content/docs/static-type-checking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md index 553ea6354..0f459aa84 100644 --- a/content/docs/static-type-checking.md +++ b/content/docs/static-type-checking.md @@ -220,13 +220,13 @@ The compiler is of no help to us until we tell it what to do. In TypeScript, the If you use [Yarn](https://yarnpkg.com/), run: -```shell +```bash yarn run tsc --init ``` If you use [npm](https://www.npmjs.com/), run: -```shell +```bash npx tsc --init ```