From 90fa54985fd1165bfa5d56b86c27253c96957b9c Mon Sep 17 00:00:00 2001 From: Ediiik Date: Sat, 20 Jan 2018 23:29:21 +0100 Subject: [PATCH 01/16] Fix typo --- 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 3436c4c43..910dab5ac 100644 --- a/content/docs/static-type-checking.md +++ b/content/docs/static-type-checking.md @@ -2,7 +2,7 @@ id: static-type-checking title: Static Type Checking permalink: docs/static-type-checking.html -prev: typechecking-with-prototypes.html +prev: typechecking-with-proptypes.html next: refs-and-the-dom.html --- From 984abd2539119819608590ef68042ee404b56276 Mon Sep 17 00:00:00 2001 From: Edouard Alvard Date: Mon, 9 Jul 2018 16:34:33 +0200 Subject: [PATCH 02/16] Fix typo --- content/tutorial/tutorial.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 9a0523248..f09dda71c 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -215,7 +215,7 @@ Congratulations! You've just "passed a prop" from a parent Board component to a ### Making an Interactive Component -Let's fill the Square component with an "X" when we click it. +Let's fill the Square component with an "X" when we click it. First, change the button tag that is returned from the Square component's `render()` function to this: ```javascript{4} @@ -605,7 +605,7 @@ We have changed `this.props` to `props` both times it appears. We now need to fix an obvious defect in our tic-tac-toe game: the "O"s cannot be marked on the board. -We'll set the the first move to be "X" by default. We can set this default by modifying the initial state in our Board constructor: +We'll set the first move to be "X" by default. We can set this default by modifying the initial state in our Board constructor: ```javascript{6} class Board extends React.Component { @@ -1003,7 +1003,7 @@ In JavaScript, arrays have a [`map()` method](https://developer.mozilla.org/en-U ```js const numbers = [1, 2, 3]; const doubled = numbers.map(x => x * 2); // [2, 4, 6] -``` +``` Using the `map` method, we can map our history of moves to React elements representing buttons on the screen, and display a list of buttons to "jump" to past moves. From a531a0f89d7d8f227db17cf4c68276f8a16ef5be Mon Sep 17 00:00:00 2001 From: Tushar Khatiwada Date: Fri, 26 Oct 2018 15:31:58 +0545 Subject: [PATCH 03/16] Small typo fix --- 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 c57e200c0..cfd11da01 100644 --- a/content/docs/hooks-faq.md +++ b/content/docs/hooks-faq.md @@ -109,7 +109,7 @@ There are a few more heuristics, and they might change over time as we fine-tune ### How do lifecycle methods correspond to Hooks? -* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing it is expensive, you can pass a function to `useState`. +* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing is expensive, you can pass a function to `useState`. * `getDerivedStateFromProps`: Schedule an update [while rendering](#how-do-i-implement-getderivedstatefromprops) instead. From b3d150358829e057fb6045aac73c238f883283b9 Mon Sep 17 00:00:00 2001 From: natusaspire Date: Sun, 13 Jan 2019 00:30:23 +0200 Subject: [PATCH 04/16] fix typo in blog post --- content/blog/2018-06-07-you-probably-dont-need-derived-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md index 6e71ef838..9d3337c86 100644 --- a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md +++ b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md @@ -213,7 +213,7 @@ To recap, when designing a component, it is important to decide whether its data Instead of trying to **"mirror" a prop value in state**, make the component **controlled**, and consolidate the two diverging values in the state of some parent component. For example, rather than a child accepting a "committed" `props.value` and tracking a "draft" `state.value`, have the parent manage both `state.draftValue` and `state.committedValue` and control the child's value directly. This makes the data flow more explicit and predictable. For **uncontrolled** components, if you're trying to reset state when a particular prop (usually an ID) changes, you have a few options: -* **Recomendation: To reset _all internal state_, use the `key` attribute.** +* **Recommendation: To reset _all internal state_, use the `key` attribute.** * Alternative 1: To reset _only certain state fields_, watch for changes in a special property (e.g. `props.userID`). * Alternative 2: You can also consider fall back to an imperative instance method using refs. From d8a83092174f4d7a4b6e4cf68fdd7bae54a0cb73 Mon Sep 17 00:00:00 2001 From: Prashant Andani Date: Wed, 16 Jan 2019 21:18:03 +0530 Subject: [PATCH 05/16] Typo fix --- content/blog/2013-06-27-community-roundup-3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2013-06-27-community-roundup-3.md b/content/blog/2013-06-27-community-roundup-3.md index 69041ea09..2d297f20f 100644 --- a/content/blog/2013-06-27-community-roundup-3.md +++ b/content/blog/2013-06-27-community-roundup-3.md @@ -49,7 +49,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R [Joel Burget](http://joelburget.com/) wrote a blog post talking about the way we would write React-like components in Backbone and Handlebars. -> The problem here is that we're trying to maniplate a tree, but there's a textual layer we have to go through. Our views are represented as a tree - the subviews are children of CommentCollectionView - and they end up as part of a tree in the DOM. But there's a Handlebars layer in the middle (which deals in flat strings), so the hierarchy must be destructed and rebuilt when we render. +> The problem here is that we're trying to manipulate a tree, but there's a textual layer we have to go through. Our views are represented as a tree - the subviews are children of CommentCollectionView - and they end up as part of a tree in the DOM. But there's a Handlebars layer in the middle (which deals in flat strings), so the hierarchy must be destructed and rebuilt when we render. > > What does it take to render a collection view? In the Backbone/Handlebars view of the world you have to render the template (with stubs), render each subview which replaces a stub, and keep a reference to each subview (or anything within the view that could change in the future). > From 573da866666f33d43b8617e5fd94d56de4eb0fd1 Mon Sep 17 00:00:00 2001 From: Prashant Andani Date: Wed, 6 Feb 2019 22:46:24 +0530 Subject: [PATCH 06/16] Add https for javascript.info --- content/docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/getting-started.md b/content/docs/getting-started.md index 8ad77b1ac..86e15c843 100644 --- a/content/docs/getting-started.md +++ b/content/docs/getting-started.md @@ -79,7 +79,7 @@ We recommend going through [this JavaScript overview](https://developer.mozilla. >Tip > ->Whenever you get confused by something in JavaScript, [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [javascript.info](http://javascript.info/) are great websites to check. There are also [community support forums](/community/support.html) where you can ask for help. +>Whenever you get confused by something in JavaScript, [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [javascript.info](https://javascript.info/) are great websites to check. There are also [community support forums](/community/support.html) where you can ask for help. ### Practical Tutorial From 7e4ac52af4dc93b1d1b46cb39ead62b450e94b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Thu, 7 Feb 2019 14:41:33 +0100 Subject: [PATCH 07/16] HTTPS-ify most insecure URLs in content/docs (& one in Acknowledgments) This is a followup to #1157 --- content/docs/accessibility.md | 38 +++++++++---------- content/docs/add-react-to-a-website.md | 4 +- content/docs/addons-perf.md | 4 +- content/docs/addons-shallow-renderer.md | 2 +- content/docs/addons-test-utils.md | 4 +- content/docs/addons-update.md | 4 +- content/docs/code-splitting.md | 2 +- content/docs/codebase-overview.md | 4 +- content/docs/create-a-new-react-app.md | 6 +-- content/docs/design-principles.md | 6 +-- content/docs/faq-functions.md | 2 +- content/docs/faq-state.md | 2 +- content/docs/getting-started.md | 4 +- content/docs/handling-events.md | 2 +- content/docs/higher-order-components.md | 6 +-- content/docs/how-to-contribute.md | 4 +- .../docs/integrating-with-other-libraries.md | 22 +++++------ content/docs/introducing-jsx.md | 6 +-- content/docs/reconciliation.md | 2 +- content/docs/reference-dom-elements.md | 2 +- content/docs/reference-glossary.md | 2 +- content/docs/reference-test-renderer.md | 4 +- content/docs/state-and-lifecycle.md | 14 +++---- content/docs/static-type-checking.md | 2 +- content/docs/thinking-in-react.md | 6 +-- content/docs/uncontrolled-components.md | 2 +- src/pages/acknowledgements.html.js | 8 ++-- 27 files changed, 82 insertions(+), 82 deletions(-) diff --git a/content/docs/accessibility.md b/content/docs/accessibility.md index d387921ca..451ea2cc8 100644 --- a/content/docs/accessibility.md +++ b/content/docs/accessibility.md @@ -19,8 +19,8 @@ The [Web Content Accessibility Guidelines](https://www.w3.org/WAI/intro/wcag) pr The following WCAG checklists provide an overview: - [WCAG checklist from Wuhcag](https://www.wuhcag.com/wcag-checklist/) -- [WCAG checklist from WebAIM](http://webaim.org/standards/wcag/checklist) -- [Checklist from The A11Y Project](http://a11yproject.com/checklist.html) +- [WCAG checklist from WebAIM](https://webaim.org/standards/wcag/checklist) +- [Checklist from The A11Y Project](https://a11yproject.com/checklist.html) ### WAI-ARIA @@ -114,7 +114,7 @@ Every HTML form control, such as `` and `