Commit Graph
7337 Commits
Author SHA1 Message Date
Andrew Clark 245ea0c358 Blog post and changelog for 15.5.0 (#9368) 2017-04-07 14:46:29 -07:00
Andrew Clark c54ad571e5 Update React version in docs 2017-04-07 14:35:00 -07:00
Andrew Clark ec97ebbe7f Fix erroneous PropTypes access warning 2017-04-07 14:26:37 -07:00
Andrew Clark e19c70013e 15.5.0 v15.5.0 2017-04-07 14:21:27 -07:00
Andrew Clark be8f6fd62b Update yarn lockfile 2017-04-07 14:20:17 -07:00
Andrew Clark cf205f35f4 Merge branch '15.5-dev' into 15-stable 2017-04-07 14:18:32 -07:00
Flarnie Marchan 4a3b790ce4 Update example snippet in old 'React.addons' doc page (#9363)
* Update example snippet in old 'React.addons' doc page

This makes the example more consistent.

* Add back the pointers in docs that were mistakenly removed

In https://github.com/facebook/react/pull/9359 we accidentally removed
pointers in some doc pages. Putting them back now.

* Link to npm package instead of github page

This seems like a more stable place to link to in the 'context'
document.
Based on @bvaughn's feedback in https://github.com/facebook/react/pull/9359
2017-04-07 14:13:53 -07:00
Flarnie Marchan 0420e96a41 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-07 14:12:10 -07:00
Damian Nicholson 364d4a4ea1 Added semicolons to addons imports examples. (#9287) 2017-04-07 14:10:01 -07:00
najisawas 7a11c572e6 Fixed typo on implementation notes page (#9258)
Added paren to "mountComponent()" for consistency
2017-04-07 14:06:58 -07:00
Giorgio Polvara 9b4d42ca64 Fix typo (#7953) 2017-04-07 14:06:36 -07:00
Dan Abramov b3ec0cb488 Remove examples/ folder (#9323) 2017-04-07 14:05:17 -07:00
Aaron Cannon b596e0bcaa Make it clear that textarea also supports defaultValue. (#9318) 2017-04-07 14:04:03 -07:00
Justin b9f9b3cce6 Fix grammar typo in Design Principles docs (#9324)
features → feature
> There is nothing "bad" about using state or lifecycle hooks in components. Like any powerful feature**s**, they should be used in moderation, but we have no intention to remove them.

I can’t explain the exact grammatical principle this violates, but it sounds wrong to my native English ears that “feature” is plural here. Another way to check if the grammar sounds right is to change the order of the clauses: ”They should be used in moderation, like any powerful feature“ sounds right, whereas “They should be used in moderation, like any powerful features” does not.
2017-04-07 14:03:46 -07:00
Dan Abramov c549c8b66e Update build paths in docs (#9340) 2017-04-07 14:03:09 -07:00
Andrew Clark 15b507c5c4 Add .createRenderer method to ReactShallowRenderer 2017-04-07 13:46:20 -07:00
Andrew Clark 4ee1651e54 Update changelog 2017-04-07 01:21:25 -07:00
Andrew Clark 9ba974aff4 Update changelog for 15.5.0 2017-04-06 17:14:44 -07:00
Brian Vaughn d1bae78189 Updated packages for 15.5.0-rc.2 2017-04-06 16:09:55 -07:00
Andrew Clark ce74e00e5a Fix ReactWithAddons umd build 2017-04-06 16:03:49 -07:00
Brian Vaughn 28a179021e Merge branch '15.5-dev' of github.com:facebook/react into 15.5-dev 2017-04-06 14:55:21 -07:00
Brian Vaughn 1d22ff7fa1 Replaced ReactTestReconcileTransaction with ReactReconcileTransaction in shallowRenderer 2017-04-06 14:55:11 -07:00
Andrew Clark 22bde0e5ba Update yarn.lock in addons 2017-04-06 14:31:51 -07:00
Andrew Clark 49868d8615 Fix references to React.createClass and React.PropTypes 2017-04-06 14:21:49 -07:00
Brian Vaughn 486bbf0fe8 Added prop-types dep for react-linked-input and re-built 2017-04-06 13:47:34 -07:00
Andrew Clark 12a96b9482 Fix references to React.createClass and React.PropTypes 2017-04-06 13:17:34 -07:00
Brian Vaughn d11c5467bd Replaced another console.error() call with fbjs warning() 2017-04-06 11:39:31 -07:00
Brian Vaughn 4f5aa2e40d Replaced console.error() in test utils with warning() 2017-04-06 11:36:58 -07:00
Brian Vaughn 714e5ea65e Moved shallow renderer injections into render() method to avoid conflict with react-dom 2017-04-06 11:29:41 -07:00
Andrew Clark 72531d330d TransitionGroup should use prop-types package 2017-04-06 11:07:46 -07:00
Brian Vaughn 67e3e0e856 Added missing files:test-utils.js entry to react-dom package.json 2017-04-06 10:56:57 -07:00
Andrew Clark 1f487eb933 15.5.0-rc.1 2017-04-05 11:39:12 -07:00
Andrew Clark 94313e9a09 Update yarn lockfile 2017-04-05 11:28:19 -07:00
Andrew Clark 40b37c64c8 Uncommenting this warning even though tests haven't been updated yet
I'll fix the tests later.
2017-04-05 11:21:08 -07:00
Brian Vaughn f686b8195b Updated react-addons-test-utils package.json for RC 2017-04-04 14:38:30 -07:00
Andrew Clark 043845ce75 Extract ReactPropTypes to separate module 2017-04-04 14:29:11 -07:00
Brian Vaughn 3a7eef2bcf Test utils deprecations and updates:
1. Moved react-addons-test-utils to react-dom/test-utils and added deprecation message.
2. Moved shallow renderer (previous accessible via TestUtils.createRenderer) to react-test-renderer/shallow and added deprecation message.
3. Updated READMEs for react-addons-test-utils and react-test-renderer
2017-04-04 13:47:05 -07:00
Brian Vaughn 550381b57a Converted react-addons-create-fragment to ES5 and bumped to 15.5.1 2017-04-02 11:21:34 -07:00
Brian Vaughn ca2e8861e5 Replaced react-create-class references with create-react-class 2017-03-31 14:59:50 -07:00
Brian Vaughn f42f38e1ba Renamed react-create-class to create-react-class and fixed up tests to run in addons folder 2017-03-31 14:50:24 -07:00
Brian Vaughn e264323124 Changed dev-deps to 15.4.2 by default rather than 16.0.0 2017-03-31 14:22:13 -07:00
Brian Vaughn 8ae798a089 Added dev deps for testing 2017-03-31 14:22:01 -07:00
Brian Vaughn 90def2bf22 Added missing dev-deps for react-addons-update and prepped for release 15.5.0 2017-03-31 14:07:15 -07:00
Brian Vaughn 86979e36d5 Updated package.json version 2017-03-31 13:44:21 -07:00
Brian Vaughn 168d13713a Added yarn.lock file; updated package.json for 15.5.0 2017-03-31 13:34:53 -07:00
Brian Vaughn 34eab5d7fe Prepped for 15.5 release; added Yarn lockfile. Added missing devDep to package.json 2017-03-31 13:30:24 -07:00
Brian Vaughn 14ee35a791 Prep for 15.5.0 2017-03-31 12:45:59 -07:00
Brian Vaughn 5c8d40b5f1 Prepping for 15.5.0 release of react-addons-css-transition-group 2017-03-31 10:58:44 -07:00
Brian Vaughn 4e19d810df Updated package.json for react-addons-create-fragment 2017-03-31 10:53:04 -07:00
Brian Vaughn f803f77561 Added devDeps for react-addons-create-fragment to make testing easier 2017-03-31 10:46:46 -07:00