Commit Graph

1520 Commits

Author SHA1 Message Date
Dan Abramov
0e87a042a8 Fix React links on the website (#10837)
* Fix React links on the website

* Fix code editor

* Fix code editor, attempt 2
2017-09-26 18:20:41 +01:00
Andrew Clark
0e43ef2682 Doc updates for React 16 + blog post (#10824)
* Doc updates for React 16 + blog post

* Add link to Sophie's post
2017-09-26 09:04:14 -07:00
Toru Kobayashi
55b1848c3e Add ReactTestRenderer documentations (#10692)
* Add ReactTestRenderer documentations

* Add TestRenderer documentations

* TestRenderer is not experiment

* Add a link for jsdom

* Use ES Modules syntax

* Twaek

* Add a Link component

* Use Jest assertions

* Move a documentation for createNodeMock to Idea section

* Renamed

* Tweak

* Rename

* More explicit

* Add a usecase for createNodeMock
2017-09-26 00:30:56 -07:00
Anuja Ware
037ae1b2cc Small typo fixed (#10701) 2017-09-14 14:39:17 -07:00
Brian Emil Hartz
888a12b85d More explicit class method for ref doc (#10228)
After realizing this was the second time I've visited this exact page within a year and second guessing myself that the `textInput` ref isn't actually the `<input />` element. I decided to attempt to make this a little more explicit; you are actually accessing the method on the child class and not the `focus` method on the dom input element. Having them named the same caused some confusion.
2017-09-10 14:48:39 -07:00
zhangs
ef2547a4cb the order of withRouter and connect is reset (#10658)
per [this link](https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/withRouter.md) becasue ` If you are using withRouter to prevent updates from being blocked by shouldComponentUpdate, it is important that withRouter wraps the component that implements shouldComponentUpdate. `
2017-09-10 12:56:22 -07:00
Héliton Nordt
2fc474ef46 Improve displayName documentation (#10451)
* Improve displayName documentation

* displayName docs: higher-order component lowercased to stay consistent with the rest of the docs

* Rephrase displayName reference docs
2017-09-08 16:45:25 -07:00
David Beitey
a029d91c68 Fix minor typo in Firefox name (#10605) 2017-09-05 10:28:54 -07:00
Tyler Deitz
5b83555b6c Update reference-events.md (#10554) 2017-08-29 08:11:45 -07:00
Brian Vaughn
fdcbf35abf Added "Advanced Guides" page about cross-origin Errros (#10457) 2017-08-14 13:43:24 -07:00
Sasha Aickin
87f1cec913 Fix for #10388. Renames renderToStream to renderToNodeStream. (#10425) 2017-08-10 12:23:00 -07:00
Ben Alpert
f50dbe8d96 Update installation.md 2017-08-04 17:10:50 -07:00
Dan Abramov
427f4961a8 Add documentation about <script crossorigin> for React CDN usage (#10368) 2017-08-03 16:13:13 +01:00
Dan Abramov
839d701840 Tweak deprecation messages to be less scary (#10145) 2017-07-11 14:05:27 +01:00
Nick Kasten
eaab6aff60 Updated Immutable Data Stuctures Docs (#9845)
* updated immutable data structures section

* improved immutable clarifications

* changes to example immutable code
2017-07-05 19:08:43 -05:00
Guilherme Ruiz
1b4a714e0f Fix the data-height of Step 5 CodePen embed (#10083) 2017-07-03 21:05:35 -04:00
Almero Steyn
e5180717e8 docs(a11y): Small fixes (#10079) 2017-06-30 07:39:46 -04:00
Almero Steyn
e95b65d685 [Docs: A11y] Add accessibility docs (#9519)
* [Docs: A11y] Add accessibility docs

* Fix the link

* Replace link image

* Tweak style
2017-06-26 18:17:05 +01:00
Sasha Aickin
7d123e33cb Documentation: added info about streaming character encoding. (#10039) 2017-06-26 16:32:11 +01:00
Sasha Aickin
7b5832a3bc Add ReactDOMNodeStream, adding streaming rendering. (#10024)
* Add ReactDOMNodeStream, adding ability to stream generated HTML.

* Forgot to rename a documentation page.

* Tests are passing locally but failing on CI; attempt to fix that with this tweak.

* Adding some debugging info to try to track down CI problem.

* More debugging of CI. Yay for printf debugging.

* More printf debugging of CI to figure out what is going on with includes during tests.

* I made a truly stupid error with my printf debugging statements for CI. Fixing that.

* And another dumb copy and paste typo.

* The node-stream.js stub for tests wasn't being added because of .gitignore.

* Fix for code review coment https://github.com/facebook/react/pull/10024#discussion_r123606138 . Thanks to @razh for helping me out.

* Removing all the console.logs I put in to debug the build problems on the CI server.

* Fix for code review coment https://github.com/facebook/react/pull/10024#discussion_r123628227 . Thanks to @aweary for the suggestion.

* Response to code review comment https://github.com/facebook/react/pull/10024#discussion_r123649131 . Thanks, @gaearon.

* Responding to code comments https://github.com/facebook/react/pull/10024#pullrequestreview-46104491 , https://github.com/facebook/react/pull/10024#pullrequestreview-46104616 , and https://github.com/facebook/react/pull/10024#pullrequestreview-46104822 . Thanks to @sebmarkbage for the help.

* Attempt to tweak spacing to see if it makes the prettier build step happy.

* Found a prettier bug that wasn't being reported by npm run prettier for some reason.

* Fixed a small prettier issue
2017-06-24 22:31:42 -07:00
Sasha Aickin
ee5fefeac4 As pointed out by @gaearon in code review comment https://github.com/facebook/react/pull/10024#discussion_r123649131 , ReactDOMServer is an object, not a class. (#10027) 2017-06-23 16:07:25 +01:00
newvlad
526056d9bb Create higher-order-components.md (#9976) 2017-06-19 10:06:54 -04:00
Dan Abramov
1b1b408bc4 Reword animation documentation deprecation (#9957) 2017-06-14 13:04:04 +01:00
Nathan Hunzaker
328f9d3d5f Add controlList to DOM property whitelist (#9940)
See:

- https://github.com/WICG/controls-list/blob/gh-pages/explainer.md
- https://developers.google.com/web/updates/2017/03/chrome-58-media-updates#controlslist
2017-06-12 21:09:33 -04:00
Dan Abramov
01fd22ea5c Fix doc styling and formatting issues 2017-06-10 00:04:50 +01:00
Mario Souto
56fef536f8 Remove extra brace (#9910) 2017-06-09 14:48:59 -07:00
Kurt Furbush
1f01267f26 Update reference-react-component.md (#9863)
Grammatical edit to match same statement in state-and-lifecycle.html
2017-06-06 09:59:44 -07:00
Garmash Nikolay
f78f2789b4 Fix url to ng-animate (#9859) 2017-06-06 08:16:27 -07:00
Fernando Montoya
cde040d56c Update webpack according to brand guidelines (#9595)
* Update webpack according to brand guidelines

* Change all ocurrences to webpack
2017-06-05 10:01:43 -05:00
Ricardo
d2d7ba16f1 Insert blockquote on prop value explanation. (#9770)
While reading the page, the "chain of thought" is broken by stating that the `tempertature` and `onTemperatureChange` don't have any special meaning. Making this a blockquote makes that note look more like a comment and keep the "chain of thought" intact.
2017-06-05 09:51:59 -05:00
cjshawMIT
e2afb8b5af Clarifying how to apply aria-* attributes (#9843)
Provide explicit example of what "keep lowercase" means for `aria-*` attributes.
2017-06-05 09:48:21 -05:00
Lipis
f699010cfc Rename Javascript to JavaScript (#9796) 2017-05-30 21:35:22 -05:00
Flarnie Marchan
f1b329a041 Add 'Test Utils' docs back to main navigation (#9676)
* Add 'Test Utils' docs back to main navigation

**why make this change?:**
We accidentally removed this - still supporting the use of Test Utilities, so we should have them in the docs.

**test plan:**
Manually tested the website - will insert a screenshot.

**issue:**
https://github.com/facebook/react/issues/9651

* Move test-utils docs to reference section

**what is the change?:**
Moved from 'advanced guides' to 'reference'

**why make this change?:**
It makes more sense as a reference

**test plan:**
Visual inspection (flarnie may add a screenshot)

**issue:**

* Add back the shallow renderer docs and remove outdated docs

**what is the change?:**
- Remove outdated 'shallow renderer' docs on 'test utils' page, and point to the updated 'shallow renderer' docs.
- Re-add a link to the updated 'shallow renderer' docs on the main navigation.

**why make this change?:**
This was already approved in https://github.com/facebook/react/pull/9331 which was then cherry-picked to https://github.com/facebook/react/pull/9359/commits and landed on master.

I'm not sure why some of these changes didn't persist. For now just adding back the changes we need.

**test plan:**
Manually inspected website - will insert screenshots.

**issue:**

* Further improvements to 'shallow rendering' and 'test utils' docs

Thanks @gaearon for the improvements!

**what is the change?:**
- Remove <hr/> from end of 'shallow rendering' docs
- 'documents' -> 'documentation'
- Move 'shallow rendering' redirection section to top of 'test utils' docs
- Add intro sentence about testing to 'shallow rendering' docs

**why make this change?:**
Documentation helps people learn.

**test plan:**
Visual inspection
2017-05-26 07:47:18 -07:00
Max Donchenko
0bf0e12fc1 Fix typo (#9786) 2017-05-26 12:37:35 +01:00
Danny Hurlburt
4795533fe8 Bind handleChange Instead of Calling (#9764) 2017-05-24 17:26:44 +01:00
Dave Lunny
143acd580f "Timeline" => "Performance" (#9602)
As of Chrome 58, the Timeline tab is now called the Performance tab, this updates the "Optimizing Performance > Profiling Components with Chrome Performance" section of the docs to reflect that.
2017-05-21 15:28:25 -04:00
Billy Shih
8c1de5dbba Fix typo (#9717)
The example explaining how redux's connect works doesn't use the same component name. Line 264 references (Comment) while 274 referenced (CommentList). Changed 264 to match 274.
2017-05-18 19:06:29 -04:00
shifengchen
92a57bd920 Edit two errors in docs (#9659) 2017-05-11 11:34:35 +01:00
Dan Abramov
9215b72a4a Fix horizontal scrolling in docs (#9613) 2017-05-05 18:03:39 +01:00
Dan Abramov
b0096e9727 Fix mobile layout 2017-05-03 15:39:02 +01:00
Dan Abramov
5d1afefed6 Fix a typo 2017-05-03 15:04:25 +01:00
Dan Abramov
b6d033b6bc Use a more specific link 2017-05-03 11:04:18 +01:00
Addy Osmani
47d64c4417 Add DEV mode note to installation doc (#8784) (#9157)
* Add DEV mode note to installation doc (#8784)

* Address feedback from Dan on wording
2017-05-03 11:03:04 +01:00
Dan Abramov
4fb526e399 Add more info about building for production (#9592)
* Add more info about building for production

* Add more info to the docs
2017-05-03 11:01:53 +01:00
Marcos Ojeda
6492b07cc3 docs better indicate that state updaters shallowly merge with state (#9554)
this was a surprise to me because the docs seemed to indicate that when
using an updater, the result _needed_ to be a new state object. I was
[not alone](https://twitter.com/ken_wheeler/status/857939690191806464)
i think in discovering this as a result of the previous tweet in the
thread.
2017-04-30 17:40:22 -07:00
wacii
54a3e23c3b Add guide on integrating with non-react code (#9316)
* Add guide on integrating with non-react code

* Capitalize guide title

* Make links to other docs relative

* Rephrase 'What it does do'

* Remove experimental syntax

* Capitalize Backbone

* Remove empty lifecycle method in generic jQuery example

* Use shouldComponentUpdate() not componentWillUpdate()

* Prefer single quotes

* Add cleanup to generic jQuery example

* Capitalize React

* Generalize the section on Backbone Views

* Generalize the section on Backbone Models, a little

* Add introduction

* Adjust wording

* Simplify ref callbacks

* Fix typo in generic jQuery example

* Fix typos in Backbone models in React components

* Fix more typos in Backbone models in React components

* Add generic section on integrating with other view libraries

* Stress the benefits of an unchanging React element

* Small changes to introduction

* Add missing semicolon

* Revise generic jQuery wrapper section

Moved the section on using empty elements to prevent conflicts above the
code example and added brief introduction to that example.

* Add usage example for Chosen wrapper

* Prevent Chosen wrapper from updating

* Note that sharing the DOM with plugins is not recommended

* Mention how React is used at Facebook

* Mention React event system in template rendering section

* Remove destructuring from function parameters

* Do not name React components Component

* Elaborate on unmountComponentAtNode()

* Mention preference for unidirectional data flow

* Rename backboneModelAdapter

* Replace rest syntax

* Respond to updated model in connectToBackboneModel

* Rewrite connectToBackboneModel example

* Rework connectToBackboneModel example

* Misc changes

* Misc changes

* Change wording

* Tweak some parts
2017-04-26 17:24:22 +01:00
chocolateboy
edf4b2231f [Docs] Fix confusing description for the <script>...</script> usage (#9502)
* Fix confusing description for the <script>...</script> usage

* Update jsx-in-depth.md

* Update reference-react-dom-server.md

* Update reference-react-dom.md

* Update reference-react.md
2017-04-26 13:57:22 +01:00
Dmitri Zaitsev
c537213cb1 Add reference to the Hyperscript libraries (#9517)
* Add reference to the Hyperscript libraries

I feel these should be mentioned as they provide terser syntax than using `R.createElement` directly, even with a shorthand.

* Rephrase
2017-04-26 13:54:31 +01:00
Frankie Bagnardi
6d9942270a adds indirect refs to docs (#9528)
* adds indirect refs to docs

* Add more info

* Explain clearer

* Rephrase

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md
2017-04-26 13:40:09 +01:00
Nathan Hunzaker
1a25a17ab0 Move ReactDOMFactories into separate package (#8356)
- Update examples to no longer use React.DOM
- Add package and documentation entries for react-addons-dom-factories
- Update dom-factories readme
- Set up proxy to intercept React.DOM usage
- Update ReactDOM children tests to use createElement
- Add more specific warning assertion for React DOM factories
- Do not use expectDev in ReactDOMFactories tests
2017-04-24 08:08:17 -07:00