Commit Graph

2266 Commits

Author SHA1 Message Date
Adam 91b1cde5d6 Remove ref usage in main markdown example (#9160)
from [elsewhere in the docs](https://facebook.github.io/react/docs/refs-and-the-dom.html):

> Avoid using refs for anything that can be done declaratively.
(cherry picked from commit bf5abdf14f)
2017-03-12 15:45:59 +00:00
Dan Abramov 39ff5c4895 Reorder sections in alphabetical order (#9143)
* Reorder sections in alphabetical order

* Reorder here too

(cherry picked from commit 7fa311bcd9)
2017-03-09 20:47:20 +00:00
Dima Beznos c1ba5b2ddc Added Brunch build tool to the docs (#9074)
* Added Brunch build tool to the docs

* Improved grammar

* product build -> production build

(cherry picked from commit 0bedd0697a)
2017-03-09 20:44:06 +00:00
Sunny Ripert b2aa4d143f Fix spacing in documentation (#9070)
Replace non-breaking space by space.
(cherry picked from commit 179240ca30)
2017-03-09 20:44:06 +00:00
Vesa Laakso 0777ef9c2f Update Lifting State Up not to mix up DOM value with component state (#9032)
* Update Lifting State Up not to mix up DOM value with component state

A few weeks ago when teaching my friend, she got stuck on
`this.state.value` vs. `event.target.value`. As the documentation
talked a lot about "values", and the term value could mean three
different things (values in general, the "value" prop / DOM value of
the <input> component and the value in state/props), it was not weird
that she got a bit confused.

* Rename Lifting State Up onChange props to onTemperatureChange

This is in-line with how the temperature is provided as a prop named `temperature`

* Fix one value prop not being renamed to temperature

* Update codepen examples in Lifting state up documentation

* Update devtools state change to reflect docs change

(cherry picked from commit a190cfce29)
2017-03-09 20:44:06 +00:00
Bryan Braun 64ab3a383e Replace the header_links plugin with client-side generated anchors. (#4165)
* Replace the header_links plugin with client-side generated anchors.

Fixes facebook/react#4124

* Move anchor-link code into a separate script

Also adds a couple comments, for context.

(cherry picked from commit 7a878d27e3)
2017-03-09 20:44:06 +00:00
Fokke Zandbergen c7d14df920 Square renders button, not div (#9084)
(cherry picked from commit 8eb7068364)
2017-03-09 20:44:06 +00:00
Bernard Lin 1edc84a38c Updated Chain React (#9067)
Changed conference date from "Summer 2017" to given date on website
(cherry picked from commit fe46def5e2)
2017-03-09 20:44:05 +00:00
Dai Nguyen c04ced9c7e Update tutorial.md (#9051)
(cherry picked from commit d724aed404)
2017-03-09 20:44:05 +00:00
Stephie d6842d3140 Fixed typo: "Calcutor" to "Calculator" (#9047)
(cherry picked from commit 5cc2a4fe3e)
2017-03-09 20:44:05 +00:00
Dan Abramov c53314a3da Add more details to the doc 2017-02-19 12:08:18 +00:00
Dan Abramov 8cfc95f2d3 Doc consistency tweaks 2017-02-19 11:59:01 +00:00
Roman Matusevich 67420d1d08 Remove extra article from documentation (#9028)
(cherry picked from commit d28264e689)
2017-02-19 11:12:08 +00:00
DanZeuss 6256f3e8b0 Improved for a better understanding (#8970)
* Improved for a better understanding

that code shouldn't name this parameter onchange. It is so confusing for a starter of ReactJs like me. It looks like that the onChange is an common event from props.

* Update the lifting state up paragraph

I tried to write something to explain to starter programmers in react, how we lift the state up calling a method defined by the ancestor and called by the children that will affect the children element.

* Rewrite Lifting State Up

(cherry picked from commit fc362bf095)
2017-02-19 11:12:08 +00:00
Dan Abramov 1d786cd992 Revert "update react perf docs (#8060) and (#6174)" (#8997) 2017-02-13 23:45:32 +00:00
Dan Abramov 1d4b165476 Update Thinking in React embed to match the link (#8996)
(cherry picked from commit 2464cd2d53)
2017-02-13 23:30:52 +00:00
Jiminikiz b3fd863141 Fixing grammatical error ... (#8987)
... in the Create React App section.
(cherry picked from commit 7958c1d77d)
2017-02-13 23:30:52 +00:00
Prayag Verma 34b6e1f80c Fix a typo in design principles doc (#8985)
unambigious → unambiguous
(cherry picked from commit c60f852cdb)
2017-02-13 23:30:52 +00:00
Moacir Rosa 9e5ad597cb Only fix a small wrong key in example (#8976)
Only fix a small wrong key in example
(cherry picked from commit de673bca8d)
2017-02-13 23:30:52 +00:00
Dhyey Thakore b53a582daa update react perf docs (#8060) and (#6174) (#8236)
* update react perf docs issue 8060 and 6174

* Grammar

Small stuff

(cherry picked from commit 994a0c8b0c)
2017-02-13 23:30:52 +00:00
Andrew Clark 2a644ae7ae Merge pull request #8927 from mitenka/patch-5
Update higher-order-components.md
(cherry picked from commit b49611e643)
2017-02-13 23:30:51 +00:00
KB aff32728ca [docs] Add note about refs on stateless components (#8916)
* Add note about refs on stateless components

* Move info about refs in the stateless components to the main section

* Simplification of the part about refs and functional components

* Tweaks

* Move sections around

* Oops

* Rearrange more sections

(cherry picked from commit d42c285aa2)
2017-02-06 17:11:27 +00:00
Pontus Abrahamsson ecc6e79407 Update conferences.md (#8915)
* Update conferences.md

* Move confs around

(cherry picked from commit 55a18bca64)
2017-02-06 17:11:27 +00:00
Omid Hezaveh 49762d28e4 Explain arbitrariness of ref name in callback (#8913)
* Explain arbitrariness of ref name in callback

The sample code was confusing because it's not clear that "textInput" in this.textInput is an arbitrary name for the ref.

* Tweak wording

(cherry picked from commit 79be3543dd)
2017-02-06 17:11:27 +00:00
Dan Abramov 4a2fad0d04 Fix indentation in tutorial (#8914)
(cherry picked from commit 9e3a31b2c6)
2017-02-02 13:25:22 +00:00
Eduard 2d130bfba2 Update tutorial.md (#8896)
* Update tutorial.md

The status <div> used in Board can be deleted as well from render.

* Little tweaks

(cherry picked from commit dc04ee87ae)
2017-02-02 13:25:22 +00:00
Tiago Fernandez d5eb5a23c6 Link to CodePen editor rather than final result (#8849)
People want to see the final JS/CSS/HTML, and the final result is already displayed by CodePen.
(cherry picked from commit 05f5bf6eb6)
2017-02-02 13:25:22 +00:00
Jeffrey Wan 73a6762fe2 Update tutorial.md (#8792)
* Update tutorial.md

* Fix quoting to be consistent

(cherry picked from commit 3f5482ee20)
2017-02-02 13:25:22 +00:00
John Longanecker 952b7dec91 Lifting State Up more legible (#8691)
(cherry picked from commit b8f0522cc6)
2017-02-02 13:25:22 +00:00
Vladimir Kovpak 74b8ab5db1 Added undefined example (#8899)
Into section `Booleans, Null, and Undefined Are Ignored` I've added example with undefined.
(cherry picked from commit 8bc5a87d04)
2017-02-02 13:25:21 +00:00
Senin Roman 33ebd79ac3 Fix incorrect markup for ie10 (#8886)
(cherry picked from commit 466bb4ffb9)
2017-02-02 13:25:21 +00:00
MICHAEL JACKSON 1507765a2c Update context example for react-router v4 beta (#8889)
* Update context example for react-router@4.0.0-beta.1

* Style nits

(cherry picked from commit 564fa64626)
2017-02-02 13:25:21 +00:00
Mitchel Humpherys 07edc56551 installation.md: Add missing "as" (#8871)
(cherry picked from commit 39472f1c3e)
2017-02-02 13:25:21 +00:00
Scott 589b2ce815 Add benchmarking tutorial (#8698)
* Add benchmarking tutorial

I've written what I hope is the simplest introduction to benchmarking React components. It's meant to be straightforward and easy to follow for beginners. If you agree that it would be helpful, I'd like to add it to the docs.
Would also welcome any and all feedback.

* Just put links together

(cherry picked from commit 4c6fec902f)
2017-02-02 13:25:20 +00:00
Oscar Bolmsten 5e06732b2f webpack 2 is now stable (#8859)
Remove notice about different webpack versions
Update webpack URLs
(cherry picked from commit c2f94385a1)
2017-02-02 13:25:20 +00:00
Keyan Zhang 80b8d5adac Add a link to "State Updates are Merged" in the forms doc (#8851)
* Added a link to "State Updates are Merged"

* better inline links

* moved the explanation down

* Minor unrelated tweaks

(cherry picked from commit eb89bc4c30)
2017-01-23 20:10:55 +00:00
mguidotto 4f32c39eb8 Update conferences.md (#8841)
* Update conferences.md

* Update conferences.md

path fixed

* Changed capitalization to match the website and Twitter

(cherry picked from commit b2b6d9daf7)
2017-01-23 20:10:55 +00:00
Dan Abramov e6d377d21d Clarify use of ES6 idiom in Forms doc 2017-01-23 17:59:55 +00:00
Justin Grant ef96e593a3 Reminder: strip quotes from attributes with JS code (#8806)
* Reminder: strip quotes from attributes with JS code

Web developers who are used to standards-compliant HTML and XML will, out of habit, put quotes around all attributes because the standards require them. Other templating systems like ASP.NET also require (or at least allow) quotes around attributes that contain code. This behavior will get users into trouble in JSX because a quoted attribute is always treated as a string literal, even if it contains curly-braced javascript code.  Let's add to the docs to help newbies evade this problem.

* Tweak wording

(cherry picked from commit fc302494b7)
2017-01-23 17:19:23 +00:00
Ragnar Þór Valgeirsson d8700e8d4e Match eslint's line length settings (#8845)
(cherry picked from commit 09b3ec5d3c)
2017-01-23 17:19:23 +00:00
SunHuawei 5a25a05a7d Fix a typo (#8580)
(cherry picked from commit 5494b267d9)
2017-01-23 17:19:22 +00:00
EugeneGarbuzov d66b82cb74 Corrected a typo. (#8837)
shoud -> should
(cherry picked from commit 30c7c4fbe6)
2017-01-23 16:10:57 +00:00
Keyan Zhang 23ad42d1ff Add "Handling Multiple Inputs" to Forms doc (#8552)
* added "Handling Multiple Inputs"

* renamed and added a codepen

* simplified the example

(cherry picked from commit 06399b8ce3)
2017-01-18 12:45:34 -06:00
Rohan Nair 4ca6885368 Updating Thinking in React doc to replace refs with event handlers (#8815)
* Updating Thinking in React doc to replace refs

* Updating doc copy to reflect changes to example

(cherry picked from commit 5d96162b57)
2017-01-18 12:45:34 -06:00
Faheel Ahmad 632b53edde I -> we (#8817)
(cherry picked from commit c8a41672ed)
2017-01-18 12:45:34 -06:00
DQNEO 153c683120 use an easier word (#8809)
* use an easier word

The word `mandatory` is relatively difficult for people with ESL (English as a second language), so I propose an alternative word.
This would be much easier to understand.

* use simpler word

(cherry picked from commit 6308238498)
2017-01-18 12:45:33 -06:00
Jack Cross 5446c47c1d Add Flow reminder to PR template (#8805)
* Added flow to PR template

* Added record-tests step to PR template and contribution docs

* Updated order of PR checks

(cherry picked from commit bfd5b1878e)
2017-01-18 12:44:25 -06:00
Rich Harris 3e5210342a add docs for building with Rollup (#8799)
* add docs for building with Rollup

* Tiny unrelated fix

(cherry picked from commit e69ff955f4)
2017-01-18 12:27:57 -06:00
Superlaziness 2b63c668ec fix HOC doc (#8802)
(cherry picked from commit 66540fdf16)
2017-01-18 12:26:44 -06:00
Vladimir Tikunov 63084d78a4 Remove error ref to the 'render' function (#8781)
What is the `render` function of a functional component?
(cherry picked from commit ebd83e809e)
2017-01-18 12:26:32 -06:00