From 4aa208e59dcd2322188c746c50c983ece65d8ad5 Mon Sep 17 00:00:00 2001 From: "adeel.imran" Date: Thu, 7 Feb 2019 11:42:13 +0500 Subject: [PATCH 1/9] updated grammer --- content/docs/hooks-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md index 6a8d8a664..752f53ef7 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -199,7 +199,7 @@ function reducer(state, action) { } } -function Counter({initialCount}) { +function Counter({initialState}) { const [state, dispatch] = useReducer(reducer, initialState); return ( <> From 4647eeacf07787ac6c4fa041bb06c3e90ea178b7 Mon Sep 17 00:00:00 2001 From: Peng Jie Date: Tue, 12 Feb 2019 11:46:51 +0800 Subject: [PATCH 2/9] docs(hooks): fix break link --- content/docs/hooks-overview.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/docs/hooks-overview.md b/content/docs/hooks-overview.md index fef7de00b..df958dc6d 100644 --- a/content/docs/hooks-overview.md +++ b/content/docs/hooks-overview.md @@ -16,7 +16,7 @@ Hooks are [backwards-compatible](/docs/hooks-intro.html#no-breaking-changes). Th **↑↑↑ Each section ends with a yellow box like this.** They link to detailed explanations. -## 📌 State Hook {#-state-hook} +## 📌 State Hook {#state-hook} This example renders a counter. When you click the button, it increments the value: @@ -68,7 +68,7 @@ React provides a few built-in Hooks like `useState`. You can also create your ow > >You can learn more about the State Hook on a dedicated page: [Using the State Hook](/docs/hooks-state.html). -## ⚡️ Effect Hook {#️-effect-hook} +## ⚡️ Effect Hook {#effect-hook} 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. @@ -159,7 +159,7 @@ Hooks let you organize side effects in a component by what pieces are related (s > >You can learn more about `useEffect` on a dedicated page: [Using the Effect Hook](/docs/hooks-effect.html). -## ✌️ Rules of Hooks {#️-rules-of-hooks} +## ✌️ Rules of Hooks {#rules-of-hooks} Hooks are JavaScript functions, but they impose two additional rules: @@ -172,7 +172,7 @@ We provide a [linter plugin](https://www.npmjs.com/package/eslint-plugin-react-h > >You can learn more about these rules on a dedicated page: [Rules of Hooks](/docs/hooks-rules.html). -## 💡 Building Your Own Hooks {#-building-your-own-hooks} +## 💡 Building Your Own Hooks {#building-your-own-hooks} 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. @@ -239,7 +239,7 @@ You can write custom Hooks that cover a wide range of use cases like form handli > >You can learn more about custom Hooks on a dedicated page: [Building Your Own Hooks](/docs/hooks-custom.html). -## 🔌 Other Hooks {#-other-hooks} +## 🔌 Other Hooks {#other-hooks} 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: From d9f15c2279b57562960417376ef52cdbed6cb4e8 Mon Sep 17 00:00:00 2001 From: Tauan Tathiell Date: Tue, 12 Feb 2019 08:43:04 -0200 Subject: [PATCH 3/9] It changes the fiber link inside codebase overview page --- content/docs/codebase-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/codebase-overview.md b/content/docs/codebase-overview.md index 07b07aa78..206319542 100644 --- a/content/docs/codebase-overview.md +++ b/content/docs/codebase-overview.md @@ -211,7 +211,7 @@ Its main goals are: * Ability to return multiple elements from `render()`. * Better support for error boundaries. -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. +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. Its source code is located in [`packages/react-reconciler`](https://github.com/facebook/react/tree/master/packages/react-reconciler). From bbf2cb1d6ff144665b2a25744ed36b837bbac8b9 Mon Sep 17 00:00:00 2001 From: Nurul Sundarani Date: Wed, 13 Feb 2019 16:08:25 +0530 Subject: [PATCH 4/9] Updated Copyright Year --- src/components/LayoutFooter/Footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LayoutFooter/Footer.js b/src/components/LayoutFooter/Footer.js index bca76aac6..5d91a93a3 100644 --- a/src/components/LayoutFooter/Footer.js +++ b/src/components/LayoutFooter/Footer.js @@ -179,7 +179,7 @@ const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => ( color: colors.subtleOnDark, paddingTop: 15, }}> - Copyright © 2018 Facebook Inc. + Copyright © 2019 Facebook Inc.

From 482ba66ba6ca039bfe4fa919e52959f412160f24 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 13 Feb 2019 14:07:47 +0000 Subject: [PATCH 5/9] Update nav --- content/docs/nav.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/nav.yml b/content/docs/nav.yml index 4d4a7571f..f9c4d3913 100644 --- a/content/docs/nav.yml +++ b/content/docs/nav.yml @@ -34,7 +34,7 @@ - id: composition-vs-inheritance title: Composition vs Inheritance - id: thinking-in-react - title: Thinking In React + title: Философия React - title: Advanced Guides items: - id: accessibility From 6bd4173a4eaf8ba3acf22a0875b15d016a2e07ff Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 13 Feb 2019 14:08:01 +0000 Subject: [PATCH 6/9] Revert "Update nav" This reverts commit 482ba66ba6ca039bfe4fa919e52959f412160f24. --- content/docs/nav.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/nav.yml b/content/docs/nav.yml index f9c4d3913..4d4a7571f 100644 --- a/content/docs/nav.yml +++ b/content/docs/nav.yml @@ -34,7 +34,7 @@ - id: composition-vs-inheritance title: Composition vs Inheritance - id: thinking-in-react - title: Философия React + title: Thinking In React - title: Advanced Guides items: - id: accessibility From b2183584ba8c4c2881cc969c1786e6240e3e7b77 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 14 Feb 2019 19:21:15 +0000 Subject: [PATCH 7/9] Use 16.8.2 (#1686) --- src/site-constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site-constants.js b/src/site-constants.js index a401ab74b..5f217fa00 100644 --- a/src/site-constants.js +++ b/src/site-constants.js @@ -8,7 +8,7 @@ // NOTE: We can't just use `location.toString()` because when we are rendering // the SSR part in node.js we won't have a proper location. const urlRoot = 'https://reactjs.org'; -const version = '16.8.1'; +const version = '16.8.2'; const babelURL = 'https://unpkg.com/babel-standalone@6.26.0/babel.min.js'; export {urlRoot, version, babelURL}; From 6e32ee96b455339f5d6d6e6823394c7b99562090 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 14 Feb 2019 20:31:35 +0000 Subject: [PATCH 8/9] Bump React used by the website (#1687) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0dd174fb9..a18d1d5c8 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "normalize.css": "^8.0.0", "prettier": "^1.7.4", "prismjs": "^1.15.0", - "react": "16.7.0-alpha.0", - "react-dom": "16.7.0-alpha.0", + "react": "16.8.2", + "react-dom": "16.8.2", "react-helmet": "^5.2.0", "react-live": "1.8.0-0", "remarkable": "^1.7.1", From 87f5b7ba905c9fa6b3e0b046d85511550ceca4aa Mon Sep 17 00:00:00 2001 From: Saransh Kataria Date: Thu, 14 Feb 2019 22:24:08 -0800 Subject: [PATCH 9/9] updated broken link on HOC documentation --- content/docs/higher-order-components.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/higher-order-components.md b/content/docs/higher-order-components.md index 63da3ef86..4d15f5b97 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.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/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). In this document, we'll discuss why higher-order components are useful, and how to write your own. @@ -396,4 +396,4 @@ import MyComponent, { someFunction } from './MyComponent.js'; 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. -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). \ No newline at end of file +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).