Commit Graph

2273 Commits

Author SHA1 Message Date
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
Ragnar Þór Valgeirsson
19b5ce72c1 Match eslint's line length settings (#8845) 2017-01-23 17:47:48 +01:00
SunHuawei
30c7c808ab Fix a typo (#8580) 2017-01-23 17:43:48 +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
Faheel Ahmad
e8b5156d1a I -> we (#8817) 2017-01-17 10:01:40 -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
Jack Cross
2cd38a2b15 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
2017-01-17 06:34:44 -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
Richie Thomas
88ef3f885e Remove one extraneous backtick from line 116 of 'codebase-overview.md' (#8724). (#8726) 2017-01-09 14:06:37 -06:00
Stuart Harris
7967031dcd Added React London conference, March 28th (#8722)
Thanks :-)
2017-01-09 09:28:20 -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
Andre Giron
4dd346b923 Fix typos (#8632)
* Fix typos

* Put back x in Latinx
2017-01-04 09:36:19 -08:00
Joel Sequeira
b272da5d87 Fix typo in Proposing a Change section in how-to-contribute.md (#8498)
* Fix typo in Proposing a Change section in how-to-contribute.md

Not sure if it was actually intended or was a typo but changed 'If you intend to change to the public API' --> 'If you intend to make a change to the public API'

* Simplify
2017-01-04 09:30:08 -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
Devinsuit
de7e8a4709 Update blog post link (#8421) 2017-01-04 09:15:09 -08:00
Mojtaba Dashtinejad
62ea0290ed [docs] Add a note about componentWillReceiveProps (#8234)
* Component Lifecycle In Depth documentation

* first steps to improve react component reference

* improved react component reference

- remove the component-lifecycle-in-depth

* add a note for usage of ReactDOM.findDOMNode

* one note on componentWillReceiveProps

* remove old useless images for lifecycle docs

* Tweak wording
2017-01-04 08:26:33 -08:00
Dan Abramov
a1f22dd855 Nitpick: use FB style in doc 2017-01-04 15:59:32 +00:00
Karthik Chintapalli
49c4a363bc Fixed stray text appearing on top of the navbar at small screen sizes (#8681) 2017-01-04 04:48:53 -08:00
Brian Vaughn
6a394f5dd3 Renamed React.js Conf to React Conf 2017-01-03 15:27:23 -08:00
Brian Vaughn
f91eb3323f Merge pull request #8671 from bonham000/update-docs
update to codebase-overview.md
2017-01-03 09:01:53 -08:00
neeldeep
354d1170b0 Update conferences.md 2017-01-03 19:23:55 +05:30
Sean Smith
b31ab435ce update to codebase-overview.md 2017-01-01 15:27:57 -08:00
gitanupam
a53d2acaf9 Changed webpack's hyperlink (#8650)
..to point to 2.x documentation instead of 1.x (and to be consistent with other links on the page)
2016-12-28 11:34:00 -06:00
gitanupam
864a2c76b8 'npm init' needed before installing react via npm. (#8649)
* 'npm init' needed before installing react via npm.

I was trying to install react in my django project directory and was getting warnings about package.json not being present. Started this SO post (http://stackoverflow.com/questions/41340909/npm-cant-find-package-json-when-installing-react/41340975#41340975) to figure it out. I think it'll be useful to others too if we add it in the documentation itself.

* Tweak instructions
2016-12-28 04:04:21 -08:00
Eric Pitcher
9f3ae7247e Update conditional-rendering.md (#8636)
Stating the fact that component lifecycle methods will still fire as normal even though you return null from the render method.
2016-12-24 09:18:30 -08:00
comerc
e875fa0967 Fix casing typo in jsx-in-depth.md (#8542) 2016-12-11 07:43:40 -06:00
Chris
dd5a665d42 update example to use this.state (#8425)
- In the previous example, the code works even without using bind(this) in the constructor.
- the reason being handleClick doesn't even use `this` and its just calling the global function alert.
- this change make use of this via access this.state.
2016-12-11 07:41:48 -06:00
Liz
081c20f66f 👏 designers are friends, not fodder for jokes (#8523) 2016-12-07 15:09:37 -08:00
Brandon Dail
0ed6236931 Merge pull request #8476 from AlanBreck/patch-1
Update reference-react.md
2016-12-02 09:16:39 -06:00
lucas
ab12949031 Add return to render 2016-12-01 19:21:40 -03:00
Jacob Lamont
68b9b2037c Update reference-react.md 2016-12-01 14:35:48 -05:00
cloudy1
d7b1599f88 Update tutorial.md (#8328)
* Update tutorial.md

fix "unknown: Unexpected token" in "codepen.io".

* tweaks per suggestion
2016-11-29 13:00:33 -08:00