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. 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 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. * * * 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. diff --git a/content/docs/hooks-intro.md b/content/docs/hooks-intro.md index 5a3aa500c..c406d2ab4 100644 --- a/content/docs/hooks-intro.md +++ b/content/docs/hooks-intro.md @@ -97,9 +97,7 @@ function Example() { Мы также понимаем, что планка для добавления новых примитивов в React очень высока. Поэтому для любопытных читателей мы подготовили [подробный RFC](https://github.com/reactjs/rfcs/pull/68), в котором можно найти больше информации о технических аспектах выбранного дизайна. -**Важно понимать, что хуки работают рядом с существущим кодом, поэтому вы можете внедрять их постепенно.** Мы делимся этим API, чтобы получить раннюю обратную связь от тех, кто заинтересован в формировании будущего React. Вся разработка происходит в открытую. - -Наконец, нет спешки переходить на хуки. Мы рекомендуем избегать любых «больших переписываний», особенно для существующих, сложных классовых компонентов. Вам потребуется немного изменить мировоззрение, чтобы начать «мыслить хуками». По нашему опыту, лучше всего сначала попрактиковаться использовать хуки в новых и некритичных компонентах и убедиться, что все в вашей команде чувствуют себя комфортно с ними. После того, как вы попробуете, не стесняйтесь [отправить нам свой отзыв](https://github.com/facebook/react/issues/new), позитивный или негативный. +**Важно понимать, что хуки работают рядом с существущим кодом, поэтому вы можете внедрять их постепенно.** Нет спешки переходить на хуки. Мы рекомендуем избегать любых «больших переписываний», особенно для существующих, сложных классовых компонентов. Вам потребуется немного изменить мировоззрение, чтобы начать «мыслить хуками». По нашему опыту, лучше всего сначала попрактиковаться использовать хуки в новых и некритичных компонентах и убедиться, что все в вашей команде чувствуют себя комфортно с ними. После того, как вы попробуете, не стесняйтесь [отправить нам свой отзыв](https://github.com/facebook/react/issues/new), позитивный или негативный. Мы намерены охватить все возможные варианты использования классов в хуках, но **мы всё ещё будем поддерживать классовые компоненты в обозримом будущем.** В Facebook десятки тысяч компонентов, написанных в виде классов, и у нас нет абсолютно никаких планов их переписывать. Вместо этого мы начинаем использовать хуки в новом коде параллельно с классами. diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md index b01b92fec..0f459aa84 100644 --- a/content/docs/static-type-checking.md +++ b/content/docs/static-type-checking.md @@ -216,10 +216,18 @@ 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: + +If you use [Yarn](https://yarnpkg.com/), run: + +```bash +yarn run tsc --init +``` + +If you use [npm](https://www.npmjs.com/), 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). diff --git a/src/pages/index.js b/src/pages/index.js index c1ebb6ae5..4da1bb4c5 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -311,13 +311,6 @@ Home.propTypes = { }).isRequired, }; -function renderExamplePlaceholder(containerId) { - ReactDOM.render( -