Commit Graph
7001 Commits
Author SHA1 Message Date
Paul O’Shannessy 7d4e97f9e5 Update readme for 15.3.0
(cherry picked from commit 7251f6a6e9)
2016-07-29 12:17:41 -07:00
Paul O’Shannessy 26f55b4dbb Changelog for 15.3.0
(cherry picked from commit f7837682b4)
2016-07-29 12:17:41 -07:00
Paul O’ShannessyandGitHub 25aa5e36c9 [docs] Add permalink to PropTypes warning page (#7377)
Followup to #7219, which was created before the Jekyll 3 upgrade, which needs the permalink field.
2016-07-29 12:14:01 -07:00
Dan AbramovandPaul O’Shannessy 8329856a3f Add “Don't Call PropTypes” warning (#7219) 2016-07-29 12:04:33 -07:00
Dustan KastenandPaul O’Shannessy 7e874f59f5 ReactTestRenderer package (#7362) 2016-07-28 21:39:05 -07:00
Keyan ZhangandGitHub c9dc2ab0ec fixed incorrect doc location (#7365) 2016-07-28 11:03:07 -07:00
Cheng LouandGitHub 0292d34047 PropTypes: distinguish nullable from optional object field (#7291)
* PropTypes: distinguish nullable from optional object field

This gives a more precise message (no type semantics change) to the case of passing a field in an object, but whose value is `null`:

Before:

```js
propTypes: {
  foo: React.PropTypes.number.isRequired
}
```

Would scream "Required prop `foo` was not specified in `MyComp`".

Now it'll be "Required prop `foo` was specified in `MyComp`, but its value is `null`.".

Works as expected in nested objects.

This fixes the issue of a component transitively passing a `null`, specifying the correct field to the child but have the child tell it that it didn't provide the prop.

Optional field and nullable are two different things anyway.

* Add missing test case.

* Reword messages.
2016-07-26 16:26:51 -07:00
Jackson HuangandKeyan Zhang fe5128fe8f Create 02-displaying-data.zh-TW.md (#7284)
* Create 02-displaying-data.zh-TW.md

* Update 02-displaying-data.zh-TW.md
2016-07-26 13:45:12 -07:00
Ben AlpertandGitHub 30aa84181d Remove unused unmountIDFromEnvironment (#7259)
I got rid of the need for this a few months ago.
2016-07-25 23:34:22 -07:00
Patrick FinniganandPaul O’Shannessy 85dcbf83c5 fix doc for React Native mountComponent (#7313) 2016-07-25 16:19:15 -07:00
Gert HengeveldandPaul O’Shannessy 9d33fb0b76 Added ReactNL conference (#7342) 2016-07-25 16:17:05 -07:00
Amjad MasadandPaul O’Shannessy d157827311 "transient dependencies" -> "transitive dependencies" (#7341)
I think that's what you meant -- although with npm dependencies are kind of transient :P
2016-07-25 16:16:11 -07:00
scloudyyandKeyan Zhang 5b06667efd Update docs zh cn (#7254)
* update 03-interactivity-and-dynamic-uis.zh-CN

* update 04-multiple-components.zh-CN

* update 05-reusable-components.zh-CN

* updat 06-transferring-props.zh-CN

* update 07-forms.zh-CN

* update 08-working-with-the-browser.zh-CN

* update 08 and 08.1

* update 09-tooling-integration.zh-CN

* revise

* don't use ES6
2016-07-25 12:23:45 -07:00
Veljko TornjanskiandPaul O’Shannessy 0805921883 Wording change in doc (#7348) 2016-07-25 11:59:15 -07:00
Keyan ZhangandGitHub 484f96bb61 Merge pull request #7321 from keyanzhang/codemod-es6-component
Codemod tests from createClass to ES2015 classes
2016-07-23 15:22:35 -07:00
Keyan Zhang 4d8a5bcd5c codemodded tests from createClass to ES2015 classes
- reverted more files under classic
2016-07-23 15:16:12 -07:00
Keyan Zhang bf26e70374 upgraded babel-plugin-transform-class-properties
- babel/babel#3589 fixed inferring class name
2016-07-23 15:16:12 -07:00
Nathan HunzakerandBen Alpert 08a0895887 Avoid validation warning when inputs change type (#7333)
For controlled inputs, `updateWrapper` was getting called before the
`type` prop had a chance to update. This could lead to a case where
switching from the `text` to `number` type caused a validation error
that would prevent the proper input value from being assigned.

This commit moves the call to `ReactDOMInput.updateWrapper` below
`_updateProperties` to avoid this situation.
2016-07-22 18:38:29 -07:00
SeyiandPaul O’Shannessy 1fc5f284c0 Blog post: Fixed typo in post (#7336) 2016-07-22 12:40:46 -07:00
Paul O’ShannessyandGitHub 7614c12ed7 Host our own images for the blog, use https links (#7339) 2016-07-22 12:36:07 -07:00
Steven SyrekandDan Abramov c0b7d81872 Correct grammatical error (subject-verb agreement) (#7338)
"It is worth repeating: there is no configuration files or complicated folder structures." > "It is worth repeating: there are no configuration files or complicated folder structures."
2016-07-22 19:13:11 +01:00
Dan Abramov 6e3b69f055 Add blog post 2016-07-22 16:58:33 +01:00
Keyan ZhangandDan Abramov 3fd582643e improved warning in ReactUpdateQueue (#7326) 2016-07-21 12:41:31 +01:00
Keyan ZhangandGitHub fc04e853f8 Add babel-plugin-transform-class-properties (#7322)
* added babel-plugin-transform-class-properties

* removed babel-plugin- prefix
2016-07-20 17:39:10 -07:00
Paul O’ShannessyandGitHub 5ac1bae58e Switch Travis CI to Trusty Beta (#7309) 2016-07-20 11:47:16 -07:00
Alex ZherdevandDan Abramov 8bcea5310e Mention actual prop type in element type checker (#7319) 2016-07-20 19:16:55 +01:00
Paul O’ShannessyandGitHub 5e3959e071 Merge pull request #7308 from zpao/jekyll3
Upgrade to Jekyll 3
2016-07-19 16:33:59 -07:00
Paul O’Shannessy 5e18eb3487 Finish Jekyll 3 Upgrade
- Reverts change to use sectionid on layouts (was unreliable), using config to make sure that's specified on all pages that need it
- Adds permalinks to all other pages so that og data is correct
- Corrects some permalinks that were in correct (translations)
2016-07-19 15:08:58 -07:00
Daniel Lo NigroandPaul O’Shannessy 6d537e939f Upgrade to Jekyll 3
Full list of changes is at https://jekyllrb.com/docs/upgrading/2-to-3/. The tl;dr of it is:
 - Relative permalinks were removed, so all the files in the `docs` subdirectory need their permalink to be prefixed with `docs/`
 - `post` and `page` types were renamed to `posts` and `pages` respectively
 - `jekyll-paginate`, `pygments` and `redcarpet` are all now optional, so I needed to explicitly add it to the Gemfile. Jekyll now uses `rouge` rather than `pygments` for syntax highlighting, but rouge does not support highlighting individual lines (`hl_lines`) so we need to continue using Pygments.
 - Layout metadata (eg. `sectionid`) is now on a `layout` variable rather than `page`

Tested the following pages and confirmed that they all work:
 - "Docs" link (getting started page): http://127.0.0.1:4000/react/docs/getting-started.html
 - Downloads: http://127.0.0.1:4000/react/downloads.html
 - Tutorial: http://127.0.0.1:4000/react/docs/tutorial.html
 - A few pages under the "docs" subdirectory, to confirm they're working properly:
    - http://127.0.0.1:4000/react/docs/addons.html
 - http://127.0.0.1:4000/react/docs/why-react.html
 - http://127.0.0.1:4000/react/docs/create-fragment.html
 - A few tips:
    - http://127.0.0.1:4000/react/tips/false-in-jsx.html
 - http://127.0.0.1:4000/react/tips/style-props-value-px.html
 - Non-English versions of the page:
    - http://127.0.0.1:4000/react/docs/getting-started-it-IT.html
    - http://127.0.0.1:4000/react/docs/getting-started-ja-JP.html
2016-07-19 12:18:49 -07:00
Paul O’Shannessy c3ce0f24c9 Update website for 15.2.1
(cherry picked from commit ea880f2e2c)
2016-07-19 12:17:34 -07:00
Paul O’Shannessy 1252739c84 Update readme for 15.2.1
(cherry picked from commit 5597ca70be)
2016-07-19 12:17:34 -07:00
Paul O’Shannessy cae816cf09 changelog for 15.2.1
(cherry picked from commit 6b19617333)

Changelog fixes

(cherry picked from commit dfb5cc306f)

Fix typo in previous changelog update

(cherry picked from commit 57a1ebb809)
2016-07-19 12:17:20 -07:00
Sassan HaradjiandDan Abramov 1cc9a5dc71 prevent spamming warnings related to performance measurement code (#7299)
* prevent spamming warnings related to performance measurement code

* minor changes in names and such

* -

* -
2016-07-19 11:46:12 +01:00
Dan AbramovandGitHub 15ae5857f6 Eagerly evaluate inline requires in Jest (#7245)
* Eagerly evaluate inline requires in Jest

I inlined some requires in #7188 to fix the build size regression.
However this caused an issue with Jest due to it resetting module registry between tests.

This is a temporary fix to #7240.
It should be reverted as part of #7178.

* Make the hack work in all environments
2016-07-16 20:51:25 +01:00
Dan AbramovandGitHub 6c9da39514 Clarify the section about dogfooding (#7292) 2016-07-16 15:02:20 +01:00
Dan AbramovandGitHub dc11e615ad Minor tweaks to Design Principles (#7283) 2016-07-14 21:29:11 +01:00
Dan AbramovandGitHub 9d995720da Add Design Principles to the docs (#7282) 2016-07-14 20:37:28 +01:00
Dan AbramovandGitHub 27d7592cf6 Fix TestUtils crash with NODE_ENV=production (#7246)
I caused it with #7189.
We generally don’t recommend running TestUtils in production environment but this is technically a regression.

Fixes #7231.
2016-07-14 12:02:39 +01:00
Fernando Alex HelwangerandDan Abramov f6d4293003 Add mixins property to context example (#7277) 2016-07-14 10:43:47 +01:00
Troy DeMonbreunandPaul O’Shannessy fc04310792 Fix #7099 (#7251)
* Set step prop before value prop

* Embed comments on .step sequence behavior
2016-07-13 13:28:14 -07:00
Paul O’ShannessyandGitHub 0bfaf5156d [docs] Follow up to 6972 - update docs code (#7278) 2016-07-13 13:17:09 -07:00
segmentationfaulterandPaul O’Shannessy bf0572dde7 Update 03-interactivity-and-dynamic-uis.md (#6972) 2016-07-13 13:14:41 -07:00
Mert KahyaoğluandPaul O’Shannessy 2da50a0f18 Renaming: ReactDOM (#7265)
Rename React with ReactDOM
2016-07-13 12:59:02 -07:00
Brandon DailandPaul O’Shannessy cccef3c683 Add referrerPolicy to HTMLDOMPropertyConfig (#7274) 2016-07-13 11:56:57 -07:00
Dan AbramovandGitHub f02cbba9fd Fix typos in “Mixins Considered Harmful” (#7275)
* Fix typos in “Mixins Considered Harmful”

* Use consistent code style
2016-07-13 18:46:21 +01:00
Dan AbramovandGitHub b0136b37c5 Add a new blog post about mixins (#7273) 2016-07-13 17:40:53 +01:00
Keyan ZhangandGitHub 5103e1d6a1 warn for using maps as children with owner info (#7260) 2016-07-13 08:29:42 -07:00
Ben AlpertandGitHub caec8d5ce7 Test renderer improvements (#7258)
Adds `.update(newElement)` and `.unmount()` and makes children reorders and composite type swapping work.

Part of #7148.
2016-07-12 22:35:31 -07:00
Ben AlpertandGitHub e5513eceff Update benchmarks to be more realistic polymorphically (#7255)
Previously, the extract-components script would create the same number of layers of composites as the page it captures, but it would output a new class for each time any composite is used (since we don't want to replicate all the component logic).

I changed the script to output a single type for each type in the input -- and each generated component takes an index for which output it should return. This should be closer to how the original code behaves, especially with respect to VM function call lookups where the amount of polymorphism makes a difference.

I re-recorded the benchmarks with the new scripts. They run significantly faster:

```
Comparing old.txt (control) vs new.txt (test)
Significant differences marked by ***
% change from control to test, with 99% CIs:

* ssr_pe_cold_ms_jsc_jit
    % change: -41.73% [-43.37%, -40.09%]  ***
    means: 39.3191 (control), 22.9127 (test)
* ssr_pe_cold_ms_jsc_nojit
    % change: -44.24% [-46.69%, -41.80%]  ***
    means: 45.8646 (control), 25.5764 (test)
* ssr_pe_cold_ms_node
    % change: -45.61% [-47.38%, -43.85%]  ***
    means: 90.1118 (control), 49.0116 (test)
```

This is probably in part due to the changes here, but also the page I captured has changed somewhat in the meantime and there seem to be slightly fewer components in the hierarchy, so they're not really comparable. But going forward we can use this benchmark which should be more accurate. I also included an identical copy that uses stateless functional components so we can test optimizations to those later.
2016-07-12 19:32:51 -07:00
Kent C. DoddsandBen Alpert 12bc80a6dc Add link to video chat with @spicyj (#7252) 2016-07-12 14:42:19 -07:00