Commit Graph

80 Commits

Author SHA1 Message Date
Yangshun Tay
5e8d124754 Ensure all external links have consistent behavior (#11012) 2017-10-02 09:52:39 -07:00
Brian Vaughn
96fde8a09a Add new docs website (#10896)
Adds a new docs website, built with Gatsby JS, to replace the old Jekyll site. Source code for the new site lives in /www (although markdown and YML data still comes from the legacy /docs folder).

Changes to either markdown or website source code can be previewed on Netlify. The react-js bot should automatically add comments to each PR with preview links. (This preview is generated by running the newly-added yarn build:docs command in the root package.json.)

The majority of the changes in this PR are contained within the new /www directory. However some minor modifications have been made to existing content in the /docs directory:

* Modified frontmatter author block to always be an array
* Small markdown formatting tweaks
2017-09-28 10:18:04 -07:00
Arthur Gunn
31eb1ba7c6 Update authors for v16 (#10861) 2017-09-27 10:24:16 +01:00
Andrew Clark
5f6326f356 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
Dan Abramov
4de45cfbec Add Nate to authors on master 2017-09-26 11:41:02 +01:00
Toru Kobayashi
b9d55695e1 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
Jane Manchun Wong
1b72ef396e Update Sophie's name on various files (#10655) 2017-09-08 17:10:48 -07:00
Sophie Alpert
2aa4988379 Update my name in most places 2017-09-08 15:45:55 -07:00
Almero Steyn
2675ce13b8 [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
411e04bd71 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
Flarnie Marchan
ce6108dac3 Blog post for 15.6.0 (#9950)
* Blog post for 15.6.0

**what is the change?:**
A short and sweet summary of 15.6.0 changes

**why make this change?:**
To thank community contributors and call out important changes.

**test plan:**
Visual inspection.
I also looked it over in a markdown viewer - http://dillinger.io/

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

* Add 'Installation' and 'Changelog' to 15.6.0 blog post

**what is the change?:**
Added the 'Installation' section we have on most release blog posts,
customized for the 15.6.0 version of React.
Added the 'Changelog' from master to the blog post.

**why make this change?:**
To show folks how to install React and what changes are in this release.

**test plan:**
Visual inspection

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

* Improvements to blog post, and add self to `authors.yml`

**what is the change?:**
- Add self to contributors so my name turns into a link
- Use backticks for code-ish things
- Second header to ##, not #
- Change production mode link to the new address per @bvaughn's comment
- Update changelog with fixes from https://github.com/facebook/react/pull/9951

**why make this change?:**
Make things more clear and accurate.

**test plan:**
Visual inspect - @flarnie will paste an image of how it appears in the
actual docs.

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

* Further improvements to 15.6 blog post

**what is the change?:**
- Reword heading about deprecation warning changes
- add 'br' s to the list of installation options
- add some stray missing backticks

**why make this change?:**
Clarity and readability

**test plan:**
Visual inspection

**issue:**
https://github.com/facebook/react/issues/9398
2017-06-13 15:51:45 -07:00
Flarnie Marchan
114b9c5500 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
wacii
1816d06d6b 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
Flarnie Marchan
39ca8aacf8 Add link to 'Typechecking with PropTypes' under 'Advanced Guides' (#9472)
This should have been retained in our docs, since PropTypes are only
moved and not deprecated.

Partially handles #9467, and I'll make a separate PR to
https://github.com/reactjs/prop-types to add more docs to the README
there.
2017-04-22 10:41:39 -07:00
Dan Abramov
c5783901a8 Tweak tutorial structure 2017-04-18 18:07:16 +01:00
Dan Abramov
7b80361b6b Add missing tutorial sidebar links 2017-04-18 18:00:54 +01:00
Andrew Clark
e5ce3fd368 Blog post and changelog for 15.5.0 (#9368) 2017-04-07 14:41:16 -07:00
Flarnie Marchan
8f7281199d All doc updates forv15.5 (#9359)
* `react-addons-test-utils` -> `react-dom/test-utils`

Updating all references and docs on the `React.addons.TestUtils` and the
shallow renderer to refer to the correct targets.

Instead of:
```
const React = require('react');

// ...
React.addons.Testutils
// or

const ReactTestUtils = require('react-addons-test-utils');
```
we now show:
```
const ReactTestUtils = require('react-dom/test-utils');
```

And for shallow renderer, instead of:
```
const shallowRenderer = TestUtils.createRenderer();
```

we now show:
```
const shallowRenderer = require('react-test-renderer/shallow');
```

* Update the 'prev' and 'next' attributes of 'add-ons' docs

These flags are used to set arrow links to easily navigate through the
documents. They were wrong or missing in some of the 'add-ons' pages and
this bothered me when manually testing the updates from the previous
commit.

* Update syntax for instantiating shallow renderer

Missed this when updating the docs for the changes to shallow-renderer
in React 15.5.

* Fix pointers in addons docs

Thanks @bvaughn for catching this

* Make example of shallow renderer more consistent

We should show using the same variable names between code samples.

* Make names in example even more consistent

We should use the same variable name for the same thing across examples.
`renderer` -> `shallowRenderer`.

* Update docs to deprecate React<CSS>TransitionGroup

 - removes link to the docs about `ReactCSSTransitionGroup` and
   `ReactTransitionGroup` from the main navigation
 - updates 'prev' and 'next' pointers to skip this page
 - adds deprecation warning to the top of the page
 - remove references to these modules from the packages README
 - updates 'add-ons' main page to list this as a deprecated add-on

* Update `React.createClass` to `createReactClass` in the docs

The `React.createClass` method is being deprecated in favor of
`createReactClass`.

* Remove 'React.createClass' from top level API docs

It no longer makes sense to have a section for the 'createClass' method
in this page, since it won't be available as a top level method on
'React'.

I initially was going to pull the section about 'createClass' into a
separate page to add under 'addons' but it was short and duplicative of
the 'react-without-es6' docs. So I just linked to those.

* Remove *most* `React.PropTypes` from the docs

I am doing the docs for `context` in a separate commit because that case
was a bit less clear-cut.

We will no longer support `React.PropTypes` as a built-in feature of
React, and instead should direct folks to use the `PropTypes` project
that stands alone.

Rather than retaining the `React.PropTypes` examples and just revamping
them to show the use of the stand-alone `PropTypes` library with React,
it makes more sense to direct people to that project and reduce the
perceived API area and complexity of React core. The proper place to
document `PropTypes` is in the README or docs of that project, not in
React docs.

* Update `context` docs to not use `React.PropTypes`

We use `React.PropTypes` to define the `contextType` for the `context`
feature of React. It's unclear how this will work once `React.PropTypes`
is replaced by the external `PropTypes` library. Some options;

a) Deprecate `context`, either in v16 or shortly after. Seems reasonable
based on the intense warnings against using context that we have in the
docs -
https://facebook.github.io/react/docs/context.html#why-not-to-use-context
**Except** that probably some widely used libraries depend on it, like
`React-Router`.

b) Expect users will use external `PropTypes` library when defining
`contextTypes` and just don't do our `checkReactTypeSpec` against them
any more in v16.

c) Stop masking context and pass the whole context
unmasked everywhere. Worst option, do not recommend.

I went with `b` and assume that, for now, we will get users to use the
external `PropTypes` when defining context. I will update this PR if we
want a different approach.

* Remove 'addons' items from left nav, and deprecate 'addons' doc page

The plan:
[X] Remove links to 'addons' items from main navigation
[X] Add deprecation notices where appropriate, and update syntax to show
using the separate modules.
[ ] Update other references to 'React.addons' in docs. Coming in next
commit.
--- blocked but coming in future PRs
[ ] Link to a blog post describing the new locations of add-ons in the
deprecation notice on the '/docs/addons.html' page. Blocked until we
actually publish that blog post.
[ ] Move the docs for each add-on to the actual github repo where it now
lives.
[ ] Redirect the old add-ons doc permalinks to the docs in the separate
github repos for those modules.
[ ] Remove the old add-ons doc markdown files from React core docs.

* Remove references to `React.addons` from docs

Just misc. places where we referenced the 'addons' feature. All gone!
2017-04-06 17:20:54 -07:00
Andrew Clark
ce3b7ca475 Add a document on higher-order components (#7869) 2016-11-29 10:47:54 -08:00
Kevin Lacker
3a09f4bf30 forms breakup 2016-11-08 21:38:03 +00:00
Kevin Lacker
455d2d1b48 New Documentation 2016-10-21 20:59:08 +01:00
Dan Abramov
d0cc73a957 Add Implementation Notes and amend Codebase Overview (#7830)
* Add more to Codebase Overview

* WIP

* Start a reconciler overview

* Add a few more sections

* todo

* WIP

* Finish it

* Whitespace

* Minor tweaks

* Minor tweaks
2016-10-10 17:29:48 +01:00
Dan Abramov
4f345e021a Add Codebase Overview (#7828)
* Add Codebase Overview

* Update codebase-overview.md

* Update codebase-overview.md
2016-09-29 11:33:57 +01:00
Dan Abramov
c82bcefa93 Move How to Contribute to documentation and update it (#7817)
* Move How to Contribute to documentation and update it

* Consistent formatting
2016-09-27 23:20:49 +01:00
Dan Abramov
9d995720da Add Design Principles to the docs (#7282) 2016-07-14 20:37:28 +01:00
Keyan Zhang
f5a11dcc3a Blog post for error codes 2016-07-11 17:39:12 -07:00
Ben Alpert
9498747606 Remove Flux from docs nav (#6945)
Most people don't use the official Flux implementation or docs so I think this is likely to be more confusing than helpful. Maybe later we can add a better comparison of data management solutions.
2016-06-01 11:41:35 -07:00
Jim
66bfee6543 Added docs for environment integration. 2016-04-14 12:25:17 -07:00
Jim
5785a418a2 Merge pull request #6148 from jimfb/node-package-manager
Create section on using React with package managers.
2016-04-12 22:33:47 -07:00
Jim
c01c46b88a Create section on using React with package managers. 2016-04-12 12:39:49 -07:00
Paul O’Shannessy
3abc1f4a88 [docs] Update acknowledgements for v15
(cherry picked from commit 40c0867f63)
2016-04-07 15:15:44 -07:00
Joe Critchley
8886cee285 Added icon for external links in Docs nav and unlinked Complementary Tools and Examples in favor of this icon 2016-02-23 02:18:20 +00:00
Dan Abramov
f56b28c07a Added post about components, elements, and instances 2015-12-18 20:22:24 +00:00
Zach Ramaekers
ad54e49f0c adding documentation pages for shallowCompare addon 2015-12-04 08:53:33 -06:00
Jim
7a453646be Added info (example+doc) about react with webcomponents 2015-11-13 20:22:24 -08:00
Christopher Chedeau
db7522f2c5 Reactiflux is moving to Discord blog post 2015-10-19 07:35:46 -07:00
Jim
5ae4f035c7 Fix blog post authors 2015-10-14 18:01:33 -07:00
Ben Alpert
28b10a9d6a Document context
Fixes #580.
2015-10-09 14:44:24 -07:00
Paul O’Shannessy
42481fe51f [docs] Update acknowledgements for 0.14 2015-10-07 11:25:44 -07:00
Jim
a71a06077f Merge pull request #5019 from jimfb/renderer-blog-post
Blog post for react render and top level API
2015-10-02 10:42:48 -07:00
Jim
c0f951665d Blog post for react render and top level API 2015-10-01 14:12:01 -07:00
Jim
5ee8a93280 Added documentation for stateless components, condensed the two pages about refs into a single page. 2015-09-30 18:54:19 -07:00
Jared Forsyth
1343cc0c9b Add blog post about the new devtools beta 2015-08-03 14:55:05 -07:00
Paul O’Shannessy
81950edeb1 [docs] Give authors links. 2015-05-21 11:32:38 -07:00
mheiber
39442aaa84 Update cloneWithProps documentation
Updated documentation to reflect that using React.cloneElement is the new way to copy an element and preserve `key` and `ref`.

Fixes #3432, closes #3447.
2015-04-22 17:05:59 -07:00
Reed Loden
3e8951e8c7 SSL/TLSize all the things! (convert http:// to https:// where appropriate)
Update links to use https:// where it is supported. There's probably a lot
more that could be fixed, but these are the core ones I found (especially
the download links in order to prevent MITM attacks). Note that there are
some fb.me links that will redirect to http:// even while accessed over
https://, but this seemed like the best way to fix those for now.

NOTE: Only non-third-party files were modified. There are references to
http:// URLs in vendored/third-party files, but seems appropriate to fix
upstream for those rather than editing the files.

Also, copy one image locally to the blog, as it was hotlinking to a site
that did not support https://.

Last, use youtube-nocookie.com instead of youtube.com for video embeds,
as the former doesn't try to set a cookie on load (privacy enhancement).
2015-04-18 16:49:32 -07:00
Cheng Lou
9df173113b Remove mention from docs 2015-03-23 20:13:24 -04:00
Paul O’Shannessy
5f791be022 [docs] Update acknowledgements
Missed updating this in #3283 before merging.
2015-03-10 13:57:44 -07:00
Paul O’Shannessy
a95d6ff0df Update AUTHORS for 0.13 2015-03-10 13:55:55 -07:00
Ben Alpert
b7732ba7c0 Add docs for createFragment 2015-03-10 09:17:34 -07:00