Commit Graph

1448 Commits

Author SHA1 Message Date
Dan Abramov
dc6e319598 Reorder sections in alphabetical order (#9143)
* Reorder sections in alphabetical order

* Reorder here too
2017-03-09 20:46:55 +00:00
Dima Beznos
59b0cd40f7 Added Brunch build tool to the docs (#9074)
* Added Brunch build tool to the docs

* Improved grammar

* product build -> production build
2017-03-03 16:15:25 -06:00
Sunny Ripert
4a9283c508 Fix spacing in documentation (#9070)
Replace non-breaking space by space.
2017-03-02 13:57:58 -06:00
Vesa Laakso
f76b6a94b7 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
2017-03-02 00:28:09 +00:00
Stephie
1f8403c7ea Fixed typo: "Calcutor" to "Calculator" (#9047) 2017-02-22 17:37:55 +00:00
Dan Abramov
220ac3c6e8 Add more details to the doc 2017-02-19 12:07:54 +00:00
Dan Abramov
f17b55ce57 Doc consistency tweaks 2017-02-19 11:58:42 +00:00
Roman Matusevich
9c59040091 Remove extra article from documentation (#9028) 2017-02-19 11:10:50 +00:00
DanZeuss
df3fd6ab47 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
2017-02-19 02:21:05 +00:00
Dan Abramov
0648cd10e7 Revert "update react perf docs (#8060) and (#6174)" (#8997) 2017-02-13 23:43:08 +00:00
Dan Abramov
3b5ed4b56e Update Thinking in React embed to match the link (#8996) 2017-02-13 23:25:47 +00:00
Jiminikiz
4c06869607 Fixing grammatical error ... (#8987)
... in the Create React App section.
2017-02-13 10:04:09 -08:00
Moacir Rosa
a70df84837 Only fix a small wrong key in example (#8976)
Only fix a small wrong key in example
2017-02-10 15:40:24 +00:00
Dhyey Thakore
e701f41a66 update react perf docs (#8060) and (#6174) (#8236)
* update react perf docs issue 8060 and 6174

* Grammar

Small stuff
2017-02-07 14:00:08 -08:00
Andrew Clark
e28c0a8dfc Merge pull request #8927 from mitenka/patch-5
Update higher-order-components.md
2017-02-06 11:42:31 -08:00
KB
bb85d94cc8 [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
2017-02-06 16:49:36 +00:00
Dmitry Zhuravlev-Nevsky
f45d6f3925 Update higher-order-components.md 2017-02-04 03:35:06 +03:00
Diego Muracciole
7c7b511c37 Add onToggle event to details tag (#8831)
* Add onToggle event to details tag

Fixes #8761

* Map onToggle event on ReactDOMFiberComponent

* Tweak doc

* Trap events on setInitialProperties for details tag
2017-02-03 10:25:09 +00:00
Omid Hezaveh
62c86a65a9 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
2017-02-02 13:33:12 +00:00
Vladimir Kovpak
61877c13e0 Added undefined example (#8899)
Into section `Booleans, Null, and Undefined Are Ignored` I've added example with undefined.
2017-01-31 07:24:29 -06:00
MICHAEL JACKSON
4ffb57e548 Update context example for react-router v4 beta (#8889)
* Update context example for react-router@4.0.0-beta.1

* Style nits
2017-01-30 17:36:47 +00:00
Mitchel Humpherys
00fd1e8c54 installation.md: Add missing "as" (#8871) 2017-01-25 23:33:49 -06:00
Scott
9d1779e733 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
2017-01-25 15:14:18 +00:00
Oscar Bolmsten
ef91c63115 webpack 2 is now stable (#8859)
Remove notice about different webpack versions
Update webpack URLs
2017-01-25 14:56:52 +00:00
Keyan Zhang
bc9f9d29e2 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
2017-01-23 21:09:48 +01:00
Dan Abramov
25be2b63bd Clarify use of ES6 idiom in Forms doc 2017-01-23 17:59:44 +00:00
Justin Grant
f7ea62e491 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
2017-01-23 18:09:35 +01:00
EugeneGarbuzov
3aa1d52f96 Corrected a typo. (#8837)
shoud -> should
2017-01-20 13:25:21 -06:00
Keyan Zhang
6ab71526ee Add "Handling Multiple Inputs" to Forms doc (#8552)
* added "Handling Multiple Inputs"

* renamed and added a codepen

* simplified the example
2017-01-17 22:19:46 -08:00
Rohan Nair
61990a77c5 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
2017-01-17 10:17:32 -08:00
DQNEO
aa9abe5fde 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
2017-01-17 10:00:11 -08:00
Rich Harris
a0038f80df add docs for building with Rollup (#8799)
* add docs for building with Rollup

* Tiny unrelated fix
2017-01-17 05:55:49 -08:00
Superlaziness
b2f388cd91 fix HOC doc (#8802) 2017-01-16 06:49:01 -08:00
Vladimir Tikunov
f21d4f857c Remove error ref to the 'render' function (#8781)
What is the `render` function of a functional component?
2017-01-14 13:36:55 -06:00
Iurii Kucherov
85b5d37961 Update higher-order-components.md (#8780) 2017-01-13 13:17:48 -08:00
Whien
6f0e389108 move blog post [Profiling Components with Chrome Timeline] into docs article (#8680)
* move blog post into docs article

* move to second section and changed description

* Minor tweak
2017-01-12 07:06:15 -08:00
Snowmanzzz(Zhengzhong Zhao)
45000cb3a7 Update handling-events.md (#8762)
* Update handling-events.md

* Update handling-events.md
2017-01-12 06:30:43 -08:00
Tomáš Hromada
27acbb08f3 Added more info about refs in the documentation (#8707)
* Update refs-and-the-dom.md

I want to propose some changes to the Refs and the DOM documentation page. 
- Make it clear that string refs are legacy. It seems that this information got lost during the transition to new docs and only some part stayed the same, which was confusing when first reading the docs.
- Clarify and explain that during render, if the ref callback is provided, it will get called twice, first with `null` and then with the rendered DOM element. Discussed in https://github.com/facebook/react/issues/4533 and first proposed docs change in PR #8333.

I've also planned on adding an example for passing the refs up the component chain based on something I've needed to solve myself (e.g. you want to connect two dynamic components by line in React, so you need to both use refs and propagate them up the chain), and while it would be great to read up on this in the docs, it may be too specific for this section; I'd be happy to hear any recommendations.

* Adds more specific information about the callback

* Moved the ref callback description to the Caveats section

* Fixed suggested nits

* Replace 'each render pass' with 'updates'

* Tweak the wording
2017-01-10 12:18:23 -08:00
Dmitry Zhuravlev-Nevsky
4599dc5dcd Fix single vs plural (#8738)
Maybe it's not very important, just misprint fix
2017-01-10 08:00:16 -08:00
Spen Taylor
201cce9207 [Docs] Replace 'mix in' in PureComponent notes (#8730)
* [Docs] Replace 'mix in' in PureComponent notes

* Style nit
2017-01-10 06:02:22 -08:00
Dmitry Zhuravlev-Nevsky
2911b89396 Swap components (#8735)
It's better to delare component before using.
2017-01-10 02:48:53 -08:00
Nik Nyby
e079ba4d10 docs: add missing period in shouldComponentUpdate doc (#8720) 2017-01-09 08:22:04 -08:00
Bruno Heridet
ca173ef961 docs(hoc): fix typo Rambda → Ramda (#8712) 2017-01-08 10:26:46 -06:00
Brandon Dail
55568c8c57 Point all Webpack links to 1.x documentation (#8697)
* Point all Webpack links to 1.x documentation

* Add back webpack production guide, add warning
2017-01-06 12:51:26 -06:00
Murtaza Haveliwala
290cfc1afc Update rendering-elements.md
Updating text to be in sync with sample html
2017-01-06 23:32:26 +05:30
Murtaza Haveliwala
081ba8edbc Updated hello world explanation message (#8703)
Output text in explanation now in sync with code sample
2017-01-06 11:59:14 -06:00
Piotr Czajkowski
095b1ec6f7 "Don't Mutate the Original Component" example and description mismatch (#8695) 2017-01-05 05:12:51 -08:00
Piotr Czajkowski
76a149320b Higher-Order Components docs withSubscription() example fix (#8694) 2017-01-05 04:56:13 -08:00
Mateusz Burzyński
54f955de26 [Docs] Fixed anchor links in Animations section (#8453) 2017-01-04 09:24:21 -08:00
Van der Auwermeulen Grégoire
3b671d1d1b Update state-and-lifecycle.md (#8424)
* Update state-and-lifecycle.md

Isn't  clock state and props the same in this example?

* Clarify
2017-01-04 09:18:52 -08:00