Compare commits

..

1590 Commits

Author SHA1 Message Date
Jim
76c87da026 Blog post for react render and top level API
(cherry picked from commit c0f951665d)
2015-10-02 12:01:52 -07:00
Trinh Hoang Nhu
fcc51bc523 Add missing comma (,) between propTypes and render
Add missing comma (,) between `propTypes` and `render`
(cherry picked from commit 3c56146a44)
2015-10-02 12:01:28 -07:00
Yuichi Hagio
8e495cd849 Update 02-displaying-data.ja-JP.md
1. Fixed a spelling mistake to be more readable.
2. Removed the English lines that were already translated below.
(cherry picked from commit d724393f0e)
2015-10-02 12:00:38 -07:00
Paul O’Shannessy
9c89a5b73d Install babel, shrinkwrap 2015-09-25 20:29:27 -07:00
Vipul A M
2f76d0016d Cherry-pick squashed version of #4131 - switch website to use babel 2015-09-25 20:29:26 -07:00
Paul O’Shannessy
d5680caefe Merge pull request #4846 from zpao/docs-use-babel
[docs] Remove references to react-tools, JSXTransformer, replace with Babel.
(cherry picked from commit d3d2504e72)
2015-09-25 20:24:55 -07:00
Paul O’Shannessy
64ff2ea3c6 Merge pull request #4978 from zpao/tutorial-server
[docs] Make the server required for the tutorial
(cherry picked from commit 6ff4ba9512)
2015-09-25 20:22:54 -07:00
Paul O’Shannessy
4597bf074b Merge pull request #4956 from reggi/patch-1
doc: typo existant to existent
(cherry picked from commit 1ce5ba4c56)
2015-09-25 20:22:46 -07:00
Paul O’Shannessy
fe9fa883bb Merge pull request #4853 from zpao/jsfiddle-babel
[docs] Add jsfiddle integration for Babel
(cherry picked from commit 78b50485f6)
2015-09-25 20:22:38 -07:00
Paul O’Shannessy
7077c5ed96 Merge pull request #4931 from bspaulding/safe-taint-docs
Extracted "safe taint" in docs/homepage to align with best practice
(cherry picked from commit 06568114f3)
2015-09-22 11:04:48 -07:00
Paul O’Shannessy
217c54d7a7 Merge pull request #4921 from benjaffe/master
[docs] Clarify when autobinding does(n't) happens
(cherry picked from commit 56ccd82374)
2015-09-22 11:04:43 -07:00
Paul O’Shannessy
a3adc3a2d6 Merge pull request #4899 from iamchenxin/master
Update zh-CN docs.
(cherry picked from commit aac4219e80)
2015-09-22 11:04:36 -07:00
Paul O’Shannessy
6a43405632 Merge pull request #4802 from 8398a7/patch-1
Update Japanese translation to 75fafe1

(cherry picked from commit c6ecda7503)
2015-09-22 11:03:31 -07:00
Paul O’Shannessy
fd290d7c6d Merge pull request #4874 from brigand/patch-6
Clarifies "Fetching from the server"
(cherry picked from commit 609f14eed4)
2015-09-14 20:44:03 -07:00
Paul O’Shannessy
2c42c7cfa2 Merge pull request #4868 from AnSavvides/docs-readability
Make docs more consistent
(cherry picked from commit e97da42b67)
2015-09-14 19:45:46 -07:00
Paul O’Shannessy
1da84956be Merge pull request #4869 from arush/patch-1
DOCS - typo in ref callback example
(cherry picked from commit b53dfa6d27)
2015-09-14 19:45:42 -07:00
Jim
b8d2947689 Merge pull request #4855 from iamchenxin/master
Maintain why-react-zh-CN sync to the current why-react
(cherry picked from commit 2fcf54939b)
2015-09-14 19:45:38 -07:00
Paul O’Shannessy
de0f651d15 Merge pull request #4833 from youngminz/master
Update Korean translation
(cherry picked from commit ed11f83763)
2015-09-14 19:45:15 -07:00
Steven Luscher
d62018227e Community Roundup #27 – Relay Edition
(cherry picked from commit f30b0d1f1c)
2015-09-14 08:36:48 -07:00
Ben Alpert
080c48c090 Add Babel version to blog post
(cherry picked from commit 4b3b56f36a)
2015-09-10 13:29:26 -07:00
Paul O’Shannessy
5b193e03eb Merge pull request #4824 from facebook/prefill-stack-overflow-tag
Pre-fill tag when asking a Stack Overflow question
(cherry picked from commit 12b6f3d03c)
2015-09-10 10:01:09 -07:00
Paul O’Shannessy
299b2fdd5c Merge pull request #4780 from matchu/patch-1
avoid the phrase "key property"
(cherry picked from commit ea8e06283c)
2015-09-10 10:01:06 -07:00
Paul O’Shannessy
ad3a024f9b Merge pull request #4739 from henrik/patch-1
docs: "also lets pass" -> "also lets you pass"
(cherry picked from commit dc23faf64d)
2015-09-10 10:00:57 -07:00
Paul O’Shannessy
80dd480a47 Merge pull request #4724 from AnSavvides/test-util-readability
Make definitions more readable & optional params more obvious
(cherry picked from commit 77703dbb80)
2015-09-10 10:00:52 -07:00
Ben Alpert
dcfbf801e4 Merge pull request #4703 from spicyj/rarr
Clarify use of arrow functions
(cherry picked from commit d4f38933f2)
2015-09-10 10:00:46 -07:00
Ben Alpert
32663aabc6 0.14 RC blog post
(cherry picked from commit 5bf56134be)
2015-09-10 09:51:13 -07:00
Ben Alpert
ad8e207c32 New devtools blog post
(cherry picked from commit f5bd8fc0ad)
2015-09-02 15:16:12 -07:00
Edvin Erikson
7f1c1022b5 Updated event pooling note in docs
(cherry picked from commit 6793a7197e)
2015-08-31 11:28:33 -07:00
Edvin Erikson
e5a89f5865 Added documentation about pooled events
(cherry picked from commit 1e3c3e1b6b)
2015-08-31 11:28:33 -07:00
Paul O’Shannessy
4fda63c77b Merge pull request #4684 from lyip1992/patch-3
Update 10.1-animation.md
(cherry picked from commit 27e5a563db)
2015-08-25 09:56:13 -07:00
Paul O’Shannessy
1ba4023de0 Merge pull request #4686 from lyip1992/patch-5
Update 06-transferring-props.md
(cherry picked from commit d5e5261e38)
2015-08-25 09:56:13 -07:00
Paul O’Shannessy
f4dfb0a184 Merge pull request #4687 from lyip1992/patch-6
Update 04-multiple-components.md
(cherry picked from commit 7dbcff2df4)
2015-08-25 09:56:13 -07:00
Paul O’Shannessy
dc8c5b1ecf Merge pull request #4688 from lyip1992/patch-7
Update 02.3-jsx-gotchas.md
(cherry picked from commit cca1065183)
2015-08-25 09:56:12 -07:00
Paul O’Shannessy
7263473999 Merge pull request #4685 from lyip1992/patch-4
Update 08.1-more-about-refs.md
(cherry picked from commit adfbc64d4b)
2015-08-25 09:56:12 -07:00
Paul O’Shannessy
bcbad461d1 Merge pull request #4678 from ning-github/patch-1
Remove redundancy regarding 'latest React news'
(cherry picked from commit 6508b1ad27)
2015-08-25 09:56:12 -07:00
Jim
b01f1c920c Merge pull request #4679 from ning-github/patch-2
Fix typo
(cherry picked from commit b36ee449cb)
2015-08-25 09:56:12 -07:00
Ben Alpert
c20b8fec2f Fix formatting in test utils docs
(cherry picked from commit 66881ae083)
2015-08-25 09:48:07 -07:00
Ben Alpert
356b8f3559 Capitalize Babel
(cherry picked from commit 61962c1751)
2015-08-20 13:34:23 -07:00
Kyle Kelley
7d914eab27 Update tooling docs to suggest babel
`react-tools` is deprecated, `babel` is our future

* https://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html
* https://babeljs.io/docs/usage/jsx/

(cherry picked from commit 009902bcd0)
2015-08-20 13:16:32 -07:00
Ben Alpert
9cd6048720 Spruce up refs docs
Fixes #4651.

(cherry picked from commit 1db20999f0)
2015-08-19 16:35:58 -07:00
Tyler Brock
3154f055cf Clarify invocation order of componentDidMount
OP is delivering on promise made here: https://discuss.reactjs.org/t/how-do-you-invoke-the-render-callback-in-jsx/1744
(cherry picked from commit 1e10bb5923)
2015-08-19 16:35:57 -07:00
Levi Buzolic
b793785882 Update Advanced Performance code examples so they would output values
Noticed the code examples in *Advanced Performance* wouldn't be rendering the example props, this could lead to some minor confusion for new users.
(cherry picked from commit 009f766d6e)
2015-08-19 16:35:57 -07:00
Mikolaj Dadela
cfa922a3d7 Updated the Performance tools doc page.
Now it’s possible to read the page from top to the bottom without
asking oneself “Ok, but how do I get these measurements?”

(cherry picked from commit 75fafe1c0b)
2015-08-19 16:35:57 -07:00
Kohei TAKATA
a4e0bf2fc7 Translate ref-01-top-level-api.md to Japanese
(cherry picked from commit ae38ea9275)
2015-08-19 16:35:57 -07:00
MIKAMI Yoshiyuki
7a623e21fd Fix Markdown conversion with marked
(cherry picked from commit 47ce8ecacb)
2015-08-19 16:35:57 -07:00
Kohei TAKATA
6d8930650c Translate 01-introduction.md to Japanese
(cherry picked from commit edca54fb93)
2015-08-19 16:35:57 -07:00
li.li
0093870008 update component api docs
(cherry picked from commit f027ca8ca0)
2015-08-19 16:35:57 -07:00
Domenico Matteo
fd2e0bae59 improve ReactTestUtils.Simulate documentation
(cherry picked from commit 97e219e785)
2015-08-19 16:35:57 -07:00
Matthew Johnston
5ef792995f ReactEurope roundup blog post
(cherry picked from commit 0b07fed32c)
2015-08-13 17:16:28 -07:00
Paul O’Shannessy
841ba07f24 Fix grammar in Relay blog post
Brings in #4617 properly

(cherry picked from commit 530a30c1d5)
2015-08-12 12:10:31 -07:00
Paul O’Shannessy
0ec71215de Merge pull request #4619 from jaredly/beta-2
update devtools post to note beta 2
(cherry picked from commit 1b7d6c381f)
2015-08-12 12:08:33 -07:00
Jim
e719951cdd Merge pull request #4613 from tako-black/translate_advanced-performance_to_japanese
Translate 11-advanced-performance.md to Japanese
(cherry picked from commit d7b59de1c3)
2015-08-12 12:04:59 -07:00
Jim
95463d395d Merge pull request #4602 from tako-black/update_tutorial_ja-JP
Change tutorial.ja-JP.md to use marked
(cherry picked from commit bcd32768e6)
2015-08-12 12:04:59 -07:00
Sebastian Markbåge
2dc652a900 Merge pull request #4554 from chernysh/chernysh-added-docs-img-events
Added documentation for <img> events
(cherry picked from commit 7f119d41c7)
2015-08-12 12:04:24 -07:00
Jim
62487d9233 Merge pull request #4552 from psibi/patch-1
Include Haskell language
(cherry picked from commit c97ed7b804)
2015-08-12 12:01:52 -07:00
Jim
abf95dcbd2 Merge pull request #4381 from mikrofusion/clarify-main-ideas
clarify the two main ideas behind react.
(cherry picked from commit ff7996b58a)
2015-08-12 12:01:51 -07:00
Jim
d2544377e3 Merge pull request #4541 from marocchino/update-korean
Update Korean translation to e88c7bf
(cherry picked from commit 134e0700cd)
2015-08-12 12:01:29 -07:00
Jim
0ef62a8ea1 Merge pull request #4537 from afhole/patch-1
Update 02.1-jsx-in-depth.md
(cherry picked from commit 50d73f9a13)
2015-08-12 11:58:32 -07:00
Paul O’Shannessy
58bc35de1c Merge pull request #2664 from jasonwebster/patch-1
Add additional supported methods to event documentation
(cherry picked from commit b766c62bb9)
2015-08-12 11:58:32 -07:00
Jim
223fc26ee7 Merge pull request #4506 from tako-black/translate_perf_to_japanese
Translate 10.9-perf.md to Japanese
(cherry picked from commit 98d4fde55c)
2015-08-12 11:58:31 -07:00
Jim
f0abb45dce Merge pull request #4469 from KevinTCoughlin/kevintcoughlin/#4265
Fixes #4265 - Clarify React.render note in documentation
(cherry picked from commit fab001aa80)
2015-08-12 11:58:31 -07:00
Jim
22eb779351 Merge pull request #4495 from tako-black/translate_pure-render-mixin_to_japanese
Translate 10.8-pure-render-mixin.md to Japanese
(cherry picked from commit be39979460)
2015-08-12 11:58:31 -07:00
Paul O’Shannessy
158d1c7755 Merge pull request #4486 from yangmillstheory/docfix
Fix grammar
(cherry picked from commit 3056066ede)
2015-08-12 11:58:31 -07:00
Jim
041248881b Merge pull request #4483 from marocchino/update-korean
Update Korean translation to 991c437
(cherry picked from commit 44997df9eb)
2015-08-12 11:58:30 -07:00
Joseph Savona
cac6bc870d Relay Technical Preview - blog post 2015-08-11 12:09:17 -07:00
youmoo
35225abeba Update 2015-05-01-graphql-introduction.md
Or the alternative:

`REST is an acronym for Representational State Transfer, which is an architectural style rather than a formal protocol`.

Sorry , I'am not a native speaker:)
(cherry picked from commit 0a19e0c0e5)
2015-08-07 19:32:32 -07:00
Jared Forsyth
f92f1e7f33 Add blog post about the new devtools beta
(cherry picked from commit 1343cc0c9b)
2015-08-03 15:15:29 -07:00
Jim
6e4865946b Merge pull request #4478 from tako-black/translate_update_to_japanese
Translate 10.7-update.md to Japanese
(cherry picked from commit f23fe004bb)
2015-07-24 17:41:25 -07:00
Paul O’Shannessy
252f3571e5 Merge pull request #4386 from AnSavvides/4369-walkthrough-clarification
[#4369] Make getting started a little less confusing
(cherry picked from commit bcfba9178f)
2015-07-24 17:41:25 -07:00
Jim
55fe64dd94 Merge pull request #4472 from tako-black/translate_create-fragment_to_japanese
Translate 10.6-create-fragment.md to Japanese
(cherry picked from commit 318c288bd3)
2015-07-24 17:41:25 -07:00
Jim
fa05a157e4 Merge pull request #4459 from tako-black/translate_clone-with-props_to_japanese
Translate 10.5-clone-with-props.md to Japanese
(cherry picked from commit 3dcc4b8b90)
2015-07-24 17:41:24 -07:00
Jim
ae5224a05f Merge pull request #4471 from Yeti-or/yeti-or.fix-docs
Docs: Fix jsx iife example
(cherry picked from commit 42caf036e2)
2015-07-24 17:41:24 -07:00
Jim
9aa45c7517 Merge pull request #4460 from tako-black/enclose_variables_in_back_quote
Enclose variables in back quote
(cherry picked from commit b71ad1f600)
2015-07-24 17:41:24 -07:00
Jim
95f77e6c0a Merge pull request #4455 from marocchino/update-korean
Update Korean translation to e928c65
(cherry picked from commit e10c873d09)
2015-07-24 17:41:24 -07:00
Paul O’Shannessy
a8c729ee7b Merge pull request #4404 from jbonta/component_api_docs
Make component api docs clearer
(cherry picked from commit 82a9a5595e)
2015-07-24 17:41:24 -07:00
Jim
503b3cfe0a Merge pull request #4443 from tako-black/translate_test-utils_to_japanese
Translate 10.4test-utils.md to Japanese
(cherry picked from commit f000fa564e)
2015-07-24 17:41:23 -07:00
Jim
0229aea457 Merge pull request #4444 from tako-black/Add_period
Add period
(cherry picked from commit dc0d4bae7b)
2015-07-24 17:41:23 -07:00
Ben Alpert
b7f9cd4f25 counterexample -> antipattern
(cherry picked from commit d13fafa5dd)
2015-07-20 08:29:11 -07:00
Paul O’Shannessy
f8477dcf58 Merge pull request #4413 from zpao/more-default-value-docs-chagnes
Tweaks to new content in forms documentation
(cherry picked from commit c72f2e455a)
2015-07-17 14:24:29 -07:00
Jim
ff19f79a33 Merge pull request #4379 from eriklharper/patch-1
Add more information about defaultValue
(cherry picked from commit 976b51adf8)
2015-07-17 14:24:28 -07:00
Jim
c4d8d1503d Merge pull request #4407 from Simek/patch-4
split code block for readability
(cherry picked from commit aa5f503595)
2015-07-17 14:24:28 -07:00
Jim
ab9f340857 Merge pull request #4409 from tako-black/translate_class-name-manipulation_to_japanese
Translate 10.3-class-name-manipulation.md to Japanese
(cherry picked from commit b66fa7eb05)
2015-07-17 14:24:28 -07:00
Paul O’Shannessy
ef7ff3ba88 Merge pull request #3186 from benekastah/patch-1
Modify sample CSS so that it works in Safari
(cherry picked from commit ddb84f44a8)
2015-07-17 14:24:28 -07:00
Jim
6297aa4118 Merge pull request #4382 from tako-black/enclose_a_name_of_library_in_back_quote
Enclose a name of library in back quote
(cherry picked from commit d6c062b213)
2015-07-17 14:24:27 -07:00
Jim
26fa6256e5 Merge pull request #4383 from tako-black/translate_form-input-binding-sugar_to_japanese
Translate 10.2-form-input-binding-sugar.md to Japanese
(cherry picked from commit d76a686c7f)
2015-07-17 14:24:27 -07:00
Jim
04539d9e17 Merge pull request #4377 from sugarshin/typo_docs
Delete unnecessary control code.
(cherry picked from commit 432d887f4a)
2015-07-17 14:24:27 -07:00
Jim
329efd4d70 Merge pull request #4371 from tako-black/translate_animation_to_japanese
Translate 10.1-animation.md to Japanese
(cherry picked from commit 704ea0bb83)
2015-07-17 14:24:27 -07:00
Paul O’Shannessy
1d9ee9dcdb Merge pull request #4144 from lukehorvat/docs/iife-jsx
Add IIFE example to JSX documentation
(cherry picked from commit 4d178415e8)
2015-07-17 14:24:27 -07:00
Paul O’Shannessy
b84f325a20 Merge pull request #4291 from rwoodnz/patch-2
indicate file name requried for static file
(cherry picked from commit e9b3974d7c)
2015-07-17 14:24:26 -07:00
Paul O’Shannessy
f676fa41ef Merge pull request #4357 from yangmillstheory/docfix
Warn against JSX transform failure for non-HTTP-served JSX
(cherry picked from commit e9915f0735)
2015-07-17 14:24:26 -07:00
Paul O’Shannessy
dd570dcb5c Merge pull request #4363 from tako-black/change_css_to_uppercase
Change `css` to uppercase
(cherry picked from commit fa7aeb65ac)
2015-07-17 14:24:26 -07:00
Jim
5396d5180d Merge pull request #4362 from makky3939/translate_04_self_closing_tag
Translate 4-self-closing-tag.md to Japanese
(cherry picked from commit bd390afc22)
2015-07-17 14:24:26 -07:00
Jim
73fce2dd31 Merge pull request #4356 from makky3939/fix_03-interactivity-and-dynamic-uis_ja-JP_md
Update 03-interactivity-and-dynamic-uis.ja-JP.md
(cherry picked from commit ea964e760c)
2015-07-17 14:24:26 -07:00
Jim
34d9e8482e Merge pull request #4358 from makky3939/remove_controll_character_from_jp_docs
Remove controll character from jp.md
(cherry picked from commit 0572747d74)
2015-07-17 14:24:26 -07:00
Jim
649804e4d4 Merge pull request #4351 from tako-black/translate_addons_to_japanese
Translate 10-addons.md to Japanese
(cherry picked from commit 2b3d83fe34)
2015-07-17 14:24:25 -07:00
Jim
86682159d1 Merge pull request #4348 from himkt/master
remove controll character from 02-displaying-data.ja-JP.md
(cherry picked from commit 13c9bb4845)
2015-07-17 14:24:25 -07:00
Jim
257c4288d9 Merge pull request #4346 from makky3939/fix_typo_09-tooling-integration_ja-JP_md
fix typo 09-tooling-integration.ja-JP.md
(cherry picked from commit 7661d6c7da)
2015-07-17 14:24:25 -07:00
Paul O’Shannessy
177df50d7f Merge pull request #4337 from tako-black/translate_tooling-integration_to_japanese
Translate 09.tooling-integration.md to Japanese
(cherry picked from commit 4ec2575cd8)
2015-07-17 14:24:25 -07:00
Jim
cdb2988155 Merge pull request #4334 from tako-black/add_meta_tag_in_the_header_of_html
Add meta tag in the header of HTML in translated documentation.
(cherry picked from commit 6c0ab0b60e)
2015-07-17 14:24:25 -07:00
Jim
017d377c26 Merge pull request #4320 from tako-black/translate_more-about-refs_to_japanese
Translate 08.1-more-about-refs.md to Japanese
(cherry picked from commit a9e2111b34)
2015-07-17 14:24:24 -07:00
Paul O’Shannessy
71a6e5da7a Merge pull request #4319 from tako-black/enclose_a_name_of_function_in_back_quote
Enclose a name of function in back quote
(cherry picked from commit 59eddf8943)
2015-07-17 14:24:24 -07:00
Frankie Bagnardi
c0f32a9078 Blog: move "refs to custom components..." fixes #4305
Just to prevent the TL;DR confusion. Separate paragraph and moved up above the code block. `s/References/Refs` for consistency.

(cherry picked from commit 335f7d5e57)
2015-07-15 16:36:47 +02:00
Paul O’Shannessy
e3e209d8e1 Merge pull request #4314 from devonharvey/patch-1
Fix typo on line 91 of tutorial.md
(cherry picked from commit 6eaf03df1a)
2015-07-08 10:26:14 -07:00
Jim
a76d3f22c2 Merge pull request #4312 from tako-black/translate_working-with-the-browser_to_japanese
Translate 08-working-with-the-browser.md to Japanese
(cherry picked from commit c3f0d7c6bd)
2015-07-08 10:26:14 -07:00
Jim
322fd3b56a Merge pull request #4310 from tako-black/enclose_a_value_of_variable_in_back_quote
Enclose a value of variable in back quote
(cherry picked from commit ed0d41bb88)
2015-07-08 10:26:14 -07:00
Jim
80225fb613 Merge pull request #4300 from tako-black/translate_forms_to_japanese
Translate 07-forms.md to Japanese
(cherry picked from commit 25be80c959)
2015-07-08 10:26:14 -07:00
Jim
c9119c1135 Merge pull request #4299 from tako-black/enclose_a_value_in_back_quote
Enclose a value of variable in back quote
(cherry picked from commit 2284c0f449)
2015-07-08 10:26:14 -07:00
Jim
ce0ff2a975 Merge pull request #4292 from dariocravero/patch-1
Update 2015-07-03-react-v0.14-beta-1.md
(cherry picked from commit a8955e7c3e)
2015-07-08 10:26:13 -07:00
Jim
085f5319e9 Merge pull request #4290 from rwoodnz/patch-1
Suggest open index.html in browser regularly.
(cherry picked from commit abf965c3c5)
2015-07-08 10:26:13 -07:00
Paul O’Shannessy
30a44efd43 Merge pull request #4289 from joshuago/patch-1
Fix typos
(cherry picked from commit 5370987cc0)
2015-07-08 10:26:13 -07:00
Jim
2fde241c5e Merge pull request #4276 from tako-black/translate_transferring-props_to_japanese
Translate 06-transferring-props.md to Japanese
(cherry picked from commit 2d86486fd1)
2015-07-08 10:26:13 -07:00
Jim
7f23486f7e Merge pull request #4266 from tako-black/translate_reusable-components_to_japanese
Translate 05-reusable-components.md to Japanese
(cherry picked from commit c3e411a0dc)
2015-07-08 10:26:13 -07:00
Jim
f995ca79d1 Merge pull request #4262 from coryhouse/patch-1
Removed redundant word
(cherry picked from commit bde585f4e0)
2015-07-08 10:26:12 -07:00
Jim
ea4f405840 Merge pull request #4252 from bhamodi/patch-2
Update url to save a redirect
(cherry picked from commit ae9b2c0649)
2015-07-08 10:26:10 -07:00
Jim
8972a956bd Merge pull request #4249 from tako-black/translate_multiple-components_to_japanese
Translate 04-multiple-components.md to Japanese
(cherry picked from commit d9d442808a)
2015-07-08 10:13:02 -07:00
Paul O’Shannessy
b8b8477265 Merge pull request #4242 from tako-black/translate_interactivity-and-dynamic-uis_to_japanese
Translate 03-interactivity-and-dynamic-uis.md to Japanese
(cherry picked from commit dd3244c4f2)
2015-07-08 10:13:02 -07:00
Jim
1fab5ae1a6 Merge pull request #4240 from tako-black/translate_jsx-gotchas_to_japanese
Translate 02.3-jsx-gotchas.md to Japanese
(cherry picked from commit e695ebb5c6)
2015-07-08 10:13:01 -07:00
Jim
8a3c65851e Merge pull request #4232 from marocchino/update-docs
Update translated docs
(cherry picked from commit 5fb8cbc6ca)
2015-07-08 10:13:01 -07:00
Paul O’Shannessy
f92d447ab8 Merge pull request #4229 from tako-black/translate_jsx-spread_to_japanese
Translate 02.2-jsx-spread.md to Japanese
(cherry picked from commit 859a5d5c3c)
2015-07-08 10:13:01 -07:00
Jim
ba9cbe2567 Merge pull request #4222 from tako-black/translate_jsx-in-depth_to_japanese
Translate 02.1-jsx-in-depth.ja-JP.md to Japanese
(cherry picked from commit 9bcc8dab93)
2015-07-08 10:13:01 -07:00
Ben Alpert
418bc097d5 Merge pull request #4204 from dpercy/patch-1
Fix docs typo: "overridden" -> "overwritten"
(cherry picked from commit ef00e856aa)
2015-07-08 10:13:01 -07:00
Ben Alpert
4e1918d4ea Fix react-addons-update package name
(cherry picked from commit cb5913a842)
2015-07-04 17:26:57 +02:00
Ben Alpert
52c9efedb3 beta1 blog post
Closes #4275.

(cherry picked from commit b2db10f43e)
2015-07-03 10:50:24 +02:00
Andres Kalle
8a83957e8c Typo fix
(cherry picked from commit af2071af63)
2015-06-30 15:58:07 +02:00
Kohei TAKATA
c3aee0aecc Change 'Javascript' to 'JavaScript'
(cherry picked from commit aefb608fd6)
2015-06-27 03:02:10 -07:00
Kohei TAKATA
bef8b1af6c Translate 02-displaying-data.md to Japanese
(cherry picked from commit af34ca7b41)
2015-06-24 20:20:00 -07:00
Tay Yang Shun
4d3aaa75ae Add site title to first code snippet of getting started
(cherry picked from commit bd9d4b2499)
2015-06-24 20:19:33 -07:00
Kohei TAKATA
2ce18630c1 Fix link of getting-started.ja-JP.md
(cherry picked from commit 3c53d25587)
2015-06-22 22:41:49 -07:00
Kohei TAKATA
0f938506e3 Translate 01-why-react.md to Japanese
(cherry picked from commit 1d3906f91d)
2015-06-22 22:41:45 -07:00
Cristovao Verstraeten
fcb0d942b1 update script sources to be even with the example file in reactjs/react-tutorial repo ... apply to japanese and korean translation (+2 squashed commit)
Squashed commit:

[4564e55] Ensures we don't need to update this page for every release.

[b0d60f9] update script sources to be even with the example file in reactjs/react-tutorial repo

(cherry picked from commit c227a398ba)
2015-06-22 22:41:38 -07:00
Shim Won
41821af38d Update Korean transltaion to 4c778e2
(cherry picked from commit e67c0943b8)
2015-06-22 22:41:32 -07:00
Ben Alpert
3cf37af574 Fix typo in blog post
(#4183)

(cherry picked from commit df05c6efb8)
2015-06-20 16:49:52 -07:00
Ingvar Stepanyan
d48ce78261 Update 2015-06-12-deprecating-jstransform-and-react-tools.md
Add paragraph about parsing JSX after deprecation of esprima-fb.
(cherry picked from commit cab21c7783)
2015-06-16 10:58:03 -07:00
Dustan Kasten
eff75729f2 s/parse/parser in jstransform deprecation blog post
(cherry picked from commit 54e77a251c)
2015-06-12 21:52:31 -07:00
Paul O’Shannessy
4c50ced1a8 [blog] Deprecate JSTransform & react-tools 2015-06-12 16:48:16 -07:00
Jim
7cf376483f Merge pull request #4074 from jimfb/docs-context-parameter-confusing
Fixed confusing use of the word/name `context` in documentation
2015-06-10 15:59:26 -07:00
Ben Alpert
b2fb150972 Merge pull request #4070 from tako-black/fix_md_file
Fix code of getting-started-ja-JP
2015-06-10 15:59:22 -07:00
Paul O’Shannessy
f6d9da57c6 Merge pull request #4046 from basarat/patch-2
📝 document changes for classes
2015-06-10 15:59:18 -07:00
Scott Feeney
0620cec299 Merge pull request #4003 from AnSavvides/on-change-vs-on-input
[#3964] Add note about React's onChange vs. DOM's oninput
2015-06-10 15:59:13 -07:00
Ben Alpert
2b60d3c31f Merge pull request #3884 from glenjamin/patch-3
Document boolean attributes in JSX
2015-06-10 15:59:08 -07:00
Paul O’Shannessy
a590c90fb0 Merge pull request #4063 from zpao/fix-ja-docs
fix japanese docs permalinks
2015-06-08 20:17:27 -07:00
Ben Alpert
7bee7eff7e Merge pull request #3993 from arianf/doctype
added missing DOCTYPE
2015-06-01 14:32:23 -07:00
Paul O’Shannessy
cc0c897a79 Merge pull request #3980 from cody/http
Revert links to non-https fiddles back to http in old blog posts
2015-06-01 14:32:18 -07:00
Paul O’Shannessy
d34b93cdb9 Merge pull request #3935 from julen/docs/transition-group
Docs: value for `transitionAppear` must be boolean
2015-06-01 14:32:09 -07:00
Ben Alpert
616454f95f Merge pull request #3931 from marocchino/update-korean
Update Korean transltaion to 5bee4a5
2015-06-01 14:32:04 -07:00
Ben Alpert
dc482ec339 Merge pull request #3909 from spicyj/tir-redirect
Redirect Thinking in React blog post to docs
2015-06-01 14:32:00 -07:00
Christopher Chedeau
ad2e54a25c [Blog post] React Native Release Process 2015-05-22 13:19:22 -07:00
Paul O’Shannessy
af44a476d0 Merge pull request #3803 from zpao/docs-fancy-authors
[docs] Give authors links.
2015-05-21 11:45:03 -07:00
Paul O’Shannessy
246cd6e7ac Merge pull request #3888 from marocchino/korean-update
Update Korean Translation to 5275244
2015-05-21 11:44:56 -07:00
Paul O’Shannessy
20b41da601 Merge pull request #3892 from spicyj/docs-wwb
[docs] Clarify wording in Working with the Browser
2015-05-21 11:44:49 -07:00
Paul O’Shannessy
9c0f0f58ca Merge pull request #3889 from garethnic/WorkBrowser
change wording in 'Working with the Browser'
2015-05-21 11:44:42 -07:00
Paul O’Shannessy
78b97cb5b2 Merge pull request #3905 from troeggla/replace-getdomnode
Replaced call to deprected .getDOMNode() with React.findDOMNode().
2015-05-21 11:44:37 -07:00
Ben Alpert
daee5502cf Merge pull request #3910 from spicyj/gh-3904
Clarify tutorial instructions
2015-05-21 11:44:32 -07:00
Jim
c72390a94c Merge pull request #3856 from chaseadamsio/chaseadamsio-patch-1
Change object typo to objects
2015-05-21 11:43:45 -07:00
Paul O’Shannessy
b8e11d04db Merge pull request #3881 from ef718/docs-grammar
Fix punctuation and grammar
2015-05-21 11:43:39 -07:00
Paul O’Shannessy
36a058b7a0 Merge pull request #3837 from davidneat/transition-group-appear-high-level-docs
Added transitionAppear docs
2015-05-21 11:42:35 -07:00
Paul O’Shannessy
d3d819fff5 [docs] Fix 404 due to relative url
Closes #3914

(cherry picked from commit 021574e07d)
2015-05-21 11:40:24 -07:00
Paul O’Shannessy
be7fe9cb40 Followup to #3852, use https
(cherry picked from commit cfa354415b)
2015-05-21 11:40:09 -07:00
Ben Alpert
dc47b92da8 Deprecate reactjs Google Group
(cherry picked from commit ffabf4b5ff)
2015-05-13 15:17:00 -07:00
Ben Alpert
9947e4ee9b Merge pull request #3852 from thewarpaint/patch-1
Add Wikipedia link to Cross-site scripting article on "XSS attack" string
2015-05-10 22:16:08 -07:00
Ben Alpert
17e04d5034 Merge pull request #3805 from hejld/master
Removed redundant grave accent character from Component API docs
2015-05-10 22:16:03 -07:00
Ben Alpert
118845f53a Merge pull request #3797 from marocchino/update-korean
Update Korean Translation to 9484d0f
2015-05-10 22:15:57 -07:00
Paul O’Shannessy
2b372f188a Merge pull request #3778 from masterfung/docs-update
updated some typos, grammers, and made sentences sound better
2015-05-10 22:15:51 -07:00
Paul O’Shannessy
107ce2b80d Update website with 0.13.3 builds 2015-05-08 16:32:30 -07:00
Paul O’Shannessy
2668de126c Fix docs for #3690 2015-05-08 13:53:50 -07:00
Paul O’Shannessy
179b6380cf v0.13.3 blog post 2015-05-08 13:53:49 -07:00
Paul O’Shannessy
668d6a3fed v0.13.3 2015-05-08 13:53:49 -07:00
Paul O’Shannessy
1d950ddbd4 Readme for 0.13.3 2015-05-08 13:53:49 -07:00
Paul O’Shannessy
95e864fd07 Changelog for 0.13.3 2015-05-08 13:53:49 -07:00
Ben Alpert
13e67bed24 Merge pull request #3841 from spicyj/yolo
Preserve prototype with replaceState
2015-05-08 13:53:49 -07:00
Paul O’Shannessy
b8ae729d3f Revert "Reset changes to code made in #3693"
This reverts commit 405346545f.
2015-05-08 13:53:48 -07:00
Ben Alpert
e9126cf90b Add forgotten clipPath wrapper in getMarkupWrap
(cherry picked from commit 3b10a7b038)
2015-05-08 13:53:48 -07:00
Ben Alpert
80ea01d364 Fix context warning with non-pure getChildContext
Fixes #3709.
2015-05-08 11:36:29 -07:00
Ben Alpert
92a7e5f41c Merge pull request #3802 from spicyj/cleaner-depr
Better warning messages for deprecated methods
2015-05-08 11:20:37 -07:00
Ben Alpert
56b0a496f4 Merge pull request #3727 from spicyj/dsih
Relax dangerouslySetInnerHTML validation
2015-05-08 10:49:56 -07:00
Scott Feeney
135499782e Merge pull request #3716 from graue/optional-shallow-render-context
Shallow render components that define contextTypes
2015-05-08 10:49:36 -07:00
codesuki
bd6e42fab4 Added support for SVG clipPath element and clip-path attribute 2015-05-08 10:46:25 -07:00
Paul O’Shannessy
e64c0a50f9 Bump version for dev 2015-05-08 10:40:07 -07:00
Paul O’Shannessy
b7ea06614d Update 2015-05-01-graphql-introduction.md
typo fix
2015-05-01 17:01:59 -07:00
Paul O’Shannessy
a72828817b Fix a couple grammar issues in GraphQL blog post 2015-05-01 12:35:50 -07:00
Paul O’Shannessy
49cbc88cd2 GraphQL Introduction Blog Post
(cherry picked from commit 693da719a3)
2015-05-01 11:20:03 -07:00
Jim
fd36708b1d Merge pull request #3794 from jsfb/fix-thinking-in-react-blog-post
Fixed jsfiddles broken on https.  Fixes 3735.
2015-05-01 11:09:28 -07:00
Paul O’Shannessy
9643243116 Merge pull request #3784 from ef718/docs-punctuation
Add punctuation
2015-05-01 11:09:22 -07:00
Jim
a12ef37050 Merge pull request #3767 from kubosho/patch-1
Use jQuery 2.1.3 (latest) to be up-to-date and consistent with other docs)
2015-05-01 11:09:17 -07:00
Paul O’Shannessy
7a967b680b Merge pull request #3734 from marocchino/update-korean
Update Translation to 0183f70
2015-05-01 11:09:12 -07:00
Jim
4c7479a2a0 Merge pull request #3723 from jsfb/fix-bad-homepage-link
Fix bad links in docs.  Fixes #3654.
2015-05-01 11:09:07 -07:00
Paul O’Shannessy
9611a4b105 Merge pull request #3691 from jonscottclark/patch-1
Add 'cache: false' to $.ajax when fetching comments (docs/tutorial)
2015-05-01 11:09:02 -07:00
Ben Alpert
0493fa21f7 Merge pull request #3429 from AoDev/patch-1
Add a note about react classe name convention
2015-05-01 11:08:58 -07:00
mheiber
f05bfaea33 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.

(cherry picked from commit 39442aaa84)
2015-04-22 17:06:12 -07:00
Paul O’Shannessy
405346545f Reset changes to code made in #3693
Reverting this bit in the stable branch so builds aren't changed. We can pick
this up again if we do a 0.13.3.
2015-04-20 22:17:59 -07:00
Paul O’Shannessy
5ef593e4a0 Merge pull request #3693 from reedloden/swap-http-to-https
SSL/TLSize all the things! (convert http:// to https:// where appropriate)
2015-04-20 11:08:54 -07:00
Paul O’Shannessy
92252f5781 Merge pull request #3694 from adamzap/fix-tutorial-line-highlighting
Fix missing line highlight in tutorial
2015-04-20 11:05:02 -07:00
Paul O’Shannessy
b14a7be10d Merge pull request #3703 from JimBobSquarePants/patch-1
Example is JSX not JS.
2015-04-20 11:04:56 -07:00
Paul O’Shannessy
3ff97a9277 Merge pull request #3705 from zpao/doc/update-supported-attrs
[docs] Update supported HTML attributes
2015-04-20 11:04:51 -07:00
Paul O’Shannessy
7a2c84d81a Tweak wording in 0.13.2 blog post
(cherry picked from commit feef6e885b)
2015-04-18 16:08:25 -07:00
Paul O’Shannessy
6ed202288b v0.13.2 blog post 2015-04-18 15:33:58 -07:00
Paul O’Shannessy
179f904525 Update website with 0.13.2 builds 2015-04-18 15:33:58 -07:00
Paul O’Shannessy
c98c7ccd28 v0.13.2 2015-04-18 15:28:48 -07:00
Paul O’Shannessy
78cca021f3 Update Patent Grant
https://code.facebook.com/posts/1639473982937255/updating-our-open-source-patent-grant/
2015-04-18 15:28:48 -07:00
Paul O’Shannessy
e1437078fc Readme for 0.13.2 2015-04-18 15:28:48 -07:00
Paul O’Shannessy
4f1c61f915 Changelog for 0.13.2 2015-04-18 15:28:48 -07:00
Ben Alpert
4cecb72965 Merge pull request #3675 from spicyj/gh-3655
Add warning for getDefaultProps on ES6 classes
2015-04-17 18:35:19 -07:00
Paul O’Shannessy
db6dcd695f Merge pull request #3485 from jnu/ie10-flex-unitless
Treat flexPositive, flexNegative as unitless styles
2015-04-17 18:35:19 -07:00
Paul O’Shannessy
16cb748161 Update test for backporting #3507 2015-04-17 18:35:19 -07:00
Jim
2e3ac9b683 Merge pull request #3638 from devicehubnet/master
check if type.prototype is object in instantiateReactComponent
2015-04-17 18:35:19 -07:00
Paul O’Shannessy
3509628c22 re-shrinkwrap 2015-04-17 18:35:18 -07:00
Paul O’Shannessy
742d8567e8 Merge pull request #3662 from zpao/update-uglify
Update uglify dependency
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
1c03cd6fd9 Merge pull request #3636 from cody/jsx-target
Add target option to npm readme
2015-04-17 18:35:18 -07:00
Ben Alpert
8b4377ed68 Merge pull request #3627 from spicyj/mut-warn-clone
Refer to cloneElement in mutation warning
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
2c7e818c7c Merge pull request #3618 from TimeBomb/master
Document new es6module flag in react-tools README
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
717ad76529 Merge pull request #3614 from kassens/set_style_null
Fix for style not always reset when set to null
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
9b2176fc23 Merge pull request #3563 from quizlet/fix-addons-hasownproperty
Fix immutability helper to check hasOwnProperty safely
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
7b07d85398 Merge pull request #3519 from jonchester/patch-1
Add IE-specific 'unselectable' attribute
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
6d021d31ef Merge pull request #3513 from agelter/master
Added support for the 'low', 'high', and 'optimum' attributes that are missing from the <meter> tag.
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
ed8b4d6533 Merge pull request #3507 from dpellier/master
Add scoped property to the list of DOM standard properties
2015-04-17 18:35:18 -07:00
Paul O’Shannessy
440d7b9fd0 Merge pull request #3499 from sverrejoh/patch-1
Don't add 'px' to strokeDashoffset CSS Properties
2015-04-17 18:35:17 -07:00
Jim
28483ea245 Merge pull request #3494 from letiemble/B_Context_Rerender
Fix the context handling when updating a rendered component.
2015-04-17 18:35:17 -07:00
Paul O’Shannessy
4d142ad5f1 Version bump for dev 2015-04-17 18:35:17 -07:00
Paul O’Shannessy
4a700aedf8 Merge pull request #3678 from marocchino/update-korean
Update Translation to 6a7a4fd
2015-04-17 18:13:28 -07:00
Paul O’Shannessy
4423200007 Merge pull request #3673 from ultrafez/patch-1
"Advanced performance" typo fix
2015-04-17 18:13:16 -07:00
Jim
f4d7c704dd Merge pull request #3625 from dmin/patch-1
Docs: Fix example JSX output
2015-04-17 18:12:57 -07:00
Christopher Chedeau
fab11d22b8 Update 2015-04-17-react-native-v0.4.md 2015-04-17 09:14:29 -07:00
Christopher Chedeau
c3cf556ca0 React Native 0.4 Blog Post 2015-04-17 09:14:29 -07:00
Ben Alpert
3fd813f752 Merge pull request #3456 from cody/html-jsx
Fix HTML to JSX converter to work with https
2015-04-14 14:43:35 -07:00
Ben Alpert
8109af6d7f Merge pull request #3663 from spicyj/san-md
[docs] Use marked instead of Showdown and escape HTML
(cherry picked from commit be03fa7f46)
2015-04-13 16:46:05 -07:00
Paul O’Shannessy
e0c9fbc9f5 Merge pull request #3658 from sbezludny/patch-1
Fixed typo
2015-04-13 16:12:32 -07:00
Paul O’Shannessy
a1b4f40f9d Merge pull request #3642 from marocchino/ko-update
Update Korean translation to 0185c68
2015-04-13 16:12:32 -07:00
Paul O’Shannessy
aa7eb4302d Merge pull request #3641 from ljharb/patch-1
Updating `es5-shim` URL
2015-04-13 16:12:32 -07:00
Jim
5b18053ac0 Merge pull request #3635 from garethnic/reuseCompDoc
Clarify sentence in Reusable Components doc
2015-04-13 16:12:32 -07:00
Paul O’Shannessy
03595c918a Merge pull request #3584 from ThornWinters/patch-1
More Uniform Formating
2015-04-13 16:12:32 -07:00
Paul O’Shannessy
8680314086 [docs] Fix typo
Introduced in #3589
2015-04-08 10:39:43 -07:00
Paul O’Shannessy
396c6b68ed Merge pull request #3612 from gaearon/patch-1
Mention Flux in “communicate between components”
2015-04-08 10:38:17 -07:00
Ben Alpert
cc8f9d3c30 Merge pull request #3590 from koba04/patch-1
component.render method returns a ReactElement.
2015-04-08 10:38:06 -07:00
Ben Alpert
5daf9f39c0 Merge pull request #3589 from theseyi/master
Documentation: Fixed typo / grammar in 'clone with props'
2015-04-08 10:37:55 -07:00
Ben Alpert
8685fed099 Merge pull request #3588 from marocchino/ko-update
Update Korean translation to d402bd3
2015-04-08 10:36:40 -07:00
Paul O’Shannessy
4bf4112542 Merge pull request #3567 from chenglou/rm-getdomnode
Remove some `getDOMNode` from docs and DOMComponent test
2015-04-03 10:40:52 -07:00
Paul O’Shannessy
ff4c157ed7 Merge pull request #3562 from dalinaum/rename
Rename 19--dangerouslySetInnerHTML.md -> 19-dangerously-set-inner-html.md
2015-04-03 10:40:52 -07:00
Paul O’Shannessy
397fa72d1d Merge pull request #3544 from prathamesh-sonpatki/fix-link-to-display-name
Fixed link to displayName component spec from JSX in depth article
2015-04-03 10:40:52 -07:00
Paul O’Shannessy
b2043987cc Merge pull request #3539 from russellpwirtz/patch-1
Update tutorial.md
2015-04-03 10:40:52 -07:00
Paul O’Shannessy
6343ec5d79 Merge pull request #3537 from marocchino/korean-update
Update Korean translations
2015-04-03 10:40:52 -07:00
Ben Alpert
12b794a3b8 Merge pull request #3529 from uzarubin/patch-1
Swapping defaultChecked and defaultValue
2015-04-03 10:40:52 -07:00
Paul O’Shannessy
449726408e Merge pull request #3511 from AnSavvides/glossary-space
Minor space change to be in line with coding style everywhere else
2015-04-03 10:39:59 -07:00
Paul O’Shannessy
e63149d4f0 Merge pull request #3504 from clariroid/docsJP
Translate 2 docs into Japanese
2015-04-03 10:39:59 -07:00
Paul O’Shannessy
40f77d2715 Merge pull request #3498 from AnSavvides/patch-1
Include latest version of jQuery in tutorial
2015-04-03 10:39:59 -07:00
Paul O’Shannessy
1b4bc922f9 Merge pull request #3491 from bobbyrenwick/transition-group-appear-docs
adding docs for componentWillAppear and componentDidAppear
2015-04-03 10:39:59 -07:00
Paul O’Shannessy
4c779313af Merge pull request #3487 from zpao/doc/video
[docs] Videos: use https, right width videos
2015-04-03 10:39:58 -07:00
Paul O’Shannessy
be13240980 Merge pull request #3483 from julen/docs/document-body-footgun
Docs: do not render components to `document.body`
2015-04-03 10:39:58 -07:00
Paul O’Shannessy
29f11069f3 Merge pull request #3271 from delftswa2014/fix/todo-example
Added the key attribute into the todo example
2015-04-03 10:36:17 -07:00
Paul O’Shannessy
263084f5b7 Merge pull request #3240 from reactkr/translate-ko-release
Korean translation for docs
2015-04-03 10:36:17 -07:00
Ben Alpert
ad02e8bb56 [docs] Fix type on renderIntoDocument
Fixes #3581.

(cherry picked from commit d402bd3831)
2015-04-03 09:12:23 -07:00
Ben Alpert
35bc0f0b41 Fix inverted feature test in .travis.yml
I messed this up in #3540.

(cherry picked from commit 9c12e48f68)
2015-04-01 15:17:46 -07:00
Ahmad Wali Sidiqi
3b5ff0aea7 Fix small typo in 11-advanced-performance.md.
"React didn't even had"->"React didn't even have"

http://english.stackexchange.com/questions/204603/proper-usage-of-didnt-had-or-didnt-have
(cherry picked from commit 4fe1b59849)
2015-03-31 17:03:23 -07:00
Ben Alpert
d77f417767 Squelch git warning on Travis
(cherry picked from commit 835fc3d0fb)
2015-03-30 11:26:14 -07:00
Ben Alpert
946c3f04cc Set name and email a different way
(cherry picked from commit 76805fdfda)
2015-03-30 11:20:34 -07:00
Ben Alpert
d30547792c Set git name and email for Travis
(cherry picked from commit be566e0aa6)
2015-03-30 11:17:49 -07:00
Ben Alpert
6d577d83b8 [docs] English tweaks (and testing Travis)
(cherry picked from commit b7c4da59ca)
2015-03-30 11:11:02 -07:00
Ben Alpert
7f5292bea4 Autobuild website on Travis from stable branch
$REACT_WEBSITE_BRANCH in https://travis-ci.org/facebook/react/settings/env_vars now needs to point to the stable branch (currently 0.13-stable). I haven't tested the commit-and-push part of this but everything else works so I'm hopeful.

(cherry picked from commit accb4f6047)
2015-03-30 10:57:48 -07:00
Ben Alpert
987f243c73 Keep docs/js/{react,JSXTransformer}.js in repo
This way we don't need to rebuild them each time for the website.

(cherry picked from commit 0b6c7c29fe)
2015-03-30 10:57:48 -07:00
Paul O’Shannessy
0a9d6c6bbf Update TravisCI to use exiting env var
$TRAVIS_COMMIT_RANGE was broken but it seems what we're doing is worse and
resulting in false negatives.

The result of the bad range was that we weren't running lint or tests for
things we should have been. It actually looks like $TRAVIS_COMMIT has been
wrong and it's not clear why this has been working at all.

(cherry picked from commit 08b1515f7f)
2015-03-30 10:57:48 -07:00
Christopher Chedeau
54e82a552a Roundup 26 2015-03-30 07:25:14 -07:00
Ben Alpert
65f40df8b5 [docs] Split up second sentence more
(cherry picked from commit eef22ece37)
2015-03-26 12:30:48 -07:00
Ben Alpert
4924cdc436 [docs] Tweak words on homepage
(cherry picked from commit cf956ac8be)
2015-03-26 12:30:48 -07:00
Ben Alpert
67805ed12d Add React Native blog post
(cherry picked from commit 951adcdd4c)
2015-03-26 10:11:10 -07:00
Ben Alpert
5b86aca6ff [docs] Update site nav
(cherry picked from commit ca66399402)
2015-03-26 10:06:38 -07:00
Joseph Savona
d10c8fc1af Merge pull request #3463 from josephsavona/relay-components
Building The Facebook News Feed With Relay
2015-03-19 13:04:22 -07:00
Paul O’Shannessy
9b7de5b196 0.13 blog post, starter kit 2015-03-16 16:54:35 -07:00
Paul O’Shannessy
f308c03455 v0.13.1 2015-03-16 16:50:30 -07:00
Paul O’Shannessy
d4424e87a7 Update Readme for 0.13.1 2015-03-16 16:41:33 -07:00
Paul O’Shannessy
3003dcc0b1 Changelog for 0.13.1 2015-03-16 16:40:40 -07:00
Paul O’Shannessy
8436732a23 Merge pull request #3427 from zpao/full-page-dom-components
Ensure FullPageComponents are treated as DOM components
(cherry picked from commit dacd4db1fa)
2015-03-16 16:27:28 -07:00
Ben Alpert
a82e70ed34 Merge pull request #3414 from spicyj/gh-3407
Fix up Perf a bit better for 0.13
(cherry picked from commit 0a312bba89)
2015-03-16 16:27:28 -07:00
Ben Alpert
2e72fd8e43 Merge pull request #3412 from spicyj/gh-3329
Squash getDOMNode warning from isDOMComponent
(cherry picked from commit ed257cb691)
2015-03-16 16:27:28 -07:00
Ben Alpert
6cc7567eff Merge pull request #3410 from robertknight/3409-style-null-to-nonnull
Fix incorrect update of style when props.style transitions from null to non-null
(cherry picked from commit bcd70ad500)
2015-03-16 16:27:27 -07:00
Paul O’Shannessy
cfbf1d559f Merge pull request #3402 from vkramskikh/fix-empty-selects-with-value
Fix for empty <select> elements with value
(cherry picked from commit 68a2f89cc6)
2015-03-16 16:27:27 -07:00
Paul O’Shannessy
ce9fd5f028 Merge pull request #3381 from zpao/jsx-nonstrictmodule
Fix module option parsing of jsx command
(cherry picked from commit b0a59a643a)
2015-03-16 16:27:27 -07:00
Paul O’Shannessy
9432aceb4d version bump for dev 2015-03-16 16:27:27 -07:00
Paul O’Shannessy
9f95d8793e Merge pull request #3419 from xmo-odoo/patch-1
Link to inserting raw HTML document
2015-03-16 16:24:13 -07:00
Jim
9e0954abdd Merge pull request #3422 from jviereck/doc-typo-fix
Fix small typo ("of" instead of "or")
2015-03-16 16:24:08 -07:00
Paul O’Shannessy
71f65d3da6 Merge pull request #3394 from cody/getDOMNode
Fix in docs: getDOMNode --> findDOMNode
2015-03-16 16:24:03 -07:00
Paul O’Shannessy
fe8d706c1c v0.13 starter kit 2015-03-10 14:47:44 -07:00
Paul O’Shannessy
edb8f7f4af v0.13.0 2015-03-10 14:45:29 -07:00
Paul O’Shannessy
594f816930 Update readme for 0.13 2015-03-10 14:45:29 -07:00
Paul O’Shannessy
94bf54a328 shrinkwrap 2015-03-10 14:45:29 -07:00
Ben Alpert
df18770a0c with the exception for -> with the exception of 2015-03-10 14:44:44 -07:00
Ben Alpert
ab7084f71d Merge pull request #3366 from sebmarkbage/docs2
ES6 Class Docs
2015-03-10 14:44:23 -07:00
Sebastian Markbage
efebdb2925 ES6 Class Docs
Some minor burried docs.
2015-03-10 14:41:42 -07:00
Ben Alpert
085bf8635c Add deprecation note to blog post and changelog 2015-03-10 14:22:03 -07: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
139012cd6a Merge pull request #3283 from zpao/0.13-authors
Update AUTHORS for 0.13
2015-03-10 13:56:52 -07:00
Paul O’Shannessy
a95d6ff0df Update AUTHORS for 0.13 2015-03-10 13:55:55 -07:00
Paul O’Shannessy
5e79bd5c4f Changelog for 0.13 2015-03-10 13:47:15 -07:00
Paul O’Shannessy
deeb55b6e7 Merge pull request #3363 from zpao/0.13-docs-cloneelement
[docs] React.cloneElement
2015-03-10 13:46:12 -07:00
Paul O’Shannessy
a5bdc92990 A couple small changes to the changelog for 0.13 2015-03-10 13:43:15 -07:00
Jim
565e2ecbac Merge pull request #3364 from jsfb/refs-docs
Added docs about the ref-as-callback.
2015-03-10 13:02:18 -07:00
Jim
f3811e68fa Added docs about the ref-as-callback. 2015-03-10 13:01:07 -07:00
Ben Alpert
4fb9644823 0.13 blog post 2015-03-10 12:57:50 -07:00
Paul O’Shannessy
62d5d646db Merge pull request #3362 from jsfb/docs-for-setstate
Added docs about the first-parameter-is-function version of setState.
2015-03-10 12:29:25 -07:00
Paul O’Shannessy
969d92a411 Merge pull request #3354 from zpao/0.13-examples
Update the examples for 0.13
2015-03-10 11:57:35 -07:00
Paul O’Shannessy
ce66a796ee Update the examples for 0.13
The only substantial difference here is that I made the harmony example use ES6
classes. The server rendering example was pretty wacky and hard to run but
I did confirm that it works.
2015-03-10 11:56:25 -07:00
Jim
7569e810e7 Added docs about the first-parameter-is-function version of setState. 2015-03-10 11:47:00 -07:00
Paul O’Shannessy
45cc5006d7 [docs] React.cloneElement 2015-03-10 11:19:11 -07:00
Paul O’Shannessy
ee019d6cc5 Merge pull request #3360 from zpao/0.13-docs-api-deprecations
Add deprecation note for deprecated component APIs
2015-03-10 11:07:47 -07:00
Paul O’Shannessy
b4962eff43 Merge pull request #3361 from zpao/deprecate-replaceprops
Deprecate replaceProps
2015-03-10 11:07:34 -07:00
Paul O’Shannessy
9d58e9a27b Deprecate replaceProps
This isn't supported on plain JS classes anyway, so this is just adding
a warning in DEV before the code throws.
2015-03-10 10:44:47 -07:00
Paul O’Shannessy
b038943653 Add deprecation note for deprecated component APIs 2015-03-10 10:44:24 -07:00
Ben Alpert
79a34e80b1 Merge pull request #3358 from coliff/patch-1
Update relevant URLS to HTTPS
2015-03-10 10:03:59 -07:00
Paul O’Shannessy
f41904cf99 Merge pull request #2963 from graue/document-shallow-testing
Add documentation for shallow testing
2015-03-10 09:39:47 -07:00
Ben Alpert
ca08f7546e Merge pull request #3353 from spicyj/frag
Add docs for createFragment
2015-03-10 09:17:51 -07:00
Ben Alpert
b7732ba7c0 Add docs for createFragment 2015-03-10 09:17:34 -07:00
Christian
dbba47d5d2 Update relevant URLS to HTTPS
Update relevant URLS to HTTPS
2015-03-10 18:11:29 +09:00
Paul O’Shannessy
dd6b8ab8b9 Merge pull request #3347 from koba04/fix-perf-displayname
Fix addons.Perf displayName with ES6 classes
2015-03-09 21:32:24 -07:00
Toru Kobayashi
29506cec54 Fix Perf displayName with ES6 classes 2015-03-10 09:45:40 +09:00
Paul O’Shannessy
62ee384d7b Merge pull request #3330 from spicyj/no-render
Add warning when using non-component element types
2015-03-09 13:47:39 -07:00
Paul O’Shannessy
eaed4d7804 Merge pull request #3345 from zertosh/update-derequire
Update derequire (and greatly improve build speed)
2015-03-09 13:46:49 -07:00
Paul O’Shannessy
769e1cea03 Merge pull request #3337 from facebook/cpojer-patch-2
"Better" duck typing in reactComponentExpect
2015-03-09 13:45:50 -07:00
Paul O’Shannessy
8a3dd040a0 Merge pull request #3331 from zpao/null-frag-proptypes
Allow null and undefined values in non-frag object passed to PropTypes.node
2015-03-09 13:43:26 -07:00
Paul O’Shannessy
57bed796ef Merge pull request #3339 from gabelevi/patch-1
Update jstransform and esprima-fb dependencies
2015-03-09 13:19:41 -07:00
Jim
ccb5ccd5a0 Merge pull request #3341 from rickbeerendonk/3338-documentation-issue
Add documentation about JSX and displayName.
2015-03-09 10:35:28 -07:00
Andres Suarez
9941095dc3 Update to derequire@^2.0.0 2015-03-08 23:43:47 -04:00
Ben Alpert
208b258519 Merge pull request #3343 from BinaryMuse/docs/bkt-add-contextmenu-event
Add onContextMenu to events doc
2015-03-07 20:27:57 -08:00
BinaryMuse
1aa9580484 Add onContextMenu to events doc 2015-03-07 20:22:10 -08:00
Rick Beerendonk
2184162e38 Add documentation about JSX and displayName.
The section that described how JSX transform handles displayName was lost in commit 9b1ee4de46

Fixes #3338
2015-03-07 19:01:58 +01:00
Gabe Levi
ac5af1ec45 Update jstransform and esprima-fb dependencies 2015-03-06 18:31:29 -05:00
Ben Alpert
b95ad296da Merge pull request #3336 from facebook/cpojer-patch-1
Fix documentation typo in ReactComponent
2015-03-06 10:07:45 -08:00
Christoph Pojer
8ce9e2b194 Update reactComponentExpect.js 2015-03-06 02:46:33 -08:00
Christoph Pojer
419038f846 Fix documentation typo in ReactComponent 2015-03-06 01:33:56 -08:00
Paul O’Shannessy
0e797dffe4 Allow null and undefined values in non-frag object passed to PropTypes.node 2015-03-05 17:56:50 -08:00
Jim
c7c2e05c33 Merge pull request #2802 from jsfb/findDOMNode-in-docs
Updated docs examples/recommendations to use findDOMNode instead of getDOMNode
2015-03-05 16:51:13 -08:00
Jim
030fc752ba Updated docs examples/recommendations to use findDOMNode instead of getDOMNode 2015-03-05 16:42:43 -08:00
Ben Alpert
6dbef56da3 Merge pull request #3333 from ariabuckles/docs
[Docs] Add 'ing' to make "opening" and "closing" line up
2015-03-05 16:28:04 -08:00
Aria Buckles
7eb6f68e7c [Docs] Add 'ing' to make "opening" and "closing" line up
Test Plan:
None
2015-03-05 16:25:41 -08:00
Ben Alpert
6b7e4dc8e8 Add warning when using non-component element types
This should make debugging easier for people who missed callsites when fixing up their JSX/non-JSX usage.
2015-03-05 15:24:31 -08:00
Paul O’Shannessy
fa8961118a Merge pull request #3294 from zpao/jsxcompiler-linenumbers
[docs] show line numbers in online jsx compiler
2015-03-04 18:45:18 -08:00
Paul O’Shannessy
bda845cf4c [docs] Fox Ryan's name: #3311 2015-03-04 12:32:41 -08:00
Christopher Chedeau
4485903d40 Update round-up 25
(cherry picked from commit 40336d8144)
2015-03-04 12:32:37 -08:00
Christopher Chedeau
af400ab17b Merge pull request #3304 from facebook/matthewjohnston4-croundup-1
Community Roundup #25 blog post
2015-03-04 09:06:38 -08:00
Jim
71675bb400 Merge pull request #3305 from brafdlog/patch-1
There was a redundant word in the sentence
2015-03-03 14:04:05 -08:00
Paul O’Shannessy
811057aae2 Facebook, not FaceBook 2015-03-03 12:49:02 -08:00
Paul O’Shannessy
a3642d3995 v0.13 rc blog post 2015-03-03 12:42:57 -08:00
brafdlog
457c8e397d There was a redundant word in the sentence 2015-03-03 22:03:53 +02:00
Paul O’Shannessy
2d46d589a1 v0.13.0-rc2 starter kit 2015-03-03 11:46:01 -08:00
Paul O’Shannessy
21b41480a5 v0.13.0-rc2 2015-03-03 11:46:01 -08:00
Paul O’Shannessy
71e583844b Update bower release task
This makes it so we only delete some files during the buld process. We were
losing the LICENSE and PATENTS files.
2015-03-03 11:46:01 -08:00
Paul O’Shannessy
e8ffb80586 [lint] fix errors from new test 2015-03-03 11:23:45 -08:00
Paul O’Shannessy
e114988a2c Sync out another jsx transform test.
We added this test internally and it never got added here. We haven't broken it
with any transforms *yet* but it's still good to actually run all of our tests
here too.
2015-03-03 10:40:07 -08:00
Matthew Johnston
a850603e1c Update 2015-03-03-community-roundup-25.md 2015-03-03 18:34:07 +00:00
Paul O’Shannessy
2e2d79758d Merge pull request #3264 from zpao/transform-jsx
XJS -> JSX
2015-03-03 10:33:08 -08:00
Matthew Johnston
2417b7f4de Update 2015-03-03-community-roundup-25.md 2015-03-03 18:31:45 +00:00
Matthew Johnston
49d5722467 Update 2015-03-03-community-roundup-25.md 2015-03-03 17:56:53 +00:00
Matthew Johnston
e99ef894b8 Community Roundup #25 blog post 2015-03-03 14:20:41 +00:00
Paul O’Shannessy
272ae10b48 Merge pull request #3299 from sebmarkbage/fixwarningformats
Always use a static message formats
2015-03-02 13:19:01 -08:00
Sebastian Markbage
a27c6d1690 Always use a static message formats
These are the only places that seems to be including environment specific
variables in the message format.

By ensuring that they're static, we make it easier to group logs by
format. I also ensure that I keep each addendum separate so that they can
be filtered/grouped separately.
2015-03-02 13:18:38 -08:00
Paul O’Shannessy
4bad1aacb6 Merge pull request #3275 from spicyj/gh-3222
Don't use undefined as parent name in key warning
2015-03-02 12:47:52 -08:00
Paul O’Shannessy
8fdf4bbffc Merge pull request #3276 from spicyj/gh-2978
Add regression test for scry order
2015-03-02 12:46:55 -08:00
Sebastian Markbåge
ecc4ad569a Merge pull request #3266 from sebmarkbage/cloneelement
Add cloneElement Implementation
2015-03-02 12:15:20 -08:00
Sebastian Markbåge
edddd57d28 Merge pull request #3293 from spicyj/gh-3286
ReactFragment counts as a node without warning
2015-03-02 12:10:50 -08:00
Jim
f2c7d9ac81 Merge pull request #3284 from delftswa2014/bugfix/blog/https-urls
Fixed the http url in the blog pages
2015-03-02 11:20:10 -08:00
Paul O’Shannessy
57bd8fe3bb Merge pull request #3295 from koba04/patch-1
Add a code format in 2015-02-24-react-v0.13-rc1.md
2015-03-01 20:48:25 -08:00
Toru Kobayashi
1744977201 Add a code format in 2015-02-24-react-v0.13-rc1.md 2015-03-02 09:33:36 +09:00
Paul O’Shannessy
b2161bd51d [docs] show line numbers in online jsx compiler 2015-03-01 11:53:06 -08:00
Ben Alpert
7ebf7c46f5 ReactFragment counts as a node without warning
Fixes #3286.
2015-03-01 11:50:07 -08:00
Paul O’Shannessy
dc92fa480a Upgrade package dependencies for new esprima/jstransform 2015-03-01 11:25:16 -08:00
Ben Alpert
7346ce5c0b Merge pull request #3288 from apaatsio/remove-unnecessary-variable-in-test
Remove unnecessary variable from test
2015-02-28 13:31:50 -08:00
Antti Ahti
323789540a Remove unnecessary variable from test 2015-02-28 15:23:34 +02:00
Paul O’Shannessy
48e54da484 XJS -> JSX
Part 1: change all of our methods and AST node types.
Part 2: Rename files so there is no trace of XJS
2015-02-27 18:23:18 -08:00
Ben Alpert
673874dc87 Merge pull request #3263 from wmertens/patch-1
beta1 blog entry: Fix CoffeeScript example
2015-02-27 15:28:22 -08:00
PNikray
0e355fc8c4 Fixed the url in community-roundup-9
using http resulted in an error, changing it to https fixes it
2015-02-27 23:43:50 +01:00
PNikray
77ec7da124 Fixed the url in community-roundup-5
using http resulted in an error, changing it to https fixes it
2015-02-27 23:42:14 +01:00
PNikray
94fa077a76 Changed the url of the video in community-round-up-4
The url was using http instead of https, which results in an error.
2015-02-27 23:39:17 +01:00
Ben Alpert
de1f8682d5 Add note about enter/leave bubbling
Fixes #2826.
2015-02-26 16:29:18 -08:00
Ben Alpert
feae9ad0a8 Add regression test for scry order
Fixes #2978.
2015-02-26 15:54:50 -08:00
Ben Alpert
d5fa14de1a Don't use undefined as parent name in key warning
Fixes #3222.
2015-02-26 15:20:37 -08:00
Sebastian Markbåge
1c697ab141 Merge pull request #3265 from sebmarkbage/shouldupdaterefs
Avoid passing `this` of a static object
2015-02-26 13:33:35 -08:00
Sebastian Markbage
4adcee69a0 Add cloneElement Implementation
This is a new version of cloneWithProps but this one is moving out of
add-ons. Unlike cloneWithProps, this one doesn't have special logic for
style, className and children.

This one also preserves the original ref. This is critical when upgrading
from a mutative pattern where a child might have a ref on it.

It also preserves context, which is similar to how context would work when
it is parent based. It also ensures that we're compatible with the old
mutative pattern which makes updates easier.
2015-02-26 01:17:05 -08:00
Sebastian Markbage
061c6fc13c Avoid passing this of a static object
Refactoring artifact.
2015-02-25 18:37:02 -08:00
Ben Alpert
618bbdc531 Merge pull request #3239 from rralian/update/docs-clarify-forceUpdate
Docs: clarifies forceUpdate method
2015-02-25 17:35:07 -08:00
Wout Mertens
ce7190537f beta1 blog entry: Fix CoffeeScript example
Fix the constructor call and make code more idiomatic.
2015-02-26 00:26:16 +01:00
Paul O’Shannessy
84ddd9deaf Merge pull request #3257 from danmane/update-tutorial-md
Add mention of go and php server implementations in React tutorial
2015-02-25 12:46:17 -08:00
Daniel Mané
a7ae40e90d Add mention of go and php server implementations in React tutorial 2015-02-24 15:10:11 -08:00
Paul O’Shannessy
63146e1f16 v0.13 RC blog post
Note: we need to manually specify date in these files so that the sort order is
correct (2 posts on the same day). Otherwise it will just be ABC order, which
is wrong.

Closes: #3256
2015-02-24 14:05:57 -08:00
Paul O’Shannessy
7269422825 Fix typo
(cherry picked from commit 4d90b9bdf3)
2015-02-24 12:49:19 -08:00
Paul O’Shannessy
888daccf9f Merge pull request #3255 from chenglou/fix-blog-post
[Blog] Fix post code snippet display
2015-02-24 12:39:28 -08:00
Cheng Lou
99d23a54bc [Blog] Fix post code snippet display
I think nokogiri (is that what we use?) accidentally escaped this
snippet. Simply putting spaces between braces fixes it.
2015-02-24 15:22:25 -05:00
Paul O’Shannessy
2f20091520 Merge pull request #3250 from sebmarkbage/blogpost
Add Blog Post about ReactElement Changes in 0.13
2015-02-24 11:26:55 -08:00
Sebastian Markbage
cd47798c59 Add Blog Post about ReactElement Changes in 0.13
Explains some of the rationale for the new warnings added in 0.13.
2015-02-24 10:54:03 -08:00
Paul O’Shannessy
44d91295cb Merge pull request #3251 from Simek/empty-docs-prevnext-fix
do not show empty "docs-prevnext" div on single page
2015-02-24 09:24:23 -08:00
Bartosz Kaszubowski
f785dd09ea do not show empty "docs-prevnext" div on single page
to remove additional necessary spacing between content and footer
2015-02-24 16:28:47 +01:00
Bob Ralian
8d29520dc7 clarifies forceUpdate method 2015-02-23 10:34:41 -06:00
Paul O’Shannessy
95206fe5dc Make cloneWithProps typechecks static-only 2015-02-22 14:40:39 -08:00
Paul O’Shannessy
a30e25467d v0.13.0-rc1 starter kit 2015-02-22 13:32:25 -08:00
Paul O’Shannessy
06126ad3f4 v0.13.0-rc1 2015-02-22 13:26:13 -08:00
Paul O’Shannessy
4f26cc1414 Update dependencies 2015-02-22 13:26:13 -08:00
Paul O’Shannessy
d83fa6a6bf Merge pull request #3224 from Simek/patch-2
wider Twitter timeline on support page
2015-02-22 13:10:43 -08:00
Paul O’Shannessy
fe16c8292c Merge pull request #3232 from artnez/master
Add vendor/inline-source-map.js to package.json
2015-02-22 13:01:05 -08:00
Paul O’Shannessy
029e64bb56 Merge pull request #3233 from artnez/es6-call-spread
Add support for jstransform es6-call-spread
2015-02-22 12:57:25 -08:00
Artem Nezvigin
0bc4aafb74 Add support for jstransform es6-call-spread 2015-02-22 11:57:06 -08:00
Artem Nezvigin
d7791a7cbb Add vendor/inline-source-map.js to package.json 2015-02-22 11:11:48 -08:00
Bartosz Kaszubowski
087cd7b27a wider Twitter timeline on support page 2015-02-21 23:20:09 +01:00
Paul O’Shannessy
5ab7fdecfe Merge pull request #2994 from chenglou/docs-classset
[Docs] Add note on classSet deprecation
2015-02-20 17:00:36 -08:00
Paul O’Shannessy
4046b92487 Merge pull request #2847 from zpao/jsx-es5
Expose --target=esversion flag on jsx executable
2015-02-20 15:19:37 -08:00
Paul O’Shannessy
d40be68d2c Expose --target flag on jsx executable
Valid values are 'es3' and 'es5'.
es3: perform reserved words quoting, don't use defineProperty
es5: default, don't do the above, class methods non-enumerable
2015-02-20 13:37:42 -08:00
Paul O’Shannessy
821383165f Merge pull request #3212 from denis-sokolov/patch-1
Contributing: cleanup quote style
2015-02-20 08:20:18 -08:00
Denis Sokolov
ae3e85d9e4 Contributing: cleanup quote style
The line above it recommends `'` over `"`, and yet the line in question uses `"`.
2015-02-20 12:06:33 +02:00
Greg Hurrell
531add88c4 Add Relay blog post
closes #3174
2015-02-19 21:27:45 -08:00
Paul O’Shannessy
85baea4404 Merge pull request #3209 from chicoxyzzy/eslint-everywhere
lint from root
2015-02-19 20:59:44 -08:00
Paul O’Shannessy
362e9595c4 Fix long lines in vendor/fbtransform/visitors
I meant to do this with #3206 but forgot to add them.
2015-02-19 18:43:06 -08:00
Paul O’Shannessy
a3ee6a9548 Merge pull request #2993 from chenglou/classset-ded
Put deprecation warning for classSet
2015-02-19 18:36:36 -08:00
Jim
8326a9f11e Merge pull request #2921 from hanski07/updateTransferringPropsDocs
Update transferring props docs
2015-02-19 17:52:02 -08:00
chico
90ce7f67d7 lint vendor/*.js 2015-02-20 04:37:45 +03:00
chico
ed6d02e1a8 fix .eslintignore 2015-02-20 04:31:21 +03:00
Jim
8913a07ada Merge pull request #3161 from koba04/fix-clone-with-props-document
Fix a doc. cloneWithProps clones a ReactElement.
2015-02-19 17:14:53 -08:00
chico
1876bc2432 remove ballmer example 2015-02-20 04:13:07 +03:00
Toru Kobayashi
60e96edce2 Fix a doc. cloneWithProps clones a ReactElement. 2015-02-20 10:08:46 +09:00
chico
466f4faf4e lint from root 2015-02-20 04:06:15 +03:00
Jim
d69329a17c Merge pull request #3208 from jsfb/clonewithprops-jsdocs
Fixed mistake in jsdocs types for cloneWithProps
2015-02-19 17:02:28 -08:00
Jim
bad85fafa1 Fixed mistake in jsdocs types for cloneWithProps 2015-02-19 16:38:25 -08:00
Cheng Lou
835316bc13 Put deprecation warning for classSet
Also removes the one test that used the module.
2015-02-19 19:31:54 -05:00
Paul O’Shannessy
c889f409bf Merge pull request #3191 from zpao/jsxtransformer-use-shared-code
Use same pathways for browser transforms as we use in react-tools
2015-02-19 16:09:41 -08:00
Paul O’Shannessy
cb3e797236 Merge pull request #3206 from zpao/lint-fbtransform
Lint vendor/fbtransform as well
2015-02-19 16:06:38 -08:00
Paul O’Shannessy
e60db7316f Merge pull request #3198 from zpao/jsx-option-parsing
Move option parsing into react-tools proper.
2015-02-19 15:54:11 -08:00
Paul O’Shannessy
0f85884fa4 Merge pull request #3201 from zpao/non-factory-invariant
Warn when using constructor function directly
2015-02-19 15:53:50 -08:00
Sebastian Markbåge
977204991b Merge pull request #3205 from sebmarkbage/warningfixes
More warnings to ReactFragment.create
2015-02-19 15:43:18 -08:00
Paul O’Shannessy
e830cea050 Lint vendor/fbtransform as well 2015-02-19 15:26:27 -08:00
Sebastian Markbage
5a2c80382c More warnings to ReactFragment.create
Apparently I could've used these too because if you accept an arbitrary
node, then these could end up being objects, but those objects might
also be arrays or elements.
2015-02-19 15:11:49 -08:00
Paul O’Shannessy
02d225f26e Merge pull request #3193 from fisherwebdev/remove_lodash
Remove lodash devDependency
2015-02-19 14:22:34 -08:00
Paul O’Shannessy
ad31cfa4dc Warn when using constructor function directly
We no longer support the legacy factory style of calling component constructors
directly. We only support createElement or the wrapping of classes with
createFactory. Instead of letting this fail in a gross way as we try to run,
add a nice warning that shows up before the gross TypeError.
2015-02-19 13:57:48 -08:00
Jim
a2f77208e6 Merge pull request #3180 from cody/https
Using https URLs for embedded fiddles
2015-02-19 13:18:34 -08:00
Paul O’Shannessy
21a9e8b6e8 Merge pull request #3189 from hzoo/more-lint
More lint - remove spaces in object braces / array brackets
2015-02-19 11:42:02 -08:00
Paul O’Shannessy
629d400774 Merge pull request #3165 from oiva/jquery-mobile-example
Change how components are rendered in jQuery Mobile example. Fixes #2880
2015-02-19 10:48:26 -08:00
Paul O’Shannessy
112f7aa249 Move option parsing into react-tools proper.
We were doing some preprocessing for module options in the command line. Since
we also expose the same API via react-tools (and JSXTransformer), we need to do
the same processing from the API. So just move it all to the same place.
2015-02-19 09:46:25 -08:00
fisherwebdev
10d336d4eb Remove lodash devDependency 2015-02-18 22:41:58 -08:00
Steven Luscher
f1288d1055 Added the immutability talk to the React.js Conf update.
(cherry picked from commit de8b3eb9d4)
2015-02-18 21:42:11 -08:00
Paul O’Shannessy
0e0a8f65c5 Use same pathways for browser transforms as we use in react-tools
This makes sure we can use the same options everywhere, even from react-rails,
without having to specify each one separately in JSXTransformer as well.
2015-02-18 21:40:16 -08:00
Henry Zhu
eba5d1365c lint: remove spaces from array brackets 2015-02-19 00:13:36 -05:00
Henry Zhu
07cfd66028 lint: remove spaces from object braces 2015-02-19 00:10:31 -05:00
Timothy Yung
b0789c9582 Merge pull request #3187 from yungsters/shallow
Support unmounting in ReactShallowRenderer
2015-02-18 17:47:12 -08:00
yungsters
e9e33b984f Support unmounting in ReactShallowRenderer
Reviewers: @sebmarkbage, @zpao

Test Plan:

```
$ npm test ReactTestUtils
```
2015-02-18 17:45:42 -08:00
Paul O’Shannessy
6c29eba035 Merge pull request #2821 from zpao/unitless-css-boxflex
Add boxFlex and boxFlexGroup to CSS Unitless Properties
2015-02-18 17:22:56 -08:00
Stefan Dombrowski
8ba3ba49d2 Using https for embedded fiddles
Official announcement from jsfiddle:
https://twitter.com/jsfiddle/status/565041134435852289
2015-02-18 23:07:48 +01:00
Paul O’Shannessy
6f7b9a97bf Merge pull request #3108 from zpao/quadratic-example
Replace Ballmer Peak example with Quadratic Formula
2015-02-18 14:02:17 -08:00
Paul O’Shannessy
1caeda30ea Replace Ballmer Peak example with Quadratic Formula 2015-02-18 13:59:26 -08:00
Steven Luscher
85a6462062 Added special edition round-up for React.js Conf 2015
(cherry picked from commit 233980826c)
2015-02-18 13:30:26 -08:00
Sebastian Markbåge
5499321d63 Merge pull request #3183 from yungsters/master
Support rendering to null in ShallowComponentRenderer
2015-02-18 11:43:07 -08:00
yungsters
e952869ff8 Support rendering to null in ShallowComponentRenderer
Reviewers: @sema, @zpao

Test Plan:
```
$ npm jest
```
2015-02-18 11:31:02 -08:00
Sebastian Markbåge
00a3b9233f Merge pull request #3177 from sebmarkbage/fixbindwarningstring
Forgotten string
2015-02-17 18:26:32 -08:00
Sebastian Markbage
377319b863 Forgotten string
We forgot this `%s` as this was converted.
2015-02-17 18:26:12 -08:00
Sebastian Markbåge
c61207588d Merge pull request #3175 from sebmarkbage/fixhasownorder
Avoid reading the property if hasOwnProperty is false
2015-02-17 16:02:18 -08:00
Sebastian Markbage
67cf95c16d Avoid reading the property if hasOwnProperty is false
Easy with an Object.assign polyfill
2015-02-17 15:59:01 -08:00
Sebastian Markbåge
de3ecabd6c Merge pull request #3148 from hmarr/fix-nan-mutation-warning
Prevent NaN props from triggering warnings
2015-02-17 15:41:18 -08:00
Sebastian Markbåge
cf4bef8bd7 Merge pull request #3171 from sebmarkbage/moarwarnings
Moar Warnings
2015-02-17 15:09:33 -08:00
Oiva Eskola
4c32fb487e Wrap jQuery Mobile example's components with React.createFactory to fix on v0.13.0. Fixes #2880 2015-02-18 00:13:13 +02:00
Jim
f6920ba377 Merge pull request #3170 from adelevie/patch-1
Make tutorial CDN URLs use https
2015-02-17 11:50:54 -08:00
Sebastian Markbage
2490289c4a Warn if getDOMNode or isMounted is accessed in render
This is an anti-pattern that can be easily avoided by putting the logic
in componentDidMount and componentDidUpdate instead.

It creates a dependency on stale data inside render without enforcing
a two-pass render.
2015-02-17 11:49:20 -08:00
Alan deLevie
4980bcb0f3 Make tutorial CDN URLs use https 2015-02-17 14:34:01 -05:00
Sebastian Markbage
91194126d8 Warn if using Maps as children
We're not sure if this is the way we want to support this API. It creates
two ways of doing things.

It is convenient to avoid needing to explicitly redefine the key of Maps.
However, this use case isn't as common as having an iterable where the
key is on the value, not the key.
2015-02-17 11:23:12 -08:00
Paul O’Shannessy
a8d9bff3ca Merge pull request #3168 from briankung/docs-jsx-namespacing
[Docs] Clarify section on namespaced components
2015-02-17 11:10:33 -08:00
Paul O’Shannessy
9e2da7a0ae Merge pull request #3164 from oiva/master
Fix sourcemap filenames when using transformWithDetails. Fixes #3140
2015-02-17 11:07:19 -08:00
Sebastian Markbage
3587460675 Warn if accessing .type on a factory
This was an important convenience as an upgrade path but shouldn't be
necessary if you're using best-practice of calling createFactory in the
consuming component.
2015-02-17 11:06:54 -08:00
Paul O’Shannessy
68a8e4491f Merge pull request #3147 from hzoo/lint-fixes
lint whitespace , trailing comma
2015-02-17 10:58:42 -08:00
Paul O’Shannessy
6cd7ab5254 Merge pull request #3154 from iamdustan/patch-1
s/upate/update
2015-02-17 10:55:42 -08:00
Brian Kung
26e0b1a298 [Docs] Clarify section on namespaced components
While going through the docs, I wasn't sure if the first example was
something I should do or not. This makes the wording a bit more clear.
2015-02-17 06:40:48 -06:00
Ben Alpert
6d97c708a9 Merge pull request #3167 from MichelleTodd/docs-grammar
[Docs] Reword section on React without JSX
2015-02-16 17:26:23 -08:00
Michelle Todd
17f2c26139 [Docs] Reword section on React without JSX
Summary:
This section was confusing. I reworded it from:

"JSX is completely optional. You don't have to use JSX with React.
You can create these trees through `React.createElement`. The first
argument is the tag, pass a properties object as the second
argument and children to the third argument."

to:

"JSX is completely optional; you don't have to use JSX with React.
You can create React elements in plain JavaScript using
`React.createElement`, which takes a tag name or component, a
properties object, and variable number of optional child
arguments."

and additionally added another child element to the example code.

Test Plan:
Read the new paragraph!
2015-02-16 17:12:19 -08:00
Ben Alpert
6729acf370 Merge pull request #3162 from vsiao/mount-element
Fix ReactMount._renderNewRootComponent signature
2015-02-16 16:05:08 -08:00
Oiva Eskola
35e24759f1 fix sourcemap filenames when using transformWithDetails. Fixes #3140 2015-02-16 22:21:51 +02:00
Vincent Siao
96e4e3cbbc Fix ReactMount._renderNewRootComponent signature (ReactComponent -> ReactElement) 2015-02-15 19:25:18 -08:00
Dustan Kasten
dc21dca50e s/upate/update 2015-02-14 22:09:31 -05:00
Henry Zhu
cb49492f88 lint whitespace
- use spaces
- remove space before paren in function
-  remove space before colon in object
2015-02-14 11:12:18 -05:00
Harry Marr
198aabaafb Prevent NaN props from triggering warnings
Previously, `checkAndWarnForMutatedProps` would flag `NaN` props as
having been mutated, because `NaN !== NaN`. This prevents that warning
from being emitted by explicitly checking for `NaN`s.
2015-02-14 10:06:55 +00:00
Henry Zhu
74726f0af5 remove space before round brace in function expressions 2015-02-13 23:41:53 -05:00
Henry Zhu
e2a57920da lint whitespace , trailing comma 2015-02-13 23:13:47 -05:00
Paul O’Shannessy
5126cee0f5 v0.13.0-beta.2 2015-02-13 18:28:03 -08:00
Paul O’Shannessy
432e378687 Remove references to vendor_deprecated 2015-02-13 18:27:22 -08:00
Paul O’Shannessy
ad01f21469 Merge pull request #3145 from jsfb/dedup-is-owner-important
Dedupe owner-is-important warning.
2015-02-13 18:26:49 -08:00
Jim
207b03c56d Dedupe owner-is-important warning. 2015-02-13 18:05:18 -08:00
Paul O’Shannessy
0b5331c155 Update license for jsx_orphaned_brackets_transformer 2015-02-13 15:45:01 -08:00
Paul O’Shannessy
3751f85260 Merge pull request #3139 from brianpchsu/master
Fixed Copyright year for three files and react.js licence to BSD-license
2015-02-13 15:44:03 -08:00
Jeff Morrison
8e803cba23 Merge pull request #3143 from jeffmo/flow_0_3_0
Update jsx binary to latest jstransform + latest flow syntax features
2015-02-13 15:37:41 -08:00
jeffmo
332a782d28 Add --es6module and --non-strict-es6module flags to jsx bin 2015-02-13 17:51:35 -05:00
jeffmo
34bb8e85a2 Bump jstransform version to 9.1.0 to include new flow updates 2015-02-13 17:40:52 -05:00
Jim
5512d0d4d0 Merge pull request #3132 from jsfb/warn-less-for-owner-necessary
Only monitor components that are likely stateful (inputs and composites)
2015-02-13 13:55:06 -08:00
Brian Hsu
7e609c6903 Fixed Copyright year for three files and react.js licence to BSD-license. 2015-02-13 12:15:49 -08:00
Paul O’Shannessy
2a3f43184a Merge pull request #3123 from chicoxyzzy/remove-jshint
ESLint coverage
2015-02-13 11:39:11 -08:00
Paul O’Shannessy
5714510ea4 Merge pull request #3134 from briankung/update-safe_yaml
Fix for the jekyll docs build process
2015-02-13 11:22:47 -08:00
Jim
f18dfdc00d Only monitor components that are likely stateful (inputs and composites) 2015-02-12 17:22:42 -08:00
chico
862f7d6a41 fix linting 2015-02-13 02:45:50 +03:00
chico
96677d5da5 update eslint rules 2015-02-13 02:44:32 +03:00
chico
e02a303e3e .eslint in src is not necessary anymore 2015-02-13 02:44:32 +03:00
chico
1511fff598 eslint 2015-02-13 02:43:42 +03:00
Brian Kung
892200ae38 Bumps safe_yaml to 1.0.4 (was 1.0.3) to fix bug
safe_yaml 1.0.3 has some issues with Ruby 2.2.0:
https://github.com/dtao/safe_yaml/issues/67
2015-02-12 17:40:57 -06:00
Paul O’Shannessy
fffe135931 Merge pull request #3133 from zpao/more-lint
More lint rules, fixes
2015-02-12 15:37:22 -08:00
Paul O’Shannessy
7e5eb4b2b2 Add indent lint rule, fix code 2015-02-12 14:31:55 -08:00
Paul O’Shannessy
52b32d83d0 Remove newline at beginning of file 2015-02-12 14:28:54 -08:00
Paul O’Shannessy
12808e81c1 Fix license header to use BSD 2015-02-12 14:28:32 -08:00
Paul O’Shannessy
af8ad59a5b Add space-before-blocks rules, fix code 2015-02-12 14:28:01 -08:00
Sebastian Markbåge
a411f3e0dc Merge pull request #3130 from sebmarkbage/identifiablewarnings
Moar warnings with solid prefixes!
2015-02-12 13:47:53 -08:00
Sebastian Markbage
f5038829d8 Moar warnings with solid prefixes!
This ensures that we have a prefix that can be easily identified in logs
so that we can filter out warnings based on their prefix.

This also turns the remaining two monitorCodeUse callers into warnings.
We'll probably still use monitorCodeUse until we know if we want to
deprecate but most releases should only have warnings.
2015-02-12 13:37:19 -08:00
Paul O’Shannessy
d2fcdfc7df Merge pull request #3126 from Sourdoughh/patch-1
Update to CLA, CONTRIBUTING.md
2015-02-11 16:46:53 -08:00
Jason Ly
462f3ca245 Update to CLA, CONTRIBUTING.md 2015-02-11 13:56:25 -08:00
Christopher Chedeau
6c549d2899 update image perf 2015-02-11 12:45:58 -08:00
Sebastian Markbåge
032fb6ce11 Merge pull request #3107 from sebmarkbage/fragments
Warn if a non-object value is used in ReactFragment.create
2015-02-11 11:58:46 -08:00
Paul O’Shannessy
c07657fde1 Merge pull request #3114 from chicoxyzzy/master
rename `Id` suffix to `ID` to apply naming conventions
2015-02-11 11:35:17 -08:00
Paul O’Shannessy
ea29768a2b Merge pull request #3118 from rkho/patch-1
Updated CONTRIBUTING.md: Mention of "facebook.com" was not a link
2015-02-11 11:34:48 -08:00
Christopher Chedeau
83e4409a72 Tweaks on Advanced Performance 2015-02-11 11:14:59 -08:00
Christopher Chedeau
ab512af57f Advanced Performance Doc 2015-02-11 10:53:57 -08:00
chico
fbe88c7e46 fix Microdata properties' commentaries 2015-02-11 15:50:59 +03:00
Jim
130a164c8d Merge pull request #3117 from jsfb/use-warning-module
Flip console.warn to use warning module.
2015-02-10 17:08:12 -08:00
Jim
4e5543965d Flip console.warn to use warning module so users can intercept all warnings by shimming the warning module.
The two remaining console.warns are:

/Users/jsproch/react/src/test/mock-modules.js:
   19      return mocks.generateFromMetadata(mocks.getMetadata(exports));
   20    } catch (err) {
   21:     console.warn(err);
   22      return exports;
   23    }

/Users/jsproch/react/src/vendor/core/warning.js:
   39        var argIndex = 0;
   40        var message = 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]);
   41:       console.warn(message);
   42        try {
   43          // --- Welcome to debugging React ---
2015-02-10 15:23:24 -08:00
Richard Kho
9c19135c34 Updated CONTRIBUTING.md: Mention of "facebook.com" was not a link
Updated the mention of "facebook.com" on line 3 of the CONTRIBUTING.md file to link to Facebook. Previously, this mention was just in plain text.

Changed from `facebook.com` to `[facebook.com](https://facebook.com)`

No other content has been changed. Content has not been removed from this file in any way.
2015-02-10 14:44:23 -08:00
chico
58d705110e rename Id suffix to ID to apply naming conventions 2015-02-10 21:40:30 +03:00
Paul O’Shannessy
f6f0bab237 Merge pull request #3103 from zpao/lifecyle-warn-not-throw
Warn when calling setState & other methods at wrong time
2015-02-10 09:58:34 -08:00
Sebastian Markbage
093ab00085 Warn if a non-object value is used in ReactFragment.create
I made this mistake while upgrading a few callers.

I'm leaving this as warning so that it is always safe to wrap any existing
child in React.addons.createFragment without breaking prod.

This makes upgrading easier.
2015-02-10 09:44:14 -08:00
Paul O’Shannessy
01ef83feef Merge pull request #3105 from matiassingers/jasmine-call-count-consistency
Jasmine spies call count property consistency
2015-02-09 18:17:16 -08:00
Matias Singers
b9310a8fa5 Consistently use calls.length instead of callCount for Jasmine spies 2015-02-10 10:11:22 +08:00
Paul O’Shannessy
5967915ec4 Warn when calling setState & other methods at wrong time
Currently we use an invariant to prevent this code pattern. That is really
aggressive for something that doesn't actually put React in a bad state. This
diff replaces invariants with warnings and makes those code paths no-ops.
2015-02-09 17:04:13 -08:00
Sebastian Markbåge
7b0ce2c11f Merge pull request #3100 from sebmarkbage/fragments
Dead code
2015-02-09 14:58:21 -08:00
Sebastian Markbage
18c9a6e54a Dead code
Missed this because lint was off
2015-02-09 14:57:07 -08:00
Sebastian Markbåge
0fdd2a74e2 Merge pull request #3030 from sebmarkbage/fragments
Make keyed object fragments an opaque type
2015-02-09 14:50:46 -08:00
Paul O’Shannessy
d59a039ebd Merge pull request #3097 from zpao/upgrade-eslint
Upgrade to newer eslint, use esprima-fb
2015-02-09 14:32:28 -08:00
Paul O’Shannessy
1455001caa Merge pull request #2998 from rickbeerendonk/docs-conferences
Add Conferences section to the Community Resources on the website
2015-02-09 14:32:04 -08:00
Paul O’Shannessy
dae1dc6292 Upgrade to newer eslint, use esprima-fb
Eslint now allows us to use a different parser, which allows us to use
esprima-fb explicitly. This means we don't have to wait for espree to add
things like rest-param parsing. Though we do need eslint to upgrade its rules
to handle that AST.

I had hoped to enable parsing of our tests but we can't do that until we
change esprima-fb's XJS nodes to JSX.

While I was here, I also enabled the no-unused-vars rule since eslint
understands template strings. I also made the single quote enforcement
actually fail instead of just warn.
2015-02-09 14:27:28 -08:00
Sebastian Markbage
56f51156ba Make keyed object fragments an opaque type
This triggers a warning if you try to pass a keyed object as a child.

You now have to wrap it in React.addons.createFragment(object) which
creates a proxy (in dev) which warns if it is accessed. The purpose of
this is to make these into opaque objects so that nobody relies on its
data structure.

After that we can turn it into a different data structure such as a
ReactFragment node or an iterable of flattened ReactElements.
2015-02-09 14:24:56 -08:00
Rick Beerendonk
1b86246d64 Remove zerowidth space at the beginning of file 2015-02-09 22:17:33 +01:00
Paul O’Shannessy
44634c062a Merge pull request #3082 from hzoo/patch-1
Add React.js Conf Keynote talk (with playlist)
2015-02-09 10:17:37 -08:00
Paul O’Shannessy
358e70cedd Merge pull request #3089 from iamdanfox/fix-markdown-parsing-error-3075
Fix markdown parsing error
2015-02-09 10:12:17 -08:00
Paul O’Shannessy
cb833710af Merge pull request #2968 from ClimbsRocks/patch-5
Reordered 'Using Props' before 'Component Properties'
2015-02-09 10:08:44 -08:00
Paul O’Shannessy
a6a64d1ed4 Merge pull request #2854 from cedrics/add-iframe-component
Adds a composite component for an iframe to handle load events
2015-02-09 09:59:01 -08:00
Dan Fox
462ab93d83 Fix markdown parsing error
closes #3075
2015-02-08 11:31:48 +00:00
Paul O’Shannessy
60c2f56e6e Merge pull request #3074 from noyobo/master
fix Chinese docs typos
2015-02-06 17:17:46 -08:00
Paul O’Shannessy
7853260788 Merge pull request #3080 from zpao/upgrade-internal-modules
Upgrade internal modules
2015-02-06 17:17:00 -08:00
Henry Zhu
bcdf8f2375 Add React.js Conf Keynote talk (with playlist) 2015-02-06 18:31:00 -05:00
Jim
3740c51616 Merge pull request #3078 from vincentriemer/patch-1
Fixed pure-render-mixin documentation
2015-02-06 13:33:06 -08:00
Cheng Lou
b6980ab980 [Docs] Add note on classSet deprecation 2015-02-06 16:25:48 -05:00
Jim
c69a9206a4 Merge pull request #3073 from gsklee/patch-3
Fix typos in animation.md
2015-02-06 13:14:30 -08:00
Paul O’Shannessy
705353fbaf Move keyMirror to vendor to match internal move 2015-02-06 12:09:36 -08:00
Vincent Riemer
0bf88f26a4 Corrected pure-render-mixin documentation
Fixed the PureRenderMixin documentation which was incorrectly importing the base React library instead of ReactWithAddons.
2015-02-06 14:34:09 -05:00
Paul O’Shannessy
3525d01b9b Remove more upstream modules that aren't used
Immutable* hasn't been used... ever?
copyProperties, merge were deprecated as part of 0.12. We've replaced
them with Object.assign.
2015-02-06 09:54:52 -08:00
noyobo
7f6c575d9d Chinese docs Typesetting beautification & relate links 2015-02-06 19:44:14 +08:00
noyobo
9296f15682 Chinese docs typo 2015-02-06 17:31:33 +08:00
YouBao Nong
8197bface7 sync up Chinese docs links 2015-02-06 16:26:43 +08:00
YouBao Nong
7cb1b9bdb2 fix next page link typo
下一页链接错误
2015-02-06 15:53:45 +08:00
Preston Parry
0903120ad1 Update tutorial.md 2015-02-05 22:57:36 -08:00
G. Kay Lee
678ec31e41 Fix typos 2015-02-06 14:47:56 +08:00
Paul O’Shannessy
8ab0ecba13 Sync internal modules
We've actually diverged more with some modules, but we don't want
a cascade of dependencies out here. Mostly, the changes internally that
we don't want are tied to FB infrastructure but otherwise are
functionally equivalent (usually around error reporting, code monitoring).
2015-02-05 16:31:54 -08:00
Sebastian Markbåge
007207bac4 Merge pull request #3068 from sebmarkbage/dedupwarning
Warn only once for each class when accessing .type
2015-02-05 15:36:37 -08:00
Sebastian Markbage
140d9b4192 Warn only once for each class when accessing .type
Currently it is a bit too spammy.
2015-02-05 12:32:15 -08:00
Andreas Svensson
c7e4f55eb0 Merge pull request #3047 from syranide/escbrow2
Drop processAttributeNameAndPrefix and invalid attribute name escaping
2015-02-05 20:53:47 +01:00
Paul O’Shannessy
123d218eaf Merge pull request #3046 from cobbweb/patch-1
Add autoFocus to supported HTML attributes
2015-02-05 10:50:38 -08:00
syranide
6af987c524 Drop processAttributeNameAndPrefix and invalid attribute name escaping 2015-02-05 09:43:26 +01:00
Andreas Svensson
04e6d02e40 Merge pull request #1599 from syranide/escbrow
Split escapeTextForBrowser into escapeTextContentForBrowser and quoteAttributeValueForBrowser
2015-02-05 09:41:36 +01:00
Andrew Cobby
a4c96d6e9c Add autoFocus to supported HTML attributes
It appears to be supported http://jsfiddle.net/9f48wbsa/1/
2015-02-05 16:45:27 +10:00
Paul O’Shannessy
787200631b Merge pull request #3045 from milanlandaverde/removes-validation-msg
remove extraneous argument to createChainableTypeChecker in ReactPropTypes
2015-02-04 19:36:11 -08:00
Marlon Landaverde
876fdd0190 removes loose validation message 2015-02-04 21:13:59 -06:00
Paul O’Shannessy
7e6c820cd2 Merge pull request #3022 from btholt/master
Added itemRef and itemId for complete microdata support.
2015-02-04 16:57:03 -08:00
Paul O’Shannessy
f2cd1a0591 Merge pull request #2969 from gsklee/patch-1
Update thinking-in-react.md
2015-02-04 15:22:37 -08:00
Paul O’Shannessy
ac4b64059e Merge pull request #3013 from akheron/patch-2
Document React.addons.TestUtils.isElement()
2015-02-04 15:19:08 -08:00
Sebastian Markbåge
3abfe00ae7 Merge pull request #3039 from sebmarkbage/fixismounted
Fix isMounted inside of render
2015-02-04 11:53:07 -08:00
Sebastian Markbage
263800e09b Fix isMounted inside of render
This is apparently used to determine if you can access refs.

Bad pattern, but a pattern nonetheless.
2015-02-04 11:50:04 -08:00
Paul O’Shannessy
99a2ef30ae Merge pull request #3032 from germ13/patch-1
Corrected documentation
2015-02-04 11:46:27 -08:00
Paul O’Shannessy
f77e86834b Merge pull request #3036 from jergason/master
Fix list formatting in glossary
2015-02-04 11:45:05 -08:00
Andreas Svensson
6672a7ec62 Merge pull request #2135 from syranide/ie8enctype
IE8 does not have a setter for property "enctype"
2015-02-04 13:47:54 +01:00
Andreas Svensson
8ca058ac4e Split escapeTextForBrowser into escapeTextContentForBrowser and quoteAttributeValueForBrowser 2015-02-04 13:44:38 +01:00
Jamison Dance
d74d0e3215 Fix list formatting in glossary 2015-02-03 23:34:43 -07:00
juan serrano
3a0534e1b8 Corrected documentation 2015-02-03 18:41:47 -08:00
Lee Byron
9174501771 Merge pull request #2991 from leebyron/state-queue
Set state takes a function
2015-02-03 19:52:26 -05:00
Lee Byron
279b956c9b Set state takes a function
This diff enables setState to accept a function in addition to a state partial. If you provide a function, it will be called with the up-to-date `state, props, context` as arguments.

This enables some nicer syntax for complex setState patterns:

If setState is doing an increment and wants to guarantee atomicy, you need a function:

```
this.setState(state => ({ number: state.number + 1 }));
```

This atomicy is particularly important if setState is called multiple times in a single frame of execution as the result of complex user actions. It's a tricky bug to chase down and difficult to determine how to fix when you find it. The current pattern of reaching into _pendingState relies on an implementation detail.

In this example: props.doAction() may result in your ancestor re-rendering and providing you with new props. If setState is called directly with an object literal referencing `this.props`, it will use the *old* version of props, not the new value. Using a function solves for this case:

```
this.props.doAction();
this.setState((state, props) => ({ number: state.number * props.multiplier }));
```
2015-02-03 19:49:17 -05:00
Paul O’Shannessy
3f60a99cd9 Merge pull request #3016 from hnordt/patch-1
Removing unnecessary returns
2015-02-03 10:46:21 -08:00
Jeff Morrison
acca4b3993 Merge pull request #3020 from syranide/jsxbracketcodemod
Added jsx_orphaned_brackets_transformer for breaking JSX parser change
2015-02-03 09:56:28 -08:00
Héliton Nordt
62213e08df Fix highlighting 2015-02-03 08:38:16 -02:00
Sebastian Markbåge
c8833daf53 Merge pull request #3026 from sebmarkbage/fixdependency
Hot fix cyclic dependency
2015-02-02 23:57:46 -08:00
Sebastian Markbage
e3f95ea293 Hot fix cyclic dependency
We accidentally created an unfortunate cyclic dependency because of the
auto-wrapper hack that uses ReactClass.

Making it injected instead.
2015-02-02 23:55:34 -08:00
Sebastian Markbåge
50c38bbc75 Merge pull request #3023 from sebmarkbage/devtoolsfix
Expose ReactReconciler
2015-02-02 22:07:28 -08:00
Sebastian Markbåge
1172f636cb Merge pull request #3025 from sebmarkbage/fixrendercallback
Always trigger an update when a callback is enqueued.
2015-02-02 22:07:13 -08:00
Brian Holt
7b92d71744 Changed itemId to itemID and added clarity to the comments of where it is specified. 2015-02-02 21:58:00 -08:00
Sebastian Markbage
2702281a13 Always trigger an update when a callback is enqueued.
enqueueCallbackInternal forgot to schedule an update.

We could rely on the implicit contract of enqueueElement to do it. However,
if we're currently outside a transaction, it'll flush synchronously. Before
we enqueue the callback. We could also enqueueCallback before we
enqueueElement, but that causes a fragile relationship between them. E.g.
enqueueElement should not need to schedule an update if it is the same
element.
2015-02-02 20:42:15 -08:00
Sebastian Markbage
e67ff7ee78 Expose ReactReconciler
This can be used by devtools to monkey patch the reconciler and therefore
get notified whenever any internal instance is updated.
2015-02-02 18:15:31 -08:00
Brian Holt
ea67a1d436 Added itemRef and itemId for complete microdata support. 2015-02-02 17:17:04 -08:00
syranide
f3271ad53b Added jsx_orphaned_brackets_transformer for breaking JSX parser change 2015-02-02 23:24:15 +01:00
Andreas Svensson
63c3461af7 Merge pull request #1864 from syranide/ie8text2
Newlines handled incorrectly by innerText in IE8
2015-02-02 21:33:48 +01:00
Andreas Svensson
c371709d23 Newlines handled incorrectly in innerText in IE8 2015-02-02 21:27:27 +01:00
Andreas Svensson
8d6c8a7793 Merge pull request #3017 from syranide/trydefine
Try/catch property deprecation warnings to support IE8
2015-02-02 21:26:18 +01:00
Jim
381a01a19b Merge pull request #3018 from jsfb/assert-not-throw
Expecting transform not to throw.  Removed meaningless comment.
2015-02-02 12:21:05 -08:00
Jim
b207b8698c Expecting transform not to throw. Removed meaningless comment. 2015-02-02 12:19:47 -08:00
Andreas Svensson
387adae3de Merge pull request #3000 from syranide/openbool
Set HTML DOM property "open" to HAS_BOOLEAN_VALUE
2015-02-02 21:11:10 +01:00
syranide
0a1cd56ead Try/catch property deprecation warnings to support IE8 2015-02-02 21:00:04 +01:00
Paul O’Shannessy
6c36b528e2 Merge pull request #2997 from rickbeerendonk/2943-jsx-build-tool-documentation
Documents that JSX tool is transforming files with .js extension (and no...
2015-02-02 11:25:32 -08:00
Paul O’Shannessy
f922664e86 Merge pull request #3007 from JoelOtter/patch-2
Add note linking to up-to-date doc on Flux website
2015-02-02 11:22:45 -08:00
Sebastian Markbåge
534d23d903 Merge pull request #3012 from sebmarkbage/typescript
Use TypeScript Compiler API Directly
2015-02-02 11:21:40 -08:00
Héliton Nordt
8fc4f23cdb Removing unnecessary returns 2015-02-02 17:20:38 -02:00
Paul O’Shannessy
bab94bf2af Merge pull request #3011 from koba04/fix-coponent-api-doc
Fix consistency of component api document
2015-02-02 11:18:10 -08:00
Paul O’Shannessy
8b1cd7509d Merge pull request #3001 from rgarcia/patch-1
remove extraneous comma in tutorial
2015-02-02 11:16:28 -08:00
Paul O’Shannessy
2aeb8a2a6b Merge pull request #2995 from rickbeerendonk/copyright-2015
Update copyright headers for 2015
2015-02-02 11:15:30 -08:00
Paul O’Shannessy
e04bdd8c9b Merge pull request #2999 from sedovsek/master
Changed unit to pixels due to inconsistent font-size rendering of code elements.
2015-02-02 11:05:35 -08:00
Petri Lehtinen
2e232f83bc Document React.addons.TestUtils.isElement() 2015-02-02 10:22:52 +02:00
Sebastian Markbage
f6fd4a8506 Use TypeScript Compiler API Directly
In 1.4.0 we can use the TypeScript API directly to preprocess our files.
This lets us get rid of a dependency.

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API

We can also use this to provide our default libraries so that we don't
need to keep the references in the test file.
2015-02-01 22:41:00 -08:00
Toru Kobayashi
b7860b7da4 Fix consistency of component api document 2015-02-02 09:52:08 +09:00
Joel Auterson
344d07d7de Add note linking to up-to-date doc on Flux website 2015-02-01 15:26:29 +00:00
Rafael
246fdebf82 remove extraneous comma in tutorial 2015-01-31 12:31:14 -10:00
syranide
aa9edc2a9c Set HTML DOM property "open" to HAS_BOOLEAN_VALUE 2015-01-31 23:11:08 +01:00
Robert Sedovsek
ea94ec8c0e Changed unit to pixels due to inconsitent font-size rendering of code elements. 2015-01-31 22:53:21 +01:00
Rick Beerendonk
f1bd869350 Add Conferences section to the Community Resources on the website 2015-01-31 22:46:03 +01:00
Rick Beerendonk
2de44cf668 Documents that JSX tool is transforming files with .js extension (and not .jsx) by default 2015-01-31 20:59:18 +01:00
Rick Beerendonk
3e0750a4ad Update copyright headers for 2015 2015-01-31 20:18:25 +01:00
Andreas Svensson
905bfcec60 Merge pull request #1912 from syranide/safereuse
Warn if mounting into node with dirty rendered markup
2015-01-31 19:56:34 +01:00
Andreas Svensson
c460ad660b Warn if mounting into node with dirty rendered markup 2015-01-31 19:36:12 +01:00
Andreas Svensson
a170629128 Merge pull request #1568 from syranide/dompurge
Only purgeID on ReactDOMComponent and ReactDOMTextComponent unmount
2015-01-31 18:21:22 +01:00
Lee Byron
508b625313 Merge pull request #2990 from jeffkole/patch-1
Documents that `classSet` concatenates its arguments
2015-01-30 21:45:54 -05:00
Jeff Kolesky
b7530e19eb Documents that classSet concatenates its arguments
Just wanted it to be noted that `classSet` operates in two ways, both of which are valuable.
2015-01-30 16:47:44 -08:00
syranide
a7f0fb7c4f Only purgeID on ReactDOMComponent and ReactDOMTextComponent unmount 2015-01-30 21:32:58 +01:00
Paul O’Shannessy
9f9d833065 Merge pull request #2987 from jsfb/fix-markdown-output-wrap
Fixed linewrap issue on markdown output css.  Fixes #2986
2015-01-30 12:22:44 -08:00
Jim
2ea00ea772 Fixed linewrap issue on markdown output css. Fixes #2986 2015-01-30 12:19:18 -08:00
Jim
ddb1c7470e Merge pull request #2960 from jsfb/add-detectable-prefix-to-reactelement-warning
Add detectable prefix to ReactElement proptype warning.
2015-01-30 12:14:33 -08:00
Paul O’Shannessy
bab59cd090 Pull in 0.13 beta blog post from 0.12-stable branch 2015-01-30 11:49:40 -08:00
Jim
b2f77e6de3 Add detectable prefix to ReactElement proptype warning. 2015-01-30 11:43:57 -08:00
G. Kay Lee
140627b1b2 Update thinking-in-react.md
Make style consistent with `tutorial.md`
2015-01-28 16:59:03 +08:00
Paul O’Shannessy
5bd078508a v0.13.0-beta.1 2015-01-27 21:13:35 -08:00
Paul O’Shannessy
bd56b731de Merge pull request #2967 from zpao/jest-match-internal
[jest] Use persistModuleRegistryBetweenSpecs
2015-01-27 20:54:19 -08:00
Paul O’Shannessy
657e30771a Merge pull request #2966 from zpao/grunt-jest
Run jest with grunt, add to travis
2015-01-27 20:51:39 -08:00
Paul O’Shannessy
e2d3370aa9 Merge pull request #2964 from zertosh/no-derequire-when-minifying
Remove "derequire" from minified bundles
2015-01-27 20:51:08 -08:00
Preston Parry
5776dc7918 Update tutorial.md 2015-01-27 20:27:16 -08:00
Paul O’Shannessy
14d88d4e38 [jest] Use persistModuleRegistryBetweenSpecs
This more closely matches how we have jest configured at FB, so when we
pull in and run internally we will have fewer things to waste time on.
2015-01-27 19:17:31 -08:00
Paul O’Shannessy
49eb84efdd Run jest with grunt, add to travis
This is to make sure we don't end up with differences in our different
testing methods. We may switch out the failure allowances later (maybe
just jest will be good enough and we can let phantom fail for a little
bit).
2015-01-27 18:04:58 -08:00
Scott Feeney
76f5453cc7 Mention shallow rendering's limitations
Also, move it to the bottom of the test utils documentation and mention that it's experimental.
2015-01-27 17:09:16 -08:00
Paul O’Shannessy
dbdeb078ce [testing] dump the cache when depending on warning messages
It's possible to configure Jest to not dump the module cache between
specs. This makes it tricky when we silence warnings one a 2nd call.

In this case, the same message was getting logged so when we expected
the count of warning calls to increment, it didn't.
2015-01-27 16:02:00 -08:00
Jim
2ea1f51fe8 Merge pull request #2965 from ClimbsRocks/patch-4
Docs wording tweak: subject verb agreement
2015-01-27 14:45:15 -08:00
Preston Parry
e4352efc21 Update 04-multiple-components.md 2015-01-27 14:34:35 -08:00
Andres Suarez
5c5fc5e316 Remove "derequire" from minified bundles 2015-01-27 16:53:18 -05:00
Scott Feeney
f6804d2504 Add documentation for shallow testing
See #2393 for the original issue, and #2497 for the implementation.
2015-01-27 13:44:20 -08:00
Paul O’Shannessy
9801f2d8ab Merge pull request #2940 from kevinold/2749-consistent-use-of-spys-or-mocks
update to use spyOn for console.warn #2749
2015-01-27 13:38:56 -08:00
Ben Alpert
513433b370 Merge pull request #2962 from ClimbsRocks/patch-3
Docs wording tweak for clarity
2015-01-27 11:59:00 -08:00
Ben Alpert
8174262135 Merge pull request #2961 from ClimbsRocks/patch-1
Rewording for clarity
2015-01-27 11:58:36 -08:00
Preston Parry
33ecec07cb Update 02.1-jsx-in-depth.md 2015-01-27 11:22:21 -08:00
Preston Parry
cadbe1d27e Rewording for clarity 2015-01-27 11:04:21 -08:00
Sebastian Markbåge
8bbaa95a49 Merge pull request #2948 from jergason/master
do not validate propTypes in production
2015-01-27 10:55:14 -08:00
Sebastian Markbåge
61c4497d58 Merge pull request #2959 from sebmarkbage/createmixin
We don't currently have a way to trace the origin of a mixin
2015-01-27 10:39:25 -08:00
Sebastian Markbåge
b3f96d97f9 Merge pull request #2957 from sebmarkbage/renamecomponent
Rename ReactComponentBase -> ReactComponent
2015-01-27 10:39:07 -08:00
Sebastian Markbage
295ef0063b We don't currently have a way to trace the origin of a mixin
This makes it more difficult to find bugs in mixins both dynamically
and using a static type system.

We also don't have a way to find these to be upgraded to a new mixin
syntax if we needed to.

This hook is currently an optional noop but could be made required to
create a mixin class.
2015-01-27 09:36:14 -08:00
Sebastian Markbage
c3c98084b9 Rename ReactComponentBase -> ReactComponent
We freed up this internal name by removing the internal base class.
We're now free to use this name as it was intended.

ReactDOMComponent and ReactCompositeComponent are still confusing as
they're internal but we'll rename them later.
2015-01-27 09:22:07 -08:00
Jamison Dance
f61ca8d307 don't validate propTypes in production
Switch to warnings so code execution doesn't differ between prod and
dev.
2015-01-27 09:45:20 -07:00
Sebastian Markbåge
16a56afada Merge pull request #2936 from sebmarkbage/refactorlifecycles
Use Singleton LifeCycle State
2015-01-27 01:26:30 -08:00
Sebastian Markbage
bebc568ceb Use Singleton LifeCycle State
All entry points are for reconciliation are within batching strategies.

Since we don't have any batching strategies with synchronous updates,
there can't be more than one life-cycle method on the stack at any given
time.

Therefore, it's safe to move the composite life cycle flag to a singleton.
This saves us some memory management.

I think that we can get rid of these life cycle states completely in the
future.
2015-01-27 01:19:31 -08:00
Sebastian Markbåge
7e6251887f Merge pull request #2935 from sebmarkbage/batchupdates
Batch updates in initial render
2015-01-27 01:06:56 -08:00
Sebastian Markbage
9811b10aaa Batch updates in initial render
Currently, the first setState that happens during initial render will
start a new batch. Any subsequent updates will be batched. That means that
the first setState is synchronous but any subsequent setStates are
asynchronous.

This commit makes it so that the batching starts at the root. That way all
the setStates that happen within life-cycle methods are asynchronous.
2015-01-27 01:00:59 -08:00
Sebastian Markbåge
b3df7cabb7 Merge pull request #2930 from sebmarkbage/updatequeue
Extract setState, setProps etc into ReactUpdateQueue
2015-01-27 00:57:44 -08:00
Sebastian Markbage
ed7332c749 Extract setState, setProps etc into ReactUpdateQueue
I originally did this work so that we could allow setState to be called
before the internal ReactCompositeComponent was constructed. It's unlikely
that we'll go down that route now but this still seems like a better
abstraction. It communicates that this is not immediately updating an
object oriented class. It's just a queue which a minor optimization.
It also avoids bloating the ReactCompositeComponent file.

Since they both depend on the life cycle I break that out into a common
shared dependency. In a follow up I'll refactor the life-cycle management.
2015-01-27 00:55:25 -08:00
Sebastian Markbage
103bf101ae Fix broken jest test
jest accidentally picked up this .d.ts file as a test.

I'll just move it out to fix it.
2015-01-26 23:37:30 -08:00
Sebastian Markbåge
9b23807cfd Merge pull request #2953 from sebmarkbage/callbacktests
Add Tests to Callbacks of the Life Cycles
2015-01-26 23:30:14 -08:00
Sebastian Markbage
fd077d7492 Add Tests to Callbacks of the Life Cycles
This adds some much needed tests of the callbacks to setState, setProps
and render.
2015-01-26 23:26:24 -08:00
Jim
61ee74b562 Merge pull request #2941 from kevinold/2870-update-warning-calls
Update warning calls to use %s #2870
2015-01-26 22:06:42 -08:00
Kevin Old
f0ea2b5979 update to use spyOn for console.warn #2749 2015-01-26 21:51:42 -06:00
Kevin Old
e8ef06783a Update warning calls to use %s #2870 2015-01-26 21:39:43 -06:00
Paul O’Shannessy
c6d1904f24 Merge pull request #2951 from mzabriskie/semicolon
Provide warning when using styles containing a semicolon
2015-01-26 18:32:57 -08:00
Jim
c3522b80a5 Merge pull request #2920 from jsfb/move-proptype-validation
Move propType validation to element instead of class.
2015-01-26 17:21:01 -08:00
Sebastian Markbåge
46ae2f4e55 Merge pull request #2952 from sebmarkbage/typescript
Add Basic TypeScript Class Test
2015-01-26 17:19:18 -08:00
Jim
6ee5299b4a Move propType validation to element instead of class.
Conflicts:
	src/classic/element/ReactElementValidator.js
2015-01-26 17:16:49 -08:00
Sebastian Markbage
f837cc289e Move component class instantiation into ReactCompositeComponent
We need to move instantiation into the mount phase for context purposes.

To do this I moved the shallow rendering stuff into ReactTestUtils and
reused more of the existing code for it by instantiating a noop child.

Everywhere we refer to the "type" we should pass it to ReactNativeComponent
to resolve any string value into the underlying composite.
2015-01-26 17:16:21 -08:00
mzabriskie
ae5a124745 Using %s in warning message 2015-01-26 18:09:21 -07:00
mzabriskie
fca0fdc115 Better tests 2015-01-26 18:08:51 -07:00
Sebastian Markbage
6c145c31f5 Add Basic TypeScript Class Test
As part of the new class effort it is now possible to define React
Components using any type of generic JavaScript class syntax.

This includes TypeScript classes. This test ensures that we don't regress
that support, and also serves as an example for using React in TypeScript.
TypeScript provides a good demo of where we think property initializers
are going.

We don't have any official *type* support for TypeScript yet.

This test trails the ReactES6Class-test file. Some manual tweaking is
required when converting tests.
2015-01-26 16:59:11 -08:00
mzabriskie
b6edbae3fc Renaming assertValidStyle to warnValidStyle 2015-01-26 17:50:35 -07:00
mzabriskie
94fb463c06 Moar tests 2015-01-26 17:45:51 -07:00
mzabriskie
05e2bc6b5c Fixing lint failures 2015-01-26 17:41:54 -07:00
mzabriskie
4054bb13cd Provide warning when using styles containing a semicolon 2015-01-26 17:33:44 -07:00
Paul O’Shannessy
96058a10ee Merge pull request #2939 from patlaughlin/patch-1
Update 06-transferring-props.md
2015-01-26 16:32:09 -08:00
Sebastian Markbåge
d750cf7401 Merge pull request #2942 from sebmarkbage/metamatchers
Add Meta Matchers for Testing Tests
2015-01-26 16:05:40 -08:00
Sebastian Markbage
3bbf6ce1a5 Add Meta Matchers for Testing Tests
This adds a matcher called toEqualSpecsIn which executes two test suites,
without reporting the result. It then compares the specs and the number
of expects executed by each spec.

This will be used to ensure that tests written in other languages test the
same thing as the base line, ES6 classes.

Sets up CoffeeScript equivalence test.
2015-01-26 15:50:57 -08:00
Sebastian Markbåge
e6672a3a03 Merge pull request #2944 from sebmarkbage/coffeescript
Add CoffeeScript Class Test
2015-01-26 11:10:18 -08:00
Sebastian Markbage
5f150822e6 Add CoffeeScript Class Test
As part of the new class effort it is now possible to define React
Components using any type of generic JavaScript class syntax.

This includes CoffeeScript. This test ensures that we don't regress that
support, and also serves as an example for using React in CoffeeScript.

This test fail trails the ReactES6Class-test file. Some manual tweaking is
required when converting tests.
2015-01-26 02:19:35 -08:00
Patrick Laughlin
51e0610a62 Update 06-transferring-props.md 2015-01-25 22:03:57 -05:00
Sebastian Markbåge
4486a17c24 Merge pull request #2933 from sebmarkbage/pendingcontext
Remove _pendingContext
2015-01-24 21:54:36 -08:00
Sebastian Markbage
adabfe2f49 Remove _pendingContext
There is no way to queue an update to a context so there is no need for
this field. The only way to get a new context is from above.

Soon _pendingElement will get the same treatment. Once _setPropsInternal
can be removed.
2015-01-24 20:09:14 -08:00
Sebastian Markbåge
1c90efbf7c Merge pull request #2923 from sebmarkbage/dropcomponentmixin
Replace ReactComponentMixin with ReactReconciler
2015-01-23 18:06:50 -08:00
Sebastian Markbage
690409a912 Replace ReactComponentMixin with ReactReconciler
Instead of putting the shared code in a base class method, we use a wrapper
call around all invokations. That way they're free to add code before AND
after the non-shared code.

That way we ensure that component extensions don't need to implement
ReactComponentMixin and do super() calls into it. This helps to create a
tighter API for custom component extensions.

This provides the first step towards moving these methods to static
methods which allows to use a different dispatch mechanism instead of
virtual method calls. E.g. pattern matching.
2015-01-23 17:27:42 -08:00
Ben Alpert
ac7677bb11 Update .mailmap for me 2015-01-23 11:10:22 -08:00
Sebastian Markbåge
0e108b180a Merge pull request #2918 from sebmarkbage/fixcontexts
Move Component Class Instantiation into ReactCompositeComponent
2015-01-23 10:41:47 -08:00
Sebastian Markbage
9abd1133c9 Pass context to the constructor
This should reenable reading this.context from getInitialState.

Added a bunch of tests for this too.
2015-01-23 10:09:45 -08:00
Sebastian Markbage
766a79c695 Move component class instantiation into ReactCompositeComponent
We need to move instantiation into the mount phase for context purposes.

To do this I moved the shallow rendering stuff into ReactTestUtils and
reused more of the existing code for it by instantiating a noop child.

Everywhere we refer to the "type" we should pass it to ReactNativeComponent
to resolve any string value into the underlying composite.
2015-01-23 10:09:45 -08:00
Kirk Steven Hansen
3d37c95533 Typo in first commit. 2015-01-22 23:34:14 -06:00
Kirk Steven Hansen
b4007e85b8 Updated tutorial to be more clear about the dependence on the --harmony flag. 2015-01-22 23:30:02 -06:00
Sebastian Markbåge
8616a6f60e Merge pull request #2919 from sebmarkbage/removecreateref
Remove React.createRef API
2015-01-22 19:13:55 -08:00
Sebastian Markbage
a3a464c8fc Remove React.createRef API
This API was removed so this won't work.
2015-01-22 19:11:11 -08:00
Ben Alpert
f9821de909 Merge pull request #2917 from spicyj/ref-composite
Switch first-class refs to use functions
2015-01-22 18:19:05 -08:00
Ben Alpert
322bde6eb0 Switch first-class refs to use functions
Closes #1373.

Test Plan: jest
2015-01-22 18:10:25 -08:00
Jim
734aedb977 Merge pull request #2892 from jsfb/fbme-url-for-dangerouslySetInnerHtml
Added fb.me url to error message.
2015-01-22 17:07:28 -08:00
Ben Alpert
a534264c1e Merge pull request #2916 from spicyj/ref-composite
Move ref code to ReactCompositeComponent
2015-01-22 16:01:51 -08:00
Ben Alpert
9c3d6b8881 Move ref code to ReactCompositeComponent
You can only get a ref to a ReactCompositeComponent, so move the ref code here which gives us more flexibility to put it at the correct time in the lifecycle.

There should be no behavior change in this commit.

Test Plan: jest
2015-01-22 15:36:59 -08:00
Paul O’Shannessy
3d109aa11b Merge pull request #2915 from zpao/lint-fixup
Fix a couple small lint issues
2015-01-22 14:56:25 -08:00
Paul O’Shannessy
c33d443c0b Fix a couple small lint issues
These aren't caught by eslint yet :(
2015-01-22 14:39:08 -08:00
Sebastian Markbåge
8a5c5ba69d Merge pull request #2913 from sebmarkbage/typewarning
Add warning when accessing .type on a component class
2015-01-22 13:39:07 -08:00
Sebastian Markbage
1ed1d7a158 Add warning when accessing .type on a component class
Since we removed the wrapper factory around classes, the class is just
the class now so there is no need for this indirection property.
2015-01-22 13:26:34 -08:00
Paul O’Shannessy
6588a84a0f Merge pull request #2765 from zpao/jsxtransformerlinenumber
Check for lineNumber support before using it
2015-01-22 12:58:51 -08:00
Jim
b94adc9724 Added fb.me url to error message. 2015-01-22 12:56:52 -08:00
Paul O’Shannessy
f8a214137a Merge pull request #2903 from tendant/merge-conflicts-in-translation
Update documents for Chinese translation
2015-01-22 12:55:53 -08:00
Paul O’Shannessy
92e361709c [docs] Use current date in copyright footer
This will be based on the site generation time, making doc generation
slightly less deterministic but that's ok. Now we won't depend on
helpful community members updating it for us (#2874) when we forget,
it'll just happen naturally the next time the site is generated.
2015-01-22 12:50:52 -08:00
Jim
54b565de93 Merge pull request #2518 from jsfb/documentation-for-dangerouslySetInnerHtml
Document justification for dangerouslySetInnerHTML, fixes #2256
2015-01-22 10:52:47 -08:00
Ben Alpert
76e1d5a542 Merge pull request #2902 from swestwood/patch-2
Correctly highlight changed line in tutorial.
2015-01-22 08:27:29 -08:00
Lei
943c2aa77a Add Chinese translation of reusable-components 2015-01-21 19:43:24 -08:00
Lei
833fcb6593 Add Chinese translation of multiple-components 2015-01-21 19:34:40 -08:00
Paul O’Shannessy
6247f30103 Merge pull request #2890 from amykyta/patch-1
Update 02.1-jsx-in-depth.md
2015-01-21 19:07:01 -08:00
Timothy Yung
b403af192d Merge pull request #2900 from wincent/test-desc-fix
Fix inaccurate spec description
2015-01-21 18:56:33 -08:00
Paul O’Shannessy
4b2e89dd99 Add npm run build
It's a "shortcut" to `grunt build`
2015-01-21 17:23:36 -08:00
Sophia Westwood
a19966f2ea Correctly highlight changed line in tutorial.
This excerpt adds the onSubmit handler to the form element, but the line was not highlighted as having been modified.
2015-01-21 17:15:31 -08:00
Greg Hurrell
76fe572a97 Fix inaccurate spec description
The string here was initially accurate, but got out of sync with reality
when the commit was revised (as 892e357fd5).
2015-01-21 17:07:29 -08:00
Timothy Yung
892e357fd5 Merge pull request #2894 from yungsters/local-event-trap-mixin
Fix LocalEventTrapMixin for Bad Tree State
2015-01-21 15:34:32 -08:00
yungsters
a7aca51f1e Throw for Misue of LocalEventTrapMixin
Summary:
If `getDOMNode()` returns null in `LocalEventTrapMixin`, `listener` will also be null and `accumulateInto` will throw. This changes `LocalEventTrapMixin` to throw a more helpful error message.

Test Plan:
Ran unit test successfully:

```
npm test LocalEventTrapMixin-test.js
```
2015-01-21 15:30:04 -08:00
Jim
6f44f6049e Document justification for dangerouslySetInnerHTML, fixes #2256
Conflicts:
	docs/_data/nav_tips.yml
	docs/tips/17-children-undefined.md
2015-01-21 12:47:36 -08:00
Isaac Salier-Hellendag
972befe0b6 Merge pull request #2889 from salier/react-default-perf
Repair ReactDefaultPerf
2015-01-21 13:28:53 -06:00
amykyta
b8f3c7f7fb Update 02.1-jsx-in-depth.md 2015-01-21 12:22:29 -05:00
Isaac Salier-Hellendag
de54d84051 Repair ReactDefaultPerf
Update ReactDefaultPerf to properly record component names.
2015-01-21 10:52:43 -06:00
Cedric Sohrauer
5f837074f9 adds a composite component for an iframe to handle load events
This is basically a copy of ReactDOMImg
2015-01-21 10:33:34 +01:00
Paul O’Shannessy
ce5346f2ce Merge pull request #2884 from chenglou/fix-ex-source-map
Temporarily comment out bundle-collapser for JSXTransformer
2015-01-20 18:55:39 -08:00
Paul O’Shannessy
f9c393f4fb Fix strict mode violoation in test 2015-01-20 18:26:51 -08:00
Cheng Lou
51d74ca36c Temporarily comment out bundle-collapser for JSXTransformer
This will at least make the examples run while we fix the issue.
2015-01-20 20:27:59 -05:00
Paul O’Shannessy
06de3f31f0 Merge pull request #2875 from kchia/patch-2
Update 03-interactivity-and-dynamic-uis.md: correct typo
2015-01-20 16:42:27 -08:00
Paul O’Shannessy
0a62a04909 Merge pull request #2881 from camsong/master
Add Chinese translation to several pages.
2015-01-20 16:41:58 -08:00
Sebastian Markbage
a5657d213c Fix lint 2015-01-20 14:40:19 -08:00
Paul O’Shannessy
c778e61da0 Fix ES6Class test so it runs in browsers
document.createElement throws an error if you don't pass it any
arguments. Neither PhantomJS nor jest (via jsdom at version jest is
using) behave as browsers do now so this went unnoticed.
2015-01-20 14:30:33 -08:00
Sebastian Markbåge
2d75b11097 Merge pull request #2808 from sebmarkbage/modernclasses
New class instantiation and initialization process
2015-01-20 14:28:40 -08:00
Sebastian Markbage
291a92c4a6 New class instantiation and initialization process
This allows state to be set up in the constructor instead of through
getInitialState. getInitialState is now considered part of "classic".
Therefore, they move into ReactClass's constructor.

As a consequence of this, we no longer have a mapping between the internal
representation and the public instance during the mounting process.
Because the constructor hasn't returned yet.

We used to have a special case for calling setState in getInitialState
which was just ignored. This makes that throw and the component is
considered unmounted during the construction phase.
2015-01-20 14:27:28 -08:00
Jim
f92967c886 Merge pull request #2853 from jsfb/warn-only-on-read
Eliminate context warnings when component isn't reading the conflicting context variable
2015-01-20 11:57:30 -08:00
Cam Song
1694aff89e Add Chinese translation to 7 more pages.
Translate 'Note' to '注意' instead of '提示' to make it more sensible.
2015-01-20 00:15:16 +08:00
Hou Chia
9f18ccdce9 Update 03-interactivity-and-dynamic-uis.md: correct typo
My file change corrects a typo in the document.

Best, 
Hou
2015-01-18 00:35:27 -08:00
Paul O’Shannessy
c6686768eb Merge pull request #2874 from Carlsson87/patch-1
Update footer with correct year
2015-01-17 12:21:21 -08:00
Daniel Carlsson
4ffdbefaa2 Friends don't let friends look foolish on the internet
Updated your footer =)
2015-01-17 20:16:24 +01:00
Paul O’Shannessy
f656f1966e Merge pull request #2297 from pedronauck/docs-namespace-in-jsx
Add a section at 'jsx-in-depth' talking about namespaced components
2015-01-16 16:21:22 -08:00
Paul O’Shannessy
4f50071de0 Merge pull request #2675 from af/topLevelAPIDocs
Top level api docs for createFactory
2015-01-16 13:18:28 -08:00
Paul O’Shannessy
d6aa588dfc Merge pull request #2360 from beausmith/patch-1
Highlighted changed lines in examples
2015-01-16 13:10:00 -08:00
Paul O’Shannessy
31002e0cc1 Merge pull request #2707 from camsong/master
More Chinese Doc Translation
2015-01-16 13:06:40 -08:00
Paul O’Shannessy
1b85e611ad Merge pull request #2734 from Minwe/master
add Forms and Event System docs Chinese translation
2015-01-16 13:06:12 -08:00
Paul O’Shannessy
d471fb4c0b Merge pull request #2795 from chenglou/tips-lib
[Docs] Tip on integration with other libraries
2015-01-16 13:05:43 -08:00
Paul O’Shannessy
69d40d1be3 Merge pull request #2824 from zpao/docs-tutorial-server
[docs] Talk about running a server in tutorial
2015-01-16 13:05:19 -08:00
Ben Alpert
1428ea7823 Merge pull request #2502 from fabiomcosta/patch-4
Removing unecessary resize listener
2015-01-16 12:08:34 -08:00
Paul O’Shannessy
deae575dae v0.13.0-alpha.2 2015-01-16 10:33:42 -08:00
Paul O’Shannessy
588032da51 Update package deps 2015-01-16 10:33:42 -08:00
Paul O’Shannessy
2de1545eae Merge pull request #2867 from zpao/no-warn-mock-methods
Don't warn about plain classes when in mocked components
2015-01-15 16:45:05 -08:00
Paul O’Shannessy
069aec1d42 Don't warn about plain classes when in mocked components
Mocking both doesn't copy properties that start with an underscore, nor
does it copy values, only nested objects.
2015-01-15 16:39:57 -08:00
Sebastian Markbåge
c01507fd11 Merge pull request #2866 from sebmarkbage/fixbindwarning
Don't bind callbacks to setState, setProps etc.
2015-01-15 15:36:50 -08:00
Paul O’Shannessy
45c0747a17 Merge pull request #2851 from jsfb/unique-key-in-dev-only
The unique key warning should only happen in dev.
2015-01-15 15:08:43 -08:00
Sebastian Markbage
d7d3ea5560 Don't bind callbacks to setState, setProps etc.
We added a bind to the public instance, but instead we can just pass the
public instance as the context when we execute.

This avoids a warning that fires when we call bind on auto-bound methods.
2015-01-15 14:00:45 -08:00
Paul O’Shannessy
8e6e98b387 Merge pull request #2865 from zpao/revert-jasmine-helper
Revert "Merge pull request #2814 from jsfb/testutils-consolemock"
2015-01-15 13:47:34 -08:00
Paul O’Shannessy
967435b249 Revert "Merge pull request #2814 from jsfb/testutils-consolemock"
This reverts commit 9514861d93, reversing
changes made to cdec83732d.
2015-01-15 13:35:57 -08:00
Cheng Lou
251d31a515 Merge pull request #2859 from javawizard/patch-1
ref-08-reconciliation.md: grammar/punctuation fixes
2015-01-15 14:36:27 -05:00
Alex Boyd
941cba679e ref-08-reconciliation.md: grammar/punctuation fixes 2015-01-14 22:40:29 -07:00
Ben Alpert
8d5838af72 Merge pull request #2540 from spicyj/no-mutate-props
Warn when mutating props on a ReactElement
2015-01-14 11:37:43 -08:00
Paul O’Shannessy
892f0a59fe Fix lint on travis
PR #2852 was not quite correct
2015-01-13 16:55:10 -08:00
Paul O’Shannessy
29ca22c2ff Merge pull request #2852 from zpao/lint-fail-travis
Add eslint grunt task, fail travis for it
2015-01-13 16:12:15 -08:00
Paul O’Shannessy
84c83dca2d Add eslint grunt task, fail travis for it
This is it...
2015-01-13 16:11:42 -08:00
Jim
8aa6171fd6 Eliminate context warnings when component isn't reading the conflicting context variable. 2015-01-13 15:34:46 -08:00
Paul O’Shannessy
54c82da15f Merge pull request #2751 from zpao/eslint-fixup
Eslint fixup
2015-01-13 15:27:54 -08:00
Paul O’Shannessy
47ee780caf [lint] fix consistent-returns 2015-01-13 15:26:33 -08:00
Paul O’Shannessy
2126600c37 [lint] disable a couple rules since rest args aren't processed right 2015-01-13 15:26:33 -08:00
Paul O’Shannessy
847357e42e [lint] Fix reasonable lines to 80
I don't agree with 80 on principal but it's what we have for now.

This fixes the reasonable cases. Most of the long lines are in docblocks
with long type information or containing links.
2015-01-13 15:26:33 -08:00
Paul O’Shannessy
e27da99731 [lint] Fix majority of issues eslint found 2015-01-13 15:26:33 -08:00
Paul O’Shannessy
df2ddc5dfa [lint] convert to single quotes 2015-01-13 15:26:33 -08:00
Paul O’Shannessy
df64a67b7f codemod "use strict" to 'use strict' for better linting 2015-01-13 15:26:32 -08:00
Jim
fa40eefa00 Merge pull request #2818 from jsfb/unmasked-context-in-performContextUpdate
Context warning should fire on update, not just initial mount.
Renamed a couple instances of context
2015-01-13 15:05:45 -08:00
Paul O’Shannessy
aeffbef21f Merge pull request #2662 from zpao/eslint
Use eslint
2015-01-13 14:03:16 -08:00
Jim
6b5b1b3f17 The unique key warning should only happen in dev. 2015-01-13 14:03:00 -08:00
Paul O’Shannessy
3f8d4eaa63 Use eslint
These rules are very close to what we have internally. We may still miss
a couple things (jsdoc params being a big one) but it's good enough.
This is also more restrictive than what we enforce internally, but it's
for the best.
2015-01-13 14:01:34 -08:00
Sebastian Markbåge
7a3083af36 Merge pull request #2806 from sebmarkbage/baseclass
Warn when defined methods are used in plain JS classes
2015-01-13 11:40:52 -08:00
Sebastian Markbage
2330962d25 Warn when defined methods are used in plain JS classes
In ReactClass we use early validation to warn you if a accidentally defined
propTypes in the wrong place or if you mispelled componentShouldUpdate.

For plain JS classes there is no early validation process. Therefore, we
wait to do this validation until the component is mounted before we issue
the warning.

This should bring us to warning-parity with ReactClass.
2015-01-13 11:29:28 -08:00
Sebastian Markbåge
d138f9a35b Merge pull request #2805 from sebmarkbage/baseclass1
Introducing ReactComponentBase base class
2015-01-13 11:00:56 -08:00
Sebastian Markbage
ff032dc857 Introducing ReactComponentBase base class
This is the base class that will be used by ES6 classes.

I'm only moving setState and forceUpdate to this base class and the other
functions are disabled for modern classes as we're intending to deprecate
them. The base classes only have getters that warn if accessed. It's as if
they didn't exist.

ReactClass now extends ReactComponentBase but also adds the deprecated
methods. They are not yet fully deprecated on the ReactClass API.

I added some extra tests to composite component which we weren't testing
to avoid regressions.

I also added some test for ES6 classes. These are not testing the new
state initialization process. That's coming in a follow up.
2015-01-13 10:54:19 -08:00
Jim
e4842b4ae2 Context warning should fire on update, not just initial mount.
Renamed a couple instances of context to make it clear if it was masked/unmasked
2015-01-12 16:40:08 -08:00
Ben Alpert
90053da7bd Merge pull request #2844 from kchia/patch-1
Update README.md insert comma
2015-01-12 09:45:52 -10:00
Hou Chia
08c7c556de Update README.md insert comma
The file change inserts a missing comma.

Best,
Hou
2015-01-12 11:29:17 -08:00
Jim
d94acc0363 Merge pull request #2830 from jsfb/remove-tag-warning
Removed unknown tag warning/whitelist.
2015-01-12 10:42:44 -08:00
Ben Alpert
a5aacb947f Warn when mutating props on a ReactElement
Test Plan: jest. Also used ballmer-peak in IE8 to verify that it still works.
2015-01-11 10:45:37 -10:00
Christopher Chedeau
f50da7ec63 Merge pull request #2832 from kikyous/patch-1
Update 07-forms.md
2015-01-10 13:54:05 -08:00
Jim
61f7a5613b Removed unknown tag warning/whitelist. 2015-01-09 11:46:47 -08:00
chen
bb52715f1c Update 07-forms.md 2015-01-09 10:19:42 +08:00
Paul O’Shannessy
8babd0ada3 [docs] Talk about running a server in tutorial
We've talked about this a few times and even half done it. This is for
real.
2015-01-07 17:26:54 -08:00
Paul O’Shannessy
5394acdb4b Merge pull request #2799 from stkb/master
Wrap setInnerHTML in Windows 8 apps (Fixes #441)
2015-01-07 16:47:32 -08:00
Paul O’Shannessy
4772967e29 Remove period from findDOMNode test filename 2015-01-07 15:16:31 -08:00
Paul O’Shannessy
6204aeec7d Merge pull request #2822 from zpao/rm-immutable
Remove LegacyImmutableObject
2015-01-07 13:27:21 -08:00
Jim
9514861d93 Merge pull request #2814 from jsfb/testutils-consolemock
Added jasmine matcher that expects calls to console.warn.
2015-01-07 13:10:53 -08:00
Paul O’Shannessy
7863175cd9 Remove LegacyImmutableObject
We don't use it and it's not part of the build so nobody else is using
it. You should probably use immutable instead anyway.
2015-01-07 11:37:52 -08:00
Paul O’Shannessy
52e8ba4a40 Add boxFlex and boxFlexGroup to CSS Unitless Properties
Fixes #2812
2015-01-07 11:27:43 -08:00
Jason Bonta
cdec83732d suggesting the use of immutable js for comparisons 2015-01-07 10:46:50 -08:00
Jim
bd4aff062d Added jasmine matcher that expects calls to console.warn. 2015-01-06 14:05:37 -08:00
Paul O’Shannessy
a45472e050 Merge pull request #2793 from huang47/improve/use-bundle-collapser-to-reduce-file-size
use bundle-collapser to reduce browserified file size
2015-01-05 15:43:04 -08:00
Paul O’Shannessy
680bfd54a6 Merge pull request #2807 from JoshSGman/patch-1
Fix Outdated Copyright Year
2015-01-05 15:42:12 -08:00
Jim
e5b3f9aefa Merge pull request #2520 from jsfb/warn-for-dangerouslySetInnerHtml
Added checks for incorrect usage of innerHTML. Fixes #1370
2015-01-05 13:39:16 -08:00
Jim
158e0dd35a Merge pull request #2614 from jsfb/monitor-should-update-owner-is-useful
Find cases where shouldUpdateReactComponent is det
2015-01-05 13:32:43 -08:00
Jim
2a28189bea Merge pull request #2800 from jsfb/getDOMNode-becomes-findDOMNode
Minor updates to findDOMNode, as per additional post-commit CR feedback.
2015-01-05 13:29:14 -08:00
Jim
f507ba3c2b Minor updates to findDOMNode, as per additional post-commit CR feedback. 2015-01-05 13:26:35 -08:00
ShihChi Huang
9bc1961936 apply browserify bundle collapser to all build type 2015-01-05 13:15:16 -08:00
Joshua Goldberg
e926d4ff54 Fix Outdated Copyright Year
Fix outdated copyright year (update to 2015)
The copyright year was out of date. Copyright notices must reflect the current year. This commit updates the listed year to 2015.
2015-01-05 13:52:20 -05:00
Paul O’Shannessy
a7028c467f Merge pull request #2801 from jsfb/componentDidUpdate-docs
Update docs to indicate that componentDDidUpdate is fired after changes are flushed to the DOM.  Fix
2015-01-05 09:34:38 -08:00
Steve Baker
9c55b961d3 code formatting fixes 2015-01-05 18:21:53 +01:00
Paul O’Shannessy
26636e501d Merge pull request #2791 from rickbeerendonk/patch-1
Update ref-09-glossary.md
2015-01-05 09:05:46 -08:00
Paul O’Shannessy
7295f36b0f Merge pull request #2788 from mihaip/master
SyntheticEvent.timeStamp is a number, not a Date
2015-01-05 09:05:19 -08:00
Jim
08c5e42649 Update docs to indicate that componentDDidUpdate is fired after changes are flushed to the DOM. Fixes #2796 2015-01-02 14:02:44 -08:00
Steve Baker
3287ea52fe Wrap setInnerHTML in Windows 8 apps 2015-01-02 20:28:58 +01:00
Cheng Lou
d0f2e7db5f [Docs] Tip on integration with other libraries
Chose this title because it's more eye-catchy than "third-party integration".
2015-01-01 16:09:45 -05:00
ShihChi Huang
f214776a97 use bundle-collapser to reduce browserified file size 2014-12-30 23:16:04 -08:00
Rick Beerendonk
717b6d6249 Update ref-09-glossary.md
Minor grammatical fix.
2014-12-30 23:42:38 -05:00
Mihai Parparita
c0e33e8e76 SyntheticEvent.timeStamp is a number, not a Date
Also makes the a few other attribute types use lowercase (primitive) naming, to be consistent.
2014-12-30 12:06:49 -08:00
Paul O’Shannessy
ebf4cb4fab Merge pull request #2785 from c-das/patch-1
Update 02-displaying-data.md
2014-12-30 06:45:18 -08:00
Chitharanjan Das
b25e2e70d8 Update 02-displaying-data.md
Just a couple of minor grammatical fixes.
2014-12-30 10:49:44 +00:00
Sebastian Markbåge
82a30268a3 Merge pull request #2767 from sebmarkbage/moderntypevalidation
Add late class validation warnings for statics
2014-12-29 12:45:49 -05:00
Sebastian Markbage
82d15c8fd5 Add late class validation warnings for statics
ES6 classes won't have an early validation step. Therefore I added some
extra validation later on in the process. These would've normally have
been caught by createClass in classic React.
2014-12-29 12:43:40 -05:00
Sebastian Markbåge
9cd290a8c8 Merge pull request #2783 from dylanharrington/master
Fix typo in warning for invalid reused markup
2014-12-29 12:14:22 -05:00
Sebastian Markbåge
bd5a91a55c Merge pull request #2768 from sebmarkbage/duplicatetests
Removed some duplicate tests
2014-12-29 09:10:26 -08:00
Dylan Harrington
159ba54b8c Fix typo in warning message for invalid reused markup 2014-12-29 01:55:16 -08:00
Sebastian Markbåge
11f83c1fa0 Merge pull request #2769 from sebmarkbage/breakonwarning
Throw a caught error in the default warning module
2014-12-25 14:47:34 -08:00
Paul O’Shannessy
b98facd76e Merge pull request #2773 from vanesyan/patch-1
Update ref-01-top-level-api.md
2014-12-25 10:42:47 -08:00
Roman Vanesyan
172dec8351 Update ref-01-top-level-api.md
React isn't framework, it's library for UI!?
2014-12-24 14:39:37 +05:00
Paul O’Shannessy
6ca8bf82f5 Merge pull request #2772 from zpao/fixjsdoc
Fixup jsdoc for findDOMNode
2014-12-23 15:58:59 -08:00
Paul O’Shannessy
20c43d4ec8 Fixup jsdoc for findDOMNode 2014-12-23 15:56:05 -08:00
Paul O’Shannessy
41b919bb81 Merge pull request #2771 from zpao/temp-fix-empty-component
Temporarily fix EmptyComponents
2014-12-23 15:43:00 -08:00
Paul O’Shannessy
b2bf83ec85 Temporarily fix EmptyComponents
This a workaround for the problem described in #2770. It should be
temporary because this is really just working around the real problem.
2014-12-23 15:33:53 -08:00
Sebastian Markbage
f1bab136d0 Throw a caught error in the default warning module
This throws an error that is immediately caught. This allows you to use the
debugger's "break on caught exception" feature to break on warnings.

This should help with tracking down these warnings using the stack.

However, it could also add more noise to other debugging pattern.
2014-12-23 14:21:04 -08:00
Sebastian Markbage
8864692237 Removed some duplicate tests
These tests are duplicates of the same test in the same file. Copy/paste
fail.
2014-12-23 13:59:11 -08:00
Paul O’Shannessy
3fec78638d v0.13.0-alpha.1
Bumping version numbers so we can push to npm.
2014-12-23 12:04:23 -08:00
Paul O’Shannessy
343cda72d9 Merge pull request #2760 from alextsg/patch-3
Update 14-communicate-between-components.md for grammatical changes
2014-12-22 13:56:44 -08:00
Paul O’Shannessy
fe1edb60eb Merge pull request #2759 from alextsg/patch-2
Update 05-maximum-number-of-jsx-root-nodes.md for capitalization
2014-12-22 13:56:10 -08:00
Paul O’Shannessy
f0f431e428 Check for lineNumber support before using it 2014-12-22 13:43:59 -08:00
Jim
e0725341cf Merge pull request #2646 from jsfb/getDOMNode-becomes-findDOMNode
Added findDOMNode, as we move toward deprecating getDOMNode
2014-12-22 13:05:49 -08:00
Alexander Tseung
92c37ffb3d Update 14-communicate-between-components.md 2014-12-21 00:14:34 -08:00
Alexander Tseung
3fd6ac56c1 Update 05-maximum-number-of-jsx-root-nodes.md 2014-12-20 23:59:34 -08:00
Paul O’Shannessy
f7166d0c97 Merge pull request #2754 from songawee/fix_version_typo
Fix version typo in grunt task
2014-12-20 15:00:37 -08:00
Dennis Johnson
5216460246 Fix version typo in grunt task 2014-12-20 12:29:06 -07:00
Paul O’Shannessy
7ed36c30b1 Merge pull request #2752 from peterblazejewicz/fix/blog-typo
Fix conference year typo in blog post content
2014-12-19 14:30:06 -08:00
Peter Blazejewicz
ef4e75b031 Fix conference year typo in blog post content 2014-12-19 23:06:24 +01:00
Paul O’Shannessy
b7734a7000 Diversity Scholarship blog post 2014-12-19 13:22:23 -08:00
Sebastian Markbåge
6c6ffdb064 Merge pull request #2748 from sebmarkbage/modern
Separate createElement and JSX tests
2014-12-18 18:16:06 -08:00
Sebastian Markbage
cea2c38733 Separate createElement and JSX tests
This essentially copies all classic element creation tests to the modern
JSX tests. The classic tests doesn't use JSX and modern tests do.

The idea is that the JSX tests can start dropping dynamic checks once
we have Flow support for those features. JSX won't be necessary for
dropping dynamic checks. Plain object will also work. Flow will also not
be necessary for JSX. However, the tests should test for the suggested
combination (JSX + Flow).

This also moves some misplaced tests to ReactDOM and Validator.

Note that the modern tests uses ES6 classes. I will add separate tests for
those. However, these are not guaranteed to have .displayName so all our
error messages should check .name if available instead. This should be
better abstracted but I just adhoc fix this for now.
2014-12-18 16:13:29 -08:00
Sebastian Markbåge
60b2241ad4 Merge pull request #2745 from sebmarkbage/types
Add placeholders for static prop type tests
2014-12-18 15:13:36 -08:00
Jim
a463191bb2 Find cases where shouldUpdateReactComponent is determined by the owner. 2014-12-18 14:24:09 -08:00
Paul O’Shannessy
c63de4b79b Merge pull request #2586 from RileyTomasek/master
Fix typo in comment of jquery-bootstrap example
2014-12-18 14:15:30 -08:00
Jim
b46a6ce4bb Added findDOMNode, as we move toward deprecating getDOMNode 2014-12-18 13:55:44 -08:00
Sebastian Markbage
e31f23fc2a Add placeholders for static prop type tests
This is where tests of static prop types should go when we have the
infrastructure set up to handle it.
2014-12-18 13:52:56 -08:00
Sebastian Markbåge
435aac26af Merge pull request #2744 from sebmarkbage/types
Renamed classic/propTypes to classic/types
2014-12-18 13:42:45 -08:00
Sebastian Markbage
019028bec4 Renamed classic/propTypes to classic/types
I want to create a parallel folder for static type checking in the
"modern" folder so lets use the generic "types" name.
2014-12-18 13:40:32 -08:00
Paul O’Shannessy
d488f534ae 0.12.2 starter kit
(cherry picked from commit 6c5cb72cdc)
2014-12-18 12:47:33 -08:00
Paul O’Shannessy
378112f380 v0.12.2 blog post
(cherry picked from commit 2f6a95d5a2)
2014-12-18 12:47:32 -08:00
Paul O’Shannessy
2eb6cf6dd0 Readme + Changelog for 0.12.2
(cherry picked from commit 7468f092ae)
2014-12-18 12:47:32 -08:00
Paul O’Shannessy
3c2fc6440e update docs for 0.12.2 changes
(cherry picked from commit e6e60c4fa8)
2014-12-18 12:47:32 -08:00
Sebastian Markbåge
702eef0bf0 Merge pull request #2740 from facebook/revert-2613-monitor-cloneWithProps
Revert "Monitoring code use of cloneWithProps"
2014-12-18 12:13:34 -08:00
Sebastian Markbåge
7354a699ff Revert "Monitoring code use of cloneWithProps" 2014-12-18 12:13:09 -08:00
Riley Tomasek
84a93fbacf Improve comment in example code
This should make it more clear that even though `$` is used in 4 methods, only 2 of them are crucial for integrating the modal into the components lifecycle methods and the other 2 are just helpers.
2014-12-18 10:05:25 -05:00
minwe
309507955b add Event System doc Chinese translation 2014-12-18 13:10:02 +08:00
minwe
60ffe1e22e add Forms doc Chinese translation 2014-12-18 12:27:28 +08:00
Paul O’Shannessy
11785db573 Merge pull request #2727 from zpao/update-npm-deps
Update NPM dependencies
2014-12-17 16:56:14 -08:00
Paul O’Shannessy
c17ea85483 Merge pull request #2732 from zpao/travis-container
Use containers on TravisCI
2014-12-17 16:54:12 -08:00
Paul O’Shannessy
2620161d93 Merge pull request #2733 from morenoh149/patch-1
Added note for proper example display
2014-12-17 16:17:50 -08:00
Harry Moreno
9adb4447cd Added note for proper example display
jsfiddles weren't showing up for me. Upon further investigation I found that changing to http fixes the embedding.
2014-12-17 12:52:49 -08:00
Paul O’Shannessy
626023fc52 Merge pull request #2726 from zpao/createElement-undefined-null
Protect better against createElement(null/undefined)
2014-12-17 10:46:49 -08:00
Paul O’Shannessy
1bd8990fb2 Use containers on TravisCI
This *should* enabled the caching of node_modules for faster builds. We
may need to tweak this later to make sure node_modules gets updated

See http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
2014-12-17 10:44:07 -08:00
Paul O’Shannessy
50a0d69961 Protect better against createElement(null/undefined)
This adds a warning to React.createElement in __DEV__ about using null
or undefined. This is technically valid since element creation can be
considered safe and usable in multiple rendering environments. But
rendering in a DOM environment with an element with null/undefined type
is not safe.
2014-12-17 10:38:02 -08:00
Paul O’Shannessy
401d4dd108 Update NPM dependencies
This was mostly to update Jest, but the others were the safe ones from
`npm outdated --depth=0`
2014-12-16 14:17:10 -08:00
Paul O’Shannessy
5f4d759a2b Merge pull request #2718 from alextsg/patch-1
Update tutorial.md for grammatical changes
2014-12-16 09:48:23 -08:00
Paul O’Shannessy
558afae61a Changelog, Readme updates for v0.12.1
(cherry picked from commit a067fc0fee)
2014-12-16 09:44:00 -08:00
jeffmo
849e79fef4 Include 0.12.1 starter kit
(cherry picked from commit e9dde65341)
2014-12-16 09:44:00 -08:00
Alexander Tseung
a53270267f Update tutorial.md for grammatical changes
Update tutorial.md to improve grammatical parallelism in features list. Also added periods to follow first item's syntax.

BEFORE: "Live updates: as other users comment we'll pop them into the comment view in real time"
AFTER: "Live updates: other users' comments are popped into the comment view in real time."

BEFORE: "Markdown formatting: users can use Markdown to format their text"
AFTER: "Markdown formatting: users can use Markdown to format their text."
2014-12-15 23:43:26 -08:00
Paul O’Shannessy
f13b4641bb Merge pull request #2716 from RichardLitt/patch-2
Delete extraneous period
2014-12-15 13:16:38 -08:00
Richard Littauer
4f7b37f73a Delete extraneous period 2014-12-15 13:14:00 -08:00
Paul O’Shannessy
6abb1c9e84 Merge pull request #2710 from zpao/lint-fix-again
Fix lint
2014-12-14 22:12:43 -08:00
Aaron Franks
a5ae126630 Docs: ReactComponent -> ReactClass in a few places 2014-12-14 17:03:02 -08:00
Paul O’Shannessy
63d8e0c144 Fix lint 2014-12-14 15:22:24 -08:00
Paul O’Shannessy
0b0fa760cc Merge pull request #2647 from zpao/text-component-expect
Add toBeTextComponentWithValue to reactComponentExpect
2014-12-14 14:33:37 -08:00
Paul O’Shannessy
42ae61d065 Merge pull request #2655 from zpao/rm-deprecated
Remove deprecated methods since 0.12 shipped
2014-12-14 14:33:16 -08:00
Paul O’Shannessy
c46dadea55 Remove deprecated methods since 0.12 shipped 2014-12-14 14:19:44 -08:00
Paul O’Shannessy
c9fb5b258e Add toBeTextComponentWithValue to reactComponentExpect
This was previously possible by looking at renderedChildren and props
but this feels better.
2014-12-14 14:12:29 -08:00
Paul O’Shannessy
ca5d93ca0a Merge pull request #2708 from zpao/strip-types
Enable strip-types transform for internal code
2014-12-14 13:08:34 -08:00
Paul O’Shannessy
a818097a60 Merge pull request #2705 from Swader/patch-1
Update 02-displaying-data.md
2014-12-14 13:00:51 -08:00
Paul O’Shannessy
9016665c0e Enable strip-types transform for internal code
Flow is coming so we need to be ready.
2014-12-14 12:51:39 -08:00
Cam Song
09e0dee307 Sync up previous Chinese documents and several minor updates on formats. 2014-12-14 15:30:10 +08:00
Cam Song
db569f0c0a Add Chinese translation of interactivity-and-dynamic-uis 2014-12-14 15:30:00 +08:00
Bruno Škvorc
e507dc08d5 Update 02-displaying-data.md
Typo fix
2014-12-14 08:03:35 +01:00
Cam Song
f84ede6d34 Add Chinese translation of jsx-gotchas 2014-12-14 04:28:57 +08:00
Sebastian Markbåge
6bb77b5d4d Merge pull request #2700 from sebmarkbage/classic
Move ReactClass, ReactElement and ReactPropTypes into "classic"
2014-12-12 19:53:28 -08:00
Sebastian Markbage
801e953334 Move ReactClass, ReactElement and ReactPropTypes into "traditional"
This moves ReactClass, ReactElement and ReactPropTypes into a legacy folder
but since it's not quite legacy yet, I call it "classic".

These are "classic" because they are decoupled and can be replaced by
ES6 classes, JSX and Flow respectively.

This also extracts unit tests from ReactCompositeComponent, which was
terribly overloaded, into the new corresponding test suites.

There is one weird case for ReactContextValidator. This actually happens in
core, and technically belongs to ReactCompositeComponent. I'm not sure
we will be able to statically validate contexts so this might be a case
for dynamic checks even in the future. Leaving the unit tests in classic
until we can figure out what to do with them.
2014-12-12 17:54:35 -08:00
Paul O’Shannessy
d1ab4cda4b Merge pull request #2694 from camsong/master
Add Chinese translation of js-spread
2014-12-12 09:47:07 -08:00
Cam Song
9c7dc5f3b8 Add Chinese translation of js-spread 2014-12-12 09:33:01 +08:00
Paul O’Shannessy
80ed4d870a Merge pull request #2690 from salier/before-input
Combine BeforeInput and Composition event plugins
2014-12-11 17:08:26 -08:00
Jim
df81c9916b Merge pull request #2695 from jsfb/fix-scry2
Fixed ReactTestUtils scry for TextComponents.  Fix
2014-12-11 16:54:55 -08:00
Jim
74f5b21758 Fixed ReactTestUtils scry for TextComponents. Fixes issue #2654. 2014-12-11 13:12:35 -08:00
Paul O’Shannessy
91eb2e2f99 Merge pull request #2689 from camsong/master
Add Chinese translation of jsx-in-depth
2014-12-10 15:12:55 -08:00
Isaac Salier-Hellendag
9ad0e1d846 Update BeforeInputEventPlugin.js 2014-12-10 11:36:39 -05:00
Isaac Salier-Hellendag
ddaf215b03 Combine BeforeInput and Composition event plugins
In order to improve support for Chinese and Japanese IME input in
Internet Explorer, use a fallback composition state to determine
inserted text. IE composition events are mostly okay, except for
certain punctuation characters that are ignored. Using the fallback, we
can detect these characters.

The fallback is also useful for emitting `beforeInput` events, so it
makes sense to simply combine these plugins.

This change also incorporates a recent change to the Google Input Tools
browser extension that exposes a `data` field via the `detail` object
on the custom composition events it emits.
2014-12-10 11:32:53 -05:00
Cam Song
8621b4d338 Add Chinese translation of jsx-in-depth 2014-12-11 00:19:15 +08:00
Paul O’Shannessy
ed1803dc16 Merge pull request #2679 from tschaub/patch-1
Add missing verb in docs
2014-12-09 14:04:57 -08:00
Tim Schaub
877d00d9ba Add missing verb
This adds a missing verb in JSX-in-depth doc.
2014-12-08 15:08:57 -08:00
Paul O’Shannessy
ba95ce7b6f Merge pull request #2677 from zpao/lint-internal
Fix new lint errors
2014-12-08 12:22:06 -08:00
Paul O’Shannessy
739baa9092 Fix new lint errors
We'll get to lint parity soon and then not need to do this.
2014-12-08 12:18:41 -08:00
Aaron Franks
93ce334368 Add top-level API docs for React.createFactory. 2014-12-08 07:54:13 -08:00
Aaron Franks
09cfe453b8 Add type signature info to top-level API docs. 2014-12-07 23:17:27 -08:00
Ben Alpert
b97bb21ea2 Merge pull request #2672 from cookfront/master
The same problem in issue #2648
2014-12-06 23:50:43 -08:00
cookfront
7fad8fddf1 The same problem in issue #2648 2014-12-07 15:42:51 +08:00
Cheng Lou
cfe97641ce Merge pull request #2671 from benkeen/patch-1
Update 10.6-update.md
2014-12-06 20:12:21 -05:00
Benjamin Keen
2ee870e253 Update 10.6-update.md
Spelling fix.
2014-12-06 15:49:22 -08:00
Paul O’Shannessy
5c1589b81e Merge pull request #2658 from ianobermiller/margin-attrs
Support marginHeight and marginWidth attributes
2014-12-04 19:02:34 -08:00
Paul O’Shannessy
dd844bffc0 Merge pull request #2489 from cody/form
Add Attributes formAction, formEncType, formMethod and formTarget
2014-12-04 19:01:32 -08:00
Ian Obermiller
9d7467e225 Don't need MUST_USE_ATTRIBUTE for margin(Width|Height) 2014-12-04 11:02:35 -08:00
Ian Obermiller
96bd155cbd Support marginHeight and marginWidth attributes
marginHeight and marginWidth are used on iframes to set the default body margin inside the iframe.
2014-12-04 07:35:17 -08:00
Isaac Salier-Hellendag
0e1185cdbf Merge pull request #2653 from salier/ie-selection
Use getSelection in IE where available
2014-12-03 14:19:49 -08:00
Isaac Salier-Hellendag
6b46e80bb9 Use getSelection in IE where available
IE9+ has support for window.getSelection, but we’re still using
document.selection for IE9/10. Only use the old IE selection API if the
modern one is unavailable.
2014-12-03 14:03:26 -08:00
Paul O’Shannessy
3144485cb9 Merge pull request #2635 from zpao/docs/props-state-clarification
[docs] Clarify when state may duplicate props
2014-12-03 11:24:21 -08:00
Paul O’Shannessy
b3cd299ed7 Merge pull request #2639 from zpao/own-jsfiddle
Own our fiddles so we can update them more easily
2014-12-03 11:24:08 -08:00
Paul O’Shannessy
b1971a7e27 Merge pull request #2649 from cookfront/master
In `Transferring Props` guide, `Manual Transfer` section will lead an er...
2014-12-03 11:13:40 -08:00
Paul O’Shannessy
a66430aec3 Merge pull request #2651 from arnihermann/use-charat-not-string-index-markup-diff
Use String.charAt to lookup string characters by index
2014-12-03 10:57:30 -08:00
Árni Hermann Reynisson
fdffec73c3 Use String.charAt for character by index lookup
Using object property accessor for string character lookup breaks in
non-modern browsers.
2014-12-03 14:49:55 +00:00
张敏
218a9ae74d In Transferring Props guide, Manual Transfer section will lead an error
```c
var FancyCheckbox = React.createClass({
  render: function() {
    var fancyClass = this.props.checked ? 'FancyChecked' : 'FancyUnchecked';
    return (
      <div className={fancyClass} onClick={this.props.onClick}>
        {this.props.children}
      </div>
    );
  }
});
React.render(
  <FancyCheckbox checked={true} onClick={console.log}>
    Hello world!
  </FancyCheckbox>,
  document.body
);
```

When click `Hello world!` will lead a `Uncaught TypeError: Illegal invocation` error
2014-12-03 17:28:55 +08:00
Paul O’Shannessy
bd6b10887a Remove unused require from ReactDOM-test
This happened internally in a codemod
2014-12-02 14:39:19 -08:00
Paul O’Shannessy
1bcf6ad77b Merge pull request #2615 from af/createElement-docs
Add top-level API docs section for React.createElement.
2014-12-02 11:19:26 -08:00
Paul O’Shannessy
9021423be9 Merge pull request #2636 from zpao/docs/spread-assign-update
[docs] Remove generic spread, Object.assign  mentions
2014-12-02 11:10:33 -08:00
Paul O’Shannessy
45bddda0f9 Merge pull request #2622 from rafd/patch-1
add note re: handling events in capture phase
2014-12-02 11:10:20 -08:00
Paul O’Shannessy
a76ffd56b7 Merge pull request #2623 from jbhatab/patch-1
Screencast interfacing react + backbone
2014-12-02 10:54:05 -08:00
Blaine Hatab
e1be9c0ad8 Screencast interfacing react + backbone 2014-12-02 10:49:16 -06:00
Paul O’Shannessy
2c2cac00f9 Own our fiddles so we can update them more easily 2014-12-01 19:33:43 -08:00
Paul O’Shannessy
e347e2975f Merge pull request #2616 from christianalfoni/patch-3
Adding link to wiki
2014-12-01 16:03:16 -08:00
Paul O’Shannessy
fc91d2fd72 [docs] Remove generic spread, Object.assign mentions 2014-12-01 13:54:26 -08:00
Paul O’Shannessy
0a3a85bf52 [docs] Clarify when state may duplicate props 2014-12-01 13:46:59 -08:00
Rafal Dittwald
b3438c5f4b Update ref-05-events.md
use backticks and change example into its own sentence
2014-12-01 15:36:01 -05:00
Paul O’Shannessy
4cc2993a01 Merge pull request #2633 from koba04/fix-addons-document
Fix addons documentation of development only part
2014-12-01 12:13:30 -08:00
Jim
aef7c4d1a1 Added checks for incorrect usage of innerHTML. Fixes #1370 2014-12-01 11:10:52 -08:00
Toru Kobayashi
a9115134b5 Fix addons documentation of development only part 2014-12-01 23:17:53 +09:00
Christopher Chedeau
f5a9ea8e03 Merge pull request #2629 from arnihermann/diff-msg-on-checksum-fail
Give context aware message if markup reuse fails
2014-12-01 10:16:40 +00:00
Árni Hermann Reynisson
a352b94f57 Give context aware message if markup reuse fails
The context is an extra message with comparison of where server and
client markup started to differ.
2014-12-01 10:15:07 +00:00
Paul O’Shannessy
5daffbb2c3 Merge pull request #2630 from shamrin/patch-1
fix typo in addons.update() $splice command help
2014-11-30 10:48:24 -08:00
Alexey Shamrin
92862ed601 fix typo in addons.update() $splice command help 2014-11-30 20:20:34 +03:00
Rafal Dittwald
4bc7c46c62 add note re: handling events in capture phase 2014-11-28 15:38:15 -05:00
Christian Alfoni
f09a39d963 Adding link to wiki
Based on conversation in https://github.com/facebook/react/pull/2501. A good place to guide people further in finding the complete set of tools needed to build an application.
2014-11-27 08:48:16 +01:00
Aaron Franks
5e7e07b6d8 Add top-level API docs section for React.createElement. 2014-11-26 23:18:10 -08:00
Jim
5bd0b249b7 Merge pull request #2613 from jsfb/monitor-cloneWithProps
Monitoring code use of cloneWithProps
2014-11-26 16:37:00 -08:00
Jim
d42b285b0c Monitoring code use of cloneWithProps 2014-11-26 16:29:09 -08:00
Paul O’Shannessy
bb97482729 Merge pull request #2610 from zpao/update-commonjs-example
Update commonjs example for 0.12
2014-11-26 13:08:24 -08:00
Paul O’Shannessy
e2dcc4a863 Update commonjs example for 0.12 2014-11-26 13:08:08 -08:00
Paul O’Shannessy
45a19a290c Merge pull request #2553 from mhuggins/headers-attribute
Permit th `headers` attribute
2014-11-26 11:15:21 -08:00
Paul O’Shannessy
c48b877253 Merge pull request #2596 from sebmarkbage/rce
reactComponentExpect expects itself
2014-11-26 11:10:00 -08:00
Paul O’Shannessy
84e35615d2 Merge pull request #2600 from zpao/npm-test
Use jest for `npm test`
2014-11-26 11:09:39 -08:00
Jim
aee73cc463 Merge pull request #2602 from jsfb/context-tripple-equals
Warn if context values differ, related to issue #2
2014-11-25 16:52:09 -08:00
Jim
90d75ab099 Warn if context values differ, related to issue #2112 2014-11-25 16:44:09 -08:00
Paul O’Shannessy
b2ace55d9d Merge pull request #2603 from facebook/revert-2601-rm-fbtransform-syntax
Revert "Remove fbtransform/syntax.js"
2014-11-25 16:43:46 -08:00
Paul O’Shannessy
f7f3df3acc Revert "Remove fbtransform/syntax.js" 2014-11-25 16:42:20 -08:00
Paul O’Shannessy
ce699e4a32 Merge pull request #2601 from zpao/rm-fbtransform-syntax
Remove fbtransform/syntax.js
2014-11-25 15:42:13 -08:00
Jim
3a8fb5fc1e Merge pull request #2597 from jsfb/render-into-document
Replaced document.createElement with ReactTestUtil
2014-11-25 15:35:26 -08:00
Paul O’Shannessy
2a540b3fb7 Remove fbtransform/syntax.js
This was a file we probably never should have synced out in the first
place. We don't use it and it provides the same basic functionality that
bin/jsx provides.
2014-11-25 15:34:28 -08:00
Paul O’Shannessy
fd3f8e70e2 Merge pull request #2566 from zpao/style-fixup
Fix lint warnings, style fixups
2014-11-25 15:11:27 -08:00
Paul O’Shannessy
3ce88d7c17 Use jest for npm test
I've given in and this is easier than `npm run jest`. `grunt test` still
exists and is used by Travis so this has no CI implications.
2014-11-25 15:07:46 -08:00
Paul O’Shannessy
b7b74b7efe Fix lint warnings, style fixups
Followup work for recent PRs
2014-11-25 15:06:30 -08:00
Jim
89fafad255 Replaced document.createElement with ReactTestUtils.renderIntoDocument where container was not subsequently utilized.
Fixes #1250
2014-11-25 12:06:22 -08:00
Steven Luscher
e18d87b53b Merge pull request #2594 from steveluscher/community-round-up-24
Wrote Community Roundup #24
2014-11-25 10:24:47 -08:00
Sebastian Markbage
a530f1c379 reactComponentExpect expects itself
This was a bug when reactComponentExpectInternal was separated from
the normal reactComponentExpect flow.
2014-11-24 18:48:41 -08:00
Steven Luscher
0f488bfe71 Community #24: New Carousel link, spelled react-prism correctly, and removed the whale-speak. 2014-11-24 18:24:52 -08:00
Steven Luscher
c94a48be4f Wrote Community Roundup #24 2014-11-24 18:12:59 -08:00
Sebastian Markbåge
47e18c3ce6 Merge pull request #2593 from sebmarkbage/mountImage
Add additional field for ART reconciler
2014-11-24 17:08:13 -08:00
Sebastian Markbage
61349eb5a6 Add additional field for ART reconciler
ART, just like MultiChild adds an expando property to manage it's diffing
state. This is ugly and bad. We should be moving this state outside the
component for use by the diffing algorithm. This state is not needed by
components nested in composites, and varies by diffing algorithm.

It sucks that I have to add it to every component just to support ART,
but that's the quickest solution, other than disabling preventExtensions.

At least now we know that it sucks.
2014-11-24 17:02:11 -08:00
Jim
e7f4badf4a Merge pull request #2579 from jsfb/context-to-warning-module
Use warning module for context warning instead of invoking console.warn ...
2014-11-24 14:42:23 -08:00
Jim
9f7901fe1d Use warning module for context warning instead of invoking console.warn and monitorCodeUse directly. Depends on https://phabricator.fb.com/D1695279 2014-11-24 13:24:56 -08:00
Christopher Chedeau
f8aee772ce Mention that talks will be recorded 2014-11-24 11:28:42 +00:00
Christopher Chedeau
c32cf03d0b better wording thanks to @jwalke 2014-11-24 10:33:23 +00:00
Christopher Chedeau
fb2be69e9c react.js conf updates 2014-11-24 09:26:00 +00:00
Ben Alpert
582bc932e5 Merge pull request #2583 from spicyj/style-example
Add example for how to use `style` properly
2014-11-21 14:27:32 -08:00
Ben Alpert
1c5443175c Add example for how to use style properly
Test Plan: jest
2014-11-21 12:10:59 -08:00
Ben Alpert
c6ed9df7f3 Merge pull request #2582 from spicyj/rendercomponent
Finish renaming renderComponent -> render
2014-11-21 11:54:36 -08:00
Ben Alpert
23effb7034 Merge pull request #2581 from spicyj/rm-elt-docs
Update variable name and doc type to be accurate
2014-11-21 11:54:26 -08:00
Riley Tomasek
08b6b28902 Fix typo in comment of jquery-bootstrap example 2014-11-21 12:05:39 -05:00
Ben Alpert
d4e32a7b2c Finish renaming renderComponent -> render
Test Plan: jest
2014-11-20 23:07:58 -08:00
Ben Alpert
c4b9b938cf Update variable name and doc type to be accurate
Test Plan: Crossed fingers.
2014-11-20 23:03:03 -08:00
Sebastian Markbåge
68ba3b6d18 Merge pull request #2567 from sebmarkbage/childrenreconciler
Separate Child Reconciliation Step from Diffing
2014-11-20 11:48:54 -08:00
Sebastian Markbage
26ea341870 Separate Child Reconciliation Step from Diffing
This separates the reconciliation step of children into a separate module.
This is the first step towards prerendering.

The stateful instances are reconciled and put into a "rendered children"
set. Updates creates a new of these sets. These two sets are then diffed
to create insert/move/remove operations on the set.

The next step is to move the ReactChildReconciler step to before the
native DOM component. That way it's possible to rely on child
reconciliation without relying on diffing.
2014-11-20 11:45:02 -08:00
Jim
6ec952977e Merge pull request #2565 from jsfb/fixwhitespace
Removed context paremeter to renderToString/renderToStaticMarkup.
2014-11-19 15:49:33 -08:00
Jim
7768d91363 Removed context paremeter to renderToString/renderToStaticMarkup. 2014-11-19 15:16:23 -08:00
Timothy Yung
006bc28633 Merge pull request #2571 from yungsters/cleanup
Replace `mountDepth` with `isTopLevel`
2014-11-19 13:43:50 -08:00
yungsters
fc7cf2ff63 Replace mountDepth with isTopLevel
Summary:
After #2570, `mountDepth` is only used to enforce that `setProps` and `replaceProps` is only invoked on the top-level component. This replaces `mountDepth` with a simpler `isTopLevel` boolean set by `ReactMount` which reduces the surface area of the internal API and removes the need to thread `mountDepth` throughout React core.

Reviewers: @sebmarkbage @zpao

Test Plan:
Ran unit tests successfully:

```
npm run jest
```
2014-11-19 13:13:08 -08:00
Timothy Yung
70b1426ef0 Merge pull request #2570 from yungsters/updates
Update Dirty Components in Mount Ordering
2014-11-19 13:12:43 -08:00
yungsters
c7fd626b1f Summary:
Currently, `ReactUpdates` updates dirty components in increasing order of mount depth. However, mount depth is only relative to the component passed into `React.render`. This breaks down for components that invoke `React.render` as an implementation detail because the child components will be updated before the parent component.

This fixes the problem by using the order in which components are mounted (instead of their depth). The mount order transcends component trees (rooted at `React.render` calls).

Reviewers: @sebmarkbage @zpao

Test Plan:
Ran unit tests successfully:

```
npm run jest
```
2014-11-19 12:51:55 -08:00
Paul O’Shannessy
3a0f30480d Merge pull request #2544 from mjul/patch-1
Update 10.4-test-utils.md
2014-11-19 07:16:07 -08:00
Paul O’Shannessy
a07ab60ec0 Merge pull request #2554 from samccone/patch-1
Update tutorial language to be more explicit.
2014-11-19 06:15:35 -08:00
Cheng Lou
93bbb3ea5b Merge pull request #2555 from mfunkie/patch-1
Animation documentation for ReactTransitionGroup
2014-11-18 22:33:48 -05:00
Sebastian Markbåge
b0f6f5449c Merge pull request #2552 from sebmarkbage/cleanupinternals
Remove some unnecessary code in ReactComponents
2014-11-18 13:51:39 -08:00
Sebastian Markbage
13ed0317fa Remove some invariants and deadcode
These are not necessary if we enable type checks. Static or dynamic.

They're distracting my greppability.

Also, some dead code in shallow rendering.
2014-11-18 13:04:56 -08:00
Timothy Yung
df87ea1fa6 Merge pull request #2465 from yungsters/perf
Preserve Implicit Method Names
2014-11-18 12:51:08 -08:00
yungsters
bda199de04 Preserve Implicit Method Names
Summary:
Changes the way we instrument methods for `ReactPerf` so that developer tools can assign implicit method names to measured functions.

Reviewers: @zpao @sebmarkbage
2014-11-18 12:48:58 -08:00
Mark Funk
5b2ffde48d Animation documentation for ReactTransitionGroup
Update to the animation documentation for ReactTransitionGroup to clear the air on where one can use it.

If someone tries to use it off of React.addons.ReactTransitionGroup, which is undefined, instead of its real location, React.addons.TransitionGroup, they get a vague error about being unable to set defaultProps of undefined in the React createElement body.
2014-11-18 13:49:23 -05:00
Timothy Yung
ef35585468 Merge pull request #2464 from yungsters/immutable
Stop Mutating Merged Lifecycle Results
2014-11-18 10:02:07 -08:00
yungsters
8e15046283 Stop Mutating Merged Lifecycle Results
Summary:
Currently, `ReactClass` mutates values returned by `getDefaultProps`, `getInitialState`, and `getChildContext`. This is bad because the objects may, for example, be cached and re-used across instances of a React component.

This changes `ReactClass` to instead create a new object. In return for allocating a new object, I've replaced `mapObject` with a `for ... in` so that we are no longer allocating an unused object.

Fair trade, IMO.

Test Plan:
Ran unit tests successfully:

```
npm run jest
```

Conflicts:
	src/core/ReactCompositeComponent.js

Conflicts:
	src/class/ReactClass.js
2014-11-18 10:00:22 -08:00
Sam Saccone
8e47082fb6 Update tutorial language to be more explicit.
The word "Friends" does establish a relationship however it does not fit in the vernacular of react. 
This change makes the phrase more explicit and more familiar.
2014-11-18 12:36:20 -05:00
Matt Huggins
9a472ca8f1 Permit th attribute 2014-11-18 07:52:25 -07:00
Sebastian Markbåge
e3e0bf5de2 Merge pull request #2550 from sebmarkbage/cleanupinternals
Move ComponentEnvironment out of ReactComponent
2014-11-17 17:41:32 -08:00
Jim
ef3b348bef Merge pull request #2508 from jsfb/monitor-with-context
Start monitoring uses of withContext, related to issue #2112
2014-11-17 17:23:39 -08:00
Sebastian Markbage
5951a131db Move ComponentEnvironment out of ReactComponent
We currently have three DOM specific hooks that get injected. I move those
out to ReactComponentEnvironment. The idea is to eventually remove this
injection as the reconciler gets refactored.

There is also a BackendIDOperation which is specific to the DOM component
itself so I move this injection to be more specific to the DOMComponent.

E.g. it makes sense for it to be injectable for cross-worker DOM operations
but it doesn't make sense for ART components.
2014-11-17 17:21:41 -08:00
Jim
46bff98a3f Fixed 'imports' to resolve merge conflict 2014-11-17 17:14:00 -08:00
Jim
89aaf73ae8 Merge pull request #2509 from jsfb/use-parent-context
Initial implementation of issue #2112
2014-11-17 17:08:18 -08:00
Jim
081feeb2dd Added warning if owner-based and parent-based contexts differ. 2014-11-17 17:02:20 -08:00
Sebastian Markbåge
fba8be3b98 Merge pull request #2546 from sebmarkbage/cleanupinternals
Move more stuff out of ReactComponent
2014-11-17 14:47:34 -08:00
Sebastian Markbage
6dddd60e33 Unused variables 2014-11-17 13:31:19 -08:00
Sebastian Markbage
fb17e8ca56 Ensure that all internal instances have consistent properties
Use preventExtensions so that we can't add expando properties to internal
instances. This ensures that the hidden class is kept more consistent.
2014-11-17 12:54:21 -08:00
Sebastian Markbage
bc4dd411b0 Move _pendingX into ReactCompositeComponent
Since setProps can no longer be called on anything but composites, we can
move this complexity into ReactCompositeComponent.
2014-11-17 12:54:21 -08:00
Sebastian Markbage
974a4c84ce Move mountComponentIntoNode and setProps out of ReactComponent
This is part of moving more logic out of the base classes.

setProps, replaceProps etc. are not accessible from anything other than
ReactClass so we can safely move it to ReactCompositeComponent.

mountComponentIntoNode is tightly coupled to ReactMount. It's part of the
outer abstraction, the mount point, not the individual component.
2014-11-17 12:54:21 -08:00
Scott Feeney
d75512f211 Merge pull request #2497 from graue/2393-v1
Basic shallow rendering support (#2393)
2014-11-17 11:07:05 -08:00
Scott Feeney
bfadafe5d0 Shallow rendering support (#2393)
Now handles updating. Haven't looked at refs yet.
2014-11-17 10:47:18 -08:00
Martin Jul
50db9feb28 Update 10.4-test-utils.md
This adds minimal valid event data to the Simulate.change example for a text input field.
2014-11-17 13:14:11 +01:00
Sebastian Markbåge
e4218cb7dc Merge pull request #2539 from sebmarkbage/cleanupinternals
Clean up a bunch of internal methods and fields that are now unnecessary
2014-11-16 21:13:07 -08:00
Sebastian Markbage
63644d5e71 Add test for warning in ReactElementValidator
I previously had a mistake here, so I'm adding a unit test to ensure that I
don't make the same mistake again.
2014-11-16 21:07:31 -08:00
Sebastian Markbage
dac59d1032 Drop the _owner and _lifeCycle field on internal instances
The _owner field is unnecessary since it's reachable from _currentElement.

The _lifeCycle field is unnecessary because an internal component should
not even need to exist at all if it's unmounted. It should be dereferenced
internally, and never exposed externally.

The only case where it's important is for batching updates where we
currently avoid calling performUpdateIfNecessary if it's mounted. However,
this function is already only executed "if necessary" so we just make sure
that it's not necessary after unmount by resetting all the pending fields.
2014-11-16 21:05:12 -08:00
Sebastian Markbage
03ae0a906b Drop ReactOwner.Mixin
This is not used anywhere else. To avoid overabstraction we should just
inline this.
2014-11-16 21:04:07 -08:00
Sebastian Markbage
519ee322ca Drop this.props 2014-11-16 21:04:04 -08:00
Sebastian Markbage
8181272fe8 Drop inaccessible methods
These are no longer accessible and the isOwnedBy check is only used in
a method that is not accessible.
2014-11-16 21:02:40 -08:00
Ben Alpert
a194e51af0 Move logic for null to instantiateReactComponent
This cleans up the code a bit and also brings us closer to allowing any ReactNode to be rendered at the top level.

Test Plan: jest
2014-11-16 17:41:54 -08:00
Ben Alpert
c96ea9abf2 Remove transferPropsTo
I'd like to outlaw prop mutation altogether, and now seems like a fine time to remove transferPropsTo.

Test Plan: jest
2014-11-16 17:41:07 -08:00
Ben Alpert
f391b7b3ca Don't mutate .props.style in ReactDOMComponent
We currently make a copy of .style because we support mutating the style object in place. Instead of storing it back on props, store it separately on the component instance so that we don't mutate props anywhere. This is gross but should all be cleaned up after #2008 is resolved.

Test Plan: jest
2014-11-16 17:39:00 -08:00
Ben Alpert
505bc7595b Fix up variable names and types to be correct
Test Plan: jest
2014-11-16 17:37:40 -08:00
Sebastian Markbåge
3aa56039c6 Merge pull request #2537 from sebmarkbage/hidedomcomponentinternals
Wrap every DOM node in a Composite Component
2014-11-16 15:35:04 -08:00
Ben Alpert
e619d25d03 Inject browser mixin before full-page components
createFullPageComponent doesn't reference ReactBrowserComponentMixin directly so the mixin should get injected before the components are created. Previously, this test failed because getDOMNode wasn't present on the component instance.

Test Plan: jest
2014-11-16 12:59:44 -08:00
Sebastian Markbage
9c3e2d833d Wrap every DOM node in a Composite Component
...unless they already have a wrapper. Also, add tagName to every wrapper.

This ensures that refs are consistent. They always look like composite
components. This effectively hides the internal implementation details of
real DOM components since you can no longer get a ref to one.

In the future we might want to drop this wrapper and have refs refer
directly to the DOM node.

I currently use a hacky way of auto-wrapping inside of ReactNativeComponent
so that any given string can be wrapped. Better suggestions are welcome.
2014-11-16 10:32:46 -08:00
Christopher Chedeau
e8e79472aa Merge pull request #2527 from gabelevi/master
Update stripTypes transform to use fixed up jstransform transform
2014-11-15 16:57:25 -08:00
Ben Alpert
795290d1b0 Fix problems with empty component ID registration
Fixes #2493, also closes #2353 as it incorporates a variant of that fix.

- Instead of having getEmptyComponent return `<noscript />` directly, wrap it in a class that we can easily identify later as being an empty component
- Cache the empty component element instead of recreating one each time
- Avoid touching the nullComponentIdsRegistry dictionary at all when not dealing with empty components
- Move empty-component tests to a separate file

Test Plan: jest
2014-11-15 12:35:11 -08:00
Ben Alpert
230115da92 Make ReactTextComponent properly injectable
ReactTextComponent's implementation is DOM-specific; instead of flattenChildren creating the ReactTextComponent instances, ReactNativeComponent now takes care of having ReactTextComponent injected and creating the component instance. I also renamed ReactTextComponent to ReactDOMTextComponent and moved it to browser/ui/ where it belongs. ReactDOMTextComponent no longer inherits directly from ReactComponent and instead implements construct and {mount,receive,unmount}Component directly.

This diff removes `ReactTestUtils.isTextComponent` which should have previously never returned true when using public APIs.

Test Plan: jest, use ballmer-peak example.
2014-11-15 12:30:42 -08:00
Sebastian Markbåge
9b1c3226d0 Merge pull request #2385 from shripadk/bool-fix
Fix: Always return boolean from isNullComponentID
2014-11-15 11:43:27 -08:00
Gabe Levi
0d308add09 Update stripTypes transform to use fixed up jstransform transform 2014-11-14 18:25:11 -08:00
Ben Alpert
903db8bd14 Stop treating key={null} as an unspecified key
This reverts commit dd92786fb0, which was intended to be temporary for the 0.12 release.

Fixes #2394.
2014-11-14 16:52:43 -08:00
Ben Alpert
22da7b6fa5 Warn when casing CSS vendor prefixes incorrectly
Fixes #2487.

Test Plan: jest
2014-11-14 16:51:55 -08:00
Cheng Lou
0db323e42a Merge pull request #2514 from jvalente/patch-1
Update ref-09-glossary.md
2014-11-13 13:45:35 -05:00
Lee Byron
81d4d7bf24 Merge pull request #2512 from leebyron/transition-appear
Adding "appear" phase to ReactTransitionGroup and ReactCSSTransitionGroup
2014-11-13 13:44:56 -05:00
João Valente
485d84fb9b Update ref-09-glossary.md 2014-11-13 12:06:51 +00:00
Lee Byron
8760a70e73 Adding "appear" phase to ReactTransitionGroup and ReactCSSTransitionGroup.
"appear" differs from "enter" in that all children of a transition group at mount time will "appear" but will not "enter". All children later added to an existing transition group will "enter" but not "appear".

This extra transition phase allows for animation-on-mount effects.

A mirroring "appear" prop has been added to ReactCSSTransitionGroup, however for reverse-compatibility (and because "appear" is less common) it defaults to false.

Thanks to @afa for his work investigating the possible ways to implement this.
2014-11-12 21:30:56 -05:00
Fabio M. Costa
f6dd6ef772 Removing unecessary resize listener
monitorScrollValue is only called with `ViewportMetrics.refreshScrollValues` (https://github.com/facebook/react/blob/master/src/browser/ReactBrowserEventEmitter.js#L333-L334) and the window scroll properties (scrollTop and scrollLeft) don't change on resize (from my testings), so there is no need to listen for window resizes.
I also tried to see why the resize listener was added from the history but it was introduced on the initial commits.
I created a simple page that shows that http://jsbin.com/nuhice, open the console.
2014-11-12 00:08:30 -08:00
Paul O’Shannessy
06bf89db8e Merge pull request #2498 from ikr/patch-1
There's no isComponentOfType() anymore
2014-11-11 13:25:33 -08:00
Ivan Krechetov
13311639cc There's no isComponentOfType() anymore 2014-11-11 09:25:33 +01:00
Stefan Dombrowski
1bb29cab7c Add Attributes formAction, formEncType, formMethod and formTarget
This resolves #2425.
2014-11-11 06:37:26 +01:00
Ben Alpert
7a162ce731 Merge pull request #2482 from BinaryMuse/bkt/fix-stroke-opacity
Add strokeOpacity to unitless CSS properties
2014-11-07 22:26:03 -08:00
Brandon Tilley
96126e9ff4 Add strokeOpacity to unitless CSS properties 2014-11-07 21:20:01 -08:00
Paul O’Shannessy
78ec2501cf Merge pull request #2481 from mjul/fix-typos
Fix some minor typos in doc comments / code comments.
2014-11-07 16:58:49 -08:00
Paul O’Shannessy
b243f1eec6 Merge pull request #2480 from spicyj/text-stability
Test that text spans aren't remounted needlessly
2014-11-07 16:56:58 -08:00
Paul O’Shannessy
14d0a22ae8 Merge pull request #2479 from spicyj/nitfix
Fix odd formatting in ReactDOMComponent-test
2014-11-07 16:55:06 -08:00
Martin Jul
042c6c794c Fix some minor typos in doc comments / code comments. 2014-11-07 18:07:07 +01:00
Ben Alpert
ba418c6014 Test that text spans aren't remounted needlessly
While working on #2382, I accidentally broke this behavior (causing text components to get unmounted and remounted for any update) but we didn't have any unit test for it. Now we do.

Test Plan: jest TextComponent
2014-11-06 23:19:48 -08:00
Ben Alpert
a1dcdf1a64 Fix odd formatting in ReactDOMComponent-test
Test Plan: Crossed fingers.
2014-11-06 23:10:17 -08:00
Sebastian Markbåge
c10a39e82b Merge pull request #2445 from sebmarkbage/classes
Separate React Composite and Class
2014-11-06 19:53:10 -08:00
Sebastian Markbage
27c482a2b8 Separate React Composite and Class
ReactClass is now composed by ReactCompositeComponent rather than
inherit from it.

The state transition functions currently use ReactInstanceMap to map an
instance back to an internal representation.

I updated some tests to use public APIs. Other unit tests still reach into
internals but now we can find them using ReactInstanceMap.

I will do more cleanup in follow ups. The purpose of this diff is to
preserve semantics and most of the existing code.

This effectively enables support for ES6 classes. All you would need to
expose is ReactClassMixin.
2014-11-06 19:49:33 -08:00
Ben Alpert
bd02e17fec Merge pull request #2476 from jsfb/patch-1
Using semicolon instead of "and" conjunction
2014-11-06 15:15:39 -08:00
Jim
dbe16a357b Using semicolon instead of "and" conjunction
The use of the conjunction "and" leads to an improper assertion about what should/shouldn't be done.  Using a semicolon resolves this by indicating the contrasting alternative.
2014-11-06 14:50:35 -08:00
Paul O’Shannessy
cbada1e55a Merge pull request #2473 from zertosh/docs-ssr-at-sc
Add React at SoundCloud talk
2014-11-06 14:05:10 -08:00
Paul O’Shannessy
df24852ca1 Merge pull request #2475 from jsfb/master
Use adjective "too" instead of "to"
2014-11-06 14:04:33 -08:00
jsfb
7f37074c33 Use adjective "too" instead of "to"
The author clearly intended to use the adjective "too" to mean "excessively" instead of the preposition "to".
2014-11-06 13:42:19 -08:00
Paul O’Shannessy
d12ae9d5bb Merge pull request #2241 from syranide/selectvalue
ReactDOMSelect makeover, fix edge-case inconsistencies and remove state
2014-11-06 12:40:15 -08:00
Andres Suarez
d5810e46f9 Add SSR at SoundCloud talk 2014-11-06 10:54:05 -05:00
Ben Alpert
9edc6260a7 Initial implementation of new-style refs
cf. #1373

This implementation can be used in any situation that refs can currently be used (and can also be used without an owner, which is a plus).
2014-11-05 19:28:12 -08:00
Pedro Nauck
1adbc22fde bugfix: remove conflict comment 2014-11-06 01:23:51 -02:00
Paul O’Shannessy
dca7ffbe21 Merge pull request #2446 from enaqx/master
Add 'use strict' to statisfy linter rules
2014-11-05 16:25:38 -08:00
Paul O’Shannessy
3e60195bd4 Merge pull request #2408 from Peeja/patch-1
TodoMVC live demos have moved.
2014-11-05 13:49:23 -08:00
Paul O’Shannessy
462f8ea9f6 Merge pull request #2452 from Shahor/master
Trailing commas break old IE versions
2014-11-05 11:00:12 -08:00
Paul O’Shannessy
a3509e5b42 Fixing some newline-preserving issues
Done internally as part of
f9836a3912
2014-11-05 10:36:22 -08:00
Pedro Nauck
a7f157ebb1 update namespaced component to adapt with the v0.12 2014-11-05 12:32:16 -02:00
Pedro Nauck
b5bcaba77f Merge branch 'master' into docs-namespace-in-jsx
* master: (113 commits)
  Remove esprima-fb and use Syntax from jstransform
  Update React.renderToString argument type in docs
  [traverseAllChildren] fix out-of-scope var use.
  Use double quote for transformed `displayName` and `data-*`
  Remove unrelated comment
  Fix typo in If/Else JSX doc.
  Cleanup a couple unused variables
  Use dump cache and remove factory from ReactElement-test
  Update deprecated propTypes
  Bring in jsfiddle integration script, add harmony
  Extending period in which click events are ignored
  React.renderComponent --> React.render
  Followup fix for React.PropTypes.node
  Add comma for readability in tutorial
  Drop internal uses of .type on the class
  Drop Legacy Factories Around Classes
  Drop ReactDOM from internal DOM extensions
  Added comma to increase readability.
  Add 0.12 starter kit
  Change the date and the link url to match the proper roundup
  ...

Conflicts:
	docs/docs/02.1-jsx-in-depth.md
2014-11-05 12:30:37 -02:00
Paul O’Shannessy
1fd187b994 Merge pull request #2224 from zertosh/remove-esprima-fb-dep
Remove esprima-fb and use Syntax from jstransform
2014-11-04 14:38:09 -08:00
Paul O’Shannessy
4ba53e1839 Merge pull request #1708 from chenglou/displayName
Use double quote for transformed `displayName`
2014-11-04 14:36:19 -08:00
Andres Suarez
bf0a857a92 Remove esprima-fb and use Syntax from jstransform 2014-11-04 17:10:12 -05:00
Paul O’Shannessy
984055c2f5 Merge pull request #2463 from fson/render-to-string-docs
Update React.renderToString argument type in docs
2014-11-04 09:37:12 -08:00
Ville Immonen
9c3357eef5 Update React.renderToString argument type in docs
renderToString and renderToStaticMarkup now take a ReactElement.
Update the documentation to reflect this recent change.
2014-11-04 17:02:00 +02:00
Lee Byron
d4ac1229a6 Merge pull request #2458 from leebyron/fix-iterable
[traverseAllChildren] fix out-of-scope var use.
2014-11-03 21:25:01 -05:00
Lee Byron
a3608d27ab [traverseAllChildren] fix out-of-scope var use.
Dear ES6 gods, bring us `let` soon.

This fixes an issue where non-keyed iterables are used as children and the value of `i` would be undefined because its used out of scope. This adds a separately scoped iteration index value and appropriately increments it as iteration continues. Doi.

While I'm in there, make the usage of falsey `nameSoFar` more obvious and more consistent with the existing usage on L115

Test plan: first wrote a test covering this previously untested path. Saw an identical issue as was experienced in development environment. Then ensured test passed after this diff.
2014-11-03 21:19:28 -05:00
Andreas Svensson
2601b6a0b0 ReactDOMSelect makeover, fix edge-case inconsistencies and remove state 2014-11-03 23:19:01 +01:00
Alexandre Gaudencio
6379342b71 Trailing commas break old IE versions 2014-11-03 02:54:23 +01:00
Nick Raienko
bea9fbbf62 Add 'use strict' to statisfy linter rules 2014-11-01 07:05:46 +02:00
Cheng Lou
eddbb0cfef Use double quote for transformed displayName and data-*
JSX currently transforms everything to double quote except these two. This way, it's at least consistent and will satisfy half of the people who do put a strict quotation linting on their project.

Test: `jest`, check the double quoted transformed `data-bla="something"`.
2014-10-31 15:49:24 -04:00
Sebastian Markbåge
cb50a8698b Remove unrelated comment
This is no longer unwrapping a legacy factory (which are gone).
2014-10-31 12:39:38 -07:00
Paul O’Shannessy
1666661a06 Merge pull request #2433 from zpao/fiddle-integration
Bring in jsfiddle integration script, add harmony
2014-10-31 11:22:57 -07:00
Paul O’Shannessy
1abe716358 Merge pull request #2443 from kruppel/kurt/minor-tip-typo
Fix typo in If/Else JSX doc.
2014-10-31 10:11:32 -07:00
Kurt Ruppel
4b3b32e418 Fix typo in If/Else JSX doc. 2014-10-31 09:52:44 -07:00
Sebastian Markbåge
881c9b5be8 Merge pull request #2435 from sebmarkbage/fixretest
Use dump cache and remove factory from ReactElement-test
2014-10-30 12:06:21 -07:00
Paul O’Shannessy
d8ed3e5cf9 Merge pull request #2437 from zpao/lint-cleanup
Cleanup a couple unused variables
2014-10-30 12:05:38 -07:00
Paul O’Shannessy
295c1e3652 Cleanup a couple unused variables 2014-10-30 11:38:53 -07:00
Paul O’Shannessy
bf99ab1c89 Merge pull request #2434 from Shraymonks/propTypes-docs
Update deprecated propTypes
2014-10-30 09:43:02 -07:00
Sebastian Markbage
7f7b7f386a Use dump cache and remove factory from ReactElement-test
We need to use dump cache because we don't enable it by default internally.

While I'm at it, I might as well kill the ComponentFactory variable which
is now just an alias.
2014-10-30 02:50:28 -07:00
Raymond Ha
92d171a4fc Update deprecated propTypes 2014-10-29 21:00:32 -07:00
Paul O’Shannessy
0f5368341f Bring in jsfiddle integration script, add harmony 2014-10-29 19:35:27 -07:00
Paul O’Shannessy
7071d1c316 Merge pull request #2419 from johnheroy/patch-1
Add comma for readability in tutorial.md
2014-10-29 18:03:48 -07:00
Paul O’Shannessy
eb7f806566 Merge pull request #2431 from wassil/master
Extending period in which click events are ignored
2014-10-29 18:02:44 -07:00
Juraj Dudak
c563e19739 Extending period in which click events are ignored 2014-10-29 14:06:37 -07:00
Paul O’Shannessy
b2b8e5c08a Merge pull request #2428 from cody/fixes
React.renderComponent --> React.render
2014-10-29 11:44:35 -07:00
Stefan Dombrowski
93ac4d09a1 React.renderComponent --> React.render
Also fixed a spelling mistake.
2014-10-29 19:05:16 +01:00
Paul O’Shannessy
ce1b394529 Followup fix for React.PropTypes.node
This should have gone in as a part of #2343
2014-10-28 22:49:25 -07:00
Sebastian Markbåge
a54ed49eb0 Merge pull request #2375 from sebmarkbage/droplegacyfactories
Drop Legacy Factories
2014-10-28 18:00:32 -07:00
John Heroy
129d66a62e Add comma for readability in tutorial 2014-10-28 15:22:40 -07:00
Sebastian Markbage
9b36b04d75 Drop internal uses of .type on the class 2014-10-28 15:08:52 -07:00
Sebastian Markbage
199a7d6903 Drop Legacy Factories Around Classes
Classes are now pure classes without a legacy factory around them.

Since classes will become just any function that returns a valid instance,
let's drop isValidClass.

There's some hacks in here for auto-mocking frameworks (jest) that mock the
prototype of these classes. These hacks allow these classes to be mounted.
2014-10-28 15:08:52 -07:00
Sebastian Markbage
531c2bc4c9 Drop ReactDOM from internal DOM extensions
These used to be exposed as strings on the legacy factories but are now
gone.
2014-10-28 15:08:52 -07:00
Paul O’Shannessy
581085ea1b Merge pull request #2416 from zachasme/update-jstransform
Update jstransform version to 7.0
2014-10-28 15:01:57 -07:00
Paul O’Shannessy
22ffb57a93 Merge pull request #2415 from zpao/sync-internal
Sync internal
2014-10-28 14:30:06 -07:00
Cheng Lou
86336997cd Merge pull request #2418 from spencer48/patch-1
(docs) Added commas to increase readability.
2014-10-28 17:26:18 -04:00
Spencer Handley
a55a3f77a1 Added comma to increase readability.
When thumbing through the docs, I noticed a few missing commas. I inserted two commas and did not alter any source code.
2014-10-28 13:56:14 -07:00
Paul O’Shannessy
17b190bee2 Add 0.12 starter kit 2014-10-28 11:48:53 -07:00
Christopher Chedeau
26c8a70c1d Change the date and the link url to match the proper roundup 2014-10-28 11:36:12 -07:00
Paul O’Shannessy
9e895bc360 Correct changes from 0.12-stable merge 2014-10-28 11:20:33 -07:00
Paul O’Shannessy
8b041eaa5a Merge branch '0.12-stable' 2014-10-28 11:18:02 -07:00
Paul O’Shannessy
f2947a0ca1 Merge pull request #2399 from zpao/0.12-docs
Docs updates for 0.12
2014-10-28 11:17:25 -07:00
Paul O’Shannessy
fa2597a3b3 0.12 blog post 2014-10-28 11:16:29 -07:00
Paul O’Shannessy
8ef1f96850 0.12 CHANGELOG 2014-10-28 11:16:28 -07:00
Paul O’Shannessy
3eb8222c22 Update cdnjs link, include jsdelivr in readme 2014-10-28 11:06:32 -07:00
Paul O’Shannessy
fcd4be3933 Update version references in the readme 2014-10-28 11:06:32 -07:00
Paul O’Shannessy
0b8454724e Update Authors & Acknowledgements for 0.12 2014-10-28 11:06:32 -07:00
Christopher Chedeau
081115609c React.js Conf blog post
Closes #2412
2014-10-28 11:06:31 -07:00
Cheng Lou
539db8e9c8 Merge pull request #2414 from benleiken/patch-1
Moved key requirement note into 'getting started'
2014-10-28 11:06:31 -07:00
Paul O’Shannessy
4d47ff36b2 Merge pull request #2413 from LeonFedotov/patch-1
Changing api documentation for jsx transformer
2014-10-28 11:06:31 -07:00
Sebastian Markbage
98bf80254f Update Docs Navigation 2014-10-28 11:06:31 -07:00
Sebastian Markbage
1cb3f25e78 More Descriptor -> Element renames 2014-10-28 11:06:31 -07:00
Sebastian Markbage
b7a548c4bf Replace transferPropsTo with transferring props patterns 2014-10-28 11:06:30 -07:00
Sebastian Markbage
9b1ee4de46 Updated Docs for new JSX Changes
Moved non-JSX explanation to Displaying Data.
Overhauled JSX in Depth.
Added JSX Spread Section.
2014-10-28 11:06:30 -07:00
Paul O’Shannessy
0dd942b121 Update Animation docs for createElement 2014-10-28 11:06:30 -07:00
Paul O’Shannessy
eb2827ec6a Update React.DOM -> React.createElement through docs 2014-10-28 11:06:30 -07:00
Paul O’Shannessy
0344aaf18d Use --harmomy in docs examples for cleaner code 2014-10-28 11:06:30 -07:00
Zacharias
c260c45db3 Update jstransform version to ^7.0.0 2014-10-28 13:48:48 +01:00
Tienchai Wirojsaksaree
ff12423d63 Fixing touch/mouse issues with TapEventPlugin
On ios device, browser simulates mouse events, but does that with
a delay, because of double tap gesture. The problem is that
TapEventPlugins listens to both types of events, so it fires twice

Everytime there is a touch event, we should ignore mouse events that
follow it.  This way, we still respond to both mouse and touch events,
just ignore the device generated ones.
2014-10-27 17:02:03 -07:00
Paul O’Shannessy
1c241b3ebc Ensure PropTypes test works when warning module is replaced
For example, warning might be replaced with a module that throws errors,
as is the case internally when running tests. Previously we were
whitelisting this test to provide time to update callsites. Now we
aren't and it fails.
2014-10-27 16:58:54 -07:00
Paul O’Shannessy
85930e63db Merge pull request #2413 from LeonFedotov/patch-1
Changing api documentation for jsx transformer
2014-10-27 16:32:07 -07:00
Cheng Lou
18066a301e Merge pull request #2414 from benleiken/patch-1
Moved key requirement note into 'getting started'
2014-10-27 18:47:24 -04:00
Benjamin Leiken
bb0c7b4ca9 Moved key requirement note into 'getting started'
It's an important note and it was buried too far down the page. Now it's more prominent and harder for people to miss (like I did).
2014-10-27 10:22:57 -07:00
Leon Fedotov
a29d496443 Changing api documentation for jsx transformer
Hi in chrome debugger, the files that use sourcemaps from the transformer get "null" as the filename during debug, https://github.com/facebook/react/blob/master/main.js#L15 "sourceFilename" is used instead of "filename" to specify the filename in the sourcemap.
2014-10-27 19:18:22 +02:00
Christopher Chedeau
64a5355444 React.js Conf blog post
Closes #2412
2014-10-27 10:12:09 -07:00
Paul O’Shannessy
d63aa0f113 Move Object.assign file to align with internal 2014-10-26 17:14:00 -07:00
Paul O’Shannessy
076a8285f7 Merge pull request #2409 from enaqx/master
Remove obsolete jshint options
2014-10-26 11:12:20 -07:00
Nick Raienko
eb3337b018 Remove obsolete jshint options 2014-10-26 12:18:24 +02:00
Peter Jaros
411a6a1f0c TodoMVC live demos have moved. 2014-10-24 09:57:27 -04:00
Paul O’Shannessy
d36d26a574 [docs] Glossary
Pulled in https://gist.github.com/sebmarkbage/fcb1b6ab493b0c77d589
mostly verbatim
2014-10-23 20:51:11 -07:00
Paul O’Shannessy
4e5f5df4f6 Remove @jsx from examples 2014-10-23 20:51:11 -07:00
Paul O’Shannessy
4cfd8c6204 Update server servering example
It's referencing packages that aren't published yet but it *probably*
works...
2014-10-23 20:51:11 -07:00
Paul O’Shannessy
f53854bd93 React.renderComponent -> React.render
This covers most everything. The perf suite still needs work for the
Element updates. And the server rendering example needs to be done
wholesale.
2014-10-23 20:51:11 -07:00
Paul O’Shannessy
a90b4c9b3e Update properties/elements 2014-10-23 20:51:11 -07:00
Sebastian Markbåge
ae8771fe2e Merge pull request #2084 from kimagure/unmount-comp-error
Error when unmountComponentAtNode receives non-node
2014-10-23 12:53:40 -07:00
Sebastian Markbåge
29bcda463e Merge pull request #2387 from fabiomcosta/avoid_double_scrollread
avoid reading the scroll position twice
2014-10-23 12:51:23 -07:00
Sebastian Markbåge
b7cd3e7d1d Merge pull request #2396 from sebmarkbage/classmodule
Move Class Creation Concerns into a ReactClass Module
2014-10-23 12:50:17 -07:00
Sebastian Markbage
7ce8c844bd Hide ReactElement constructor
This prevents feature tests like:

var ReactElement = React.createElement(...).constructor;

if (element.constructor === ReactElement)

This is intentional so that we have the option to make these plain objects.
E.g. for direct inlining or replacing them with value types.
2014-10-23 12:08:14 -07:00
Sebastian Markbåge
4aee2a9c28 Merge pull request #2405 from sebmarkbage/hideelementconstructor
Hide ReactElement constructor
2014-10-23 12:06:16 -07:00
Paul O’Shannessy
8de03c47dd Merge pull request #2397 from mjul/fix-gruntfile
Added missing semicolon after statement.
2014-10-23 12:01:55 -07:00
Sebastian Markbage
20af6b0a14 Hide ReactElement constructor
This prevents feature tests like:

var ReactElement = React.createElement(...).constructor;

if (element.constructor === ReactElement)

This is intentional so that we have the option to make these plain objects.
E.g. for direct inlining or replacing them with value types.
2014-10-23 10:53:57 -07:00
Martin Jul
994fc7d8a7 Merge remote-tracking branch 'upstream/master' into fix-gruntfile 2014-10-23 09:55:43 +02:00
Martin Jul
c9fb57feb3 Added missing semicolons identified by using grunt jshint:project. 2014-10-23 09:54:13 +02:00
Ben Alpert
32630cd8cf Fix typo in 0.12 RC blog post 2014-10-23 00:45:33 -07:00
Sebastian Markbage
d9fe40e147 Move Class Creation Concerns to ReactClass
This moves logic responsible for class creation and mixins into
the ReactClass module. This currently creates a class that extends
the ReactCompositeBase but in the future, this will be decoupled as
ReactCompositeComponent will compose these classes.

This is just a cut/paste.
2014-10-22 21:25:20 -07:00
Sebastian Markbage
c7bb936566 Introduce React Class as an alias for Composite Component
This is in preparation for the separation of Composite Component internals
from the Class abstraction.
2014-10-22 18:35:10 -07:00
Lee Byron
d545238fd9 Merge pull request #2376 from leebyron/iterable
Allow iterables in traverseAllChildren
2014-10-22 18:18:08 -07:00
Ben Alpert
de1dacdb28 Refactor composite component update flow
Fixes #1392.

Previously, ReactComponent.updateComponent set the new props and owner and updated the component's refs. Because it did the actual props assignment, it had to be called by ReactCompositeComponent between componentWillMount and componentDidMount, meaning that it was skipped if shouldComponentUpdate returned false. Now, updateComponent takes the old and new descriptors and only updates refs, allowing a subclass to call updateComponent at a convenient time (specifically, it can be before `this._descriptor` is updated if the subclass also overrides performUpdateIfNecessary).

The new update cycle for composites is:

- receiveComponent is called which stores `this._pendingDescriptor` and calls performUpdateIfNecessary directly or a state update is enqueued, in which case ReactUpdates will call performUpdateIfNecessary
- performUpdateIfNecessary ensures that an update is still pending (which might no longer be the case if an update is queued for a subcomponent that was updated through a parent's reconciliation) and calls updateComponent with the old and new descriptors
- updateComponent calls super to update refs, then calls componentWillReceiveProps (if applicable) and shouldComponentUpdate -- if shouldComponentUpdate returns false, `this._descriptor`, `this.props`, and `this.state` are updated and the update is skipped; else, _performComponentUpdate is called
- _performComponentUpdate calls componentWillUpdate and _updateRenderedComponent, and enqueues the componentDidUpdate call (in that order)
- _updateRenderedComponent calls render and updates the rendered component appropriately

For DOM components (essentially unchanged):

- receiveComponent is called which does a short-circuit check for descriptor equality and delegates to super (which stores `this._pendingDescriptor` and calls performUpdateIfNecessary)
- performUpdateIfNecessary (not overridden) sets new values for `this.props`, etc. and calls updateComponent
- updateComponent does the DOM property and children updates (some synchronously, some queued for the transaction close)

For text and ART components (unchanged):

- receiveComponent updates the DOM or ART directly based on the new props
- updateComponent is never called

Notable changes:

- When shouldComponentUpdate returns false, refs are still updated
- ReactDefaultPerf now includes lifecycle methods in component timings
- updateComponent's signature changed (technically this is part of the public API, though we've never documented it)

Test Plan: jest
2014-10-22 17:59:58 -07:00
Ben Alpert
9c2125599c Add \n after <textarea> to fix missing linebreaks
Same for <pre> and <listing>. Browsers are crazy.

Test Plan: jest, verify in Chrome that starting textareas with a value starting with two newlines renders both newlines instead of one newline, as it did before.
2014-10-22 17:24:24 -07:00
Martin Jul
70fdd5a287 Added missing semicolon after statement. 2014-10-22 23:46:54 +02:00
Paul O’Shannessy
b78fe39b60 Bump version to 0.13.0-alpha 2014-10-22 14:19:54 -07:00
Paul O’Shannessy
5ffcec7552 Update travis-ci badge for 0.12-stable branch 2014-10-22 14:17:11 -07:00
Ben Alpert
5e2d926d65 Merge pull request #2372 from spicyj/docs012-1
Update docs to align with 0.12 better
2014-10-22 14:02:35 -07:00
Ben Alpert
52494f9d72 Update docs to align with 0.12 better
- Rename React.renderComponent -> React.render
- Remove most references to transferPropsTo
2014-10-22 14:01:54 -07:00
Paul O’Shannessy
85a98d4c8e Merge pull request #2322 from zpao/update-licenses-docs-examples
Update docs/examples with licenses
2014-10-22 13:13:56 -07:00
Paul O’Shannessy
7dc0e3d746 Update licenses for docs and examples
Docs are now CC licensed
Examples are under a separate license
2014-10-22 12:35:08 -07:00
Lee Byron
c07ea0ba34 Allow iterables in traverseAllChildren
This lets you use any kind of iterable as a container of react child elements. It also preserves keys when possible if the iterable is keyed.

 * Use an ES6 Map or Set to hold children.
 * Use an Immutable-js collection to hold children.
 * Use a function* which yields children.

Concretely, this removes the necessary conversion to JS objects if you're mapping over Immutable-js collections to get children, i.e.:

```
<div>
  {myImmutable.map(val => <span>{val}</span>).toJS()
</div>
```

Now we can remove the `toJS()` and the intermediate allocation along with it.

This also cleans up the traverseAllChildrenImpl method.
2014-10-21 15:18:53 -07:00
Ben Alpert
631b6a097c Merge pull request #2388 from spicyj/null-key
Support but warn on key={null}
2014-10-21 14:20:16 -07:00
Paul O’Shannessy
ac3e9b55e0 Merge pull request #2370 from chenglou/rm-school
[Docs] Remove most of @jsx
2014-10-21 14:11:22 -07:00
Ben Alpert
dd92786fb0 Support but warn on key={null}
Fixes #2386.

Test Plan: jest
2014-10-20 17:19:48 -07:00
Sebastian Markbåge
2bdad81955 Merge pull request #2384 from sebmarkbage/deprecateisvalidclass
Deprecate isValidClass
2014-10-20 17:17:56 -07:00
Fabio M. Costa
dafaf1a42e avoid reading the scroll position twice 2014-10-20 13:30:02 -07:00
Shripad K
edab4814da Fix: Always return boolean from isNullComponentID 2014-10-21 00:43:04 +05:30
Cheng Lou
1b3b432d64 [Docs] Remove most of @jsx
I kept some places intact (search for @jsx) because they require other bigger changes:

- ref-01-top-level-api.md
- grunt/tasks/npm.js
- old blog posts (don't change those)
- examples/ folder, as they have their own package.json that rely on old dependencies (node-jsx, reactify) that haven't upgraded to 0.12
2014-10-20 14:44:07 -04:00
Paul O’Shannessy
be468c2c22 Merge pull request #2373 from genbit/docs-animation-props
Update 09.1-animation.md
2014-10-20 11:01:36 -07:00
Paul O’Shannessy
a94bfd7888 Merge pull request #2381 from shripadk/jsdoc-fix
Fix JSDoc tag in ReactElement.js
2014-10-20 10:56:46 -07:00
Sebastian Markbage
ef971014bc Deprecate isValidClass
Fixes #2374
2014-10-19 23:55:57 -07:00
Shripad K
621bb09cd7 Fix JSDoc tag in ReactElement.js 2014-10-19 21:01:45 +05:30
Sergey Generalov
3031c6591e Update 09.1-animation.md
Add note about ReactTransitionGroup, that any additional, user-defined, properties will be become properties of the rendered component.
And example how to render a `<ul>` with css class.
2014-10-17 20:18:45 -07:00
Ben Alpert
daf4182707 Merge pull request #2368 from spicyj/use-the-string
Fix warning message for using React.DOM.* as type
2014-10-17 12:01:17 -07:00
Christopher Chedeau
dec41bbbca Merge pull request #2356 from vjeux/roundup_23
Community round-up #23
2014-10-17 07:58:40 -07:00
Christopher Chedeau
6470920125 Community round-up #23 2014-10-17 07:56:28 -07:00
Ben Alpert
810582d114 Fix warning message for using React.DOM.* as type
Previously, this said 'Use the string "function() { [native code] }" instead.'.
2014-10-16 18:22:37 -07:00
Paul O’Shannessy
56e84d8cf3 Merge pull request #2364 from zpao/0.12rc-blog-post
0.12 rc1 release materials
2014-10-16 15:34:11 -07:00
Paul O’Shannessy
aca264e399 0.12 rc1 release materials
* blog post
* starter kit
2014-10-16 15:31:52 -07:00
Paul O’Shannessy
2b4e35870b v0.12.0-rc1 2014-10-16 14:56:50 -07:00
Sebastian Markbåge
22903a57e8 Merge pull request #2363 from sebmarkbage/assign
Use hasOwnProperty checks in Object.assign
2014-10-16 11:52:43 -07:00
Sebastian Markbage
25d63b43ef Use hasOwnProperty checks in Object.assign
Because IE8 polyfills add enumerable properties, this doesn't play nicely.
So for IE8 compatibility we add this check. Slower though. :(
2014-10-16 11:49:50 -07:00
Sebastian Markbåge
828efb798a Merge pull request #2350 from sebmarkbage/assign
Hide Object.assign polyfill behind a module
2014-10-16 09:29:01 -07:00
Sebastian Markbage
8210beeef4 Hide Object.assign polyfill behind a module
Because the JS community's polyfilling infrastructure sucks and we'll
have to fix it for them before we require this.

JSX spread uses React.__spread
(which might get special behavior for key/ref, not sure yet)

This never uses the native implementation and throws for prototype chains.
Once the native implementations are faster, we'll start using them.
2014-10-16 09:21:10 -07:00
Beau Smith
df36c258b3 Highlighted changed lines in examples 2014-10-15 23:01:05 -07:00
Paul O’Shannessy
5263f61c87 Merge pull request #2357 from jimjea/patch-1
Minor grammar change to Thinking in React
2014-10-15 17:01:57 -07:00
Jimmy Jea
43dbd29bb1 minor change to post
Hello,

I was just reading through your post and noticed a minor change. The sentence originally read, "It's scaled very well for us...". I thought it was a little unclear since it's can mean "it has" or "it is", which can make this sentence take on a whole different meaning.
2014-10-15 16:36:30 -07:00
Paul O’Shannessy
4d06df3153 Merge pull request #2359 from zpao/fix-blog-post
[docs] Move React Elements post to right place, fix typo
2014-10-15 16:22:36 -07:00
Paul O’Shannessy
dcbc64ac76 [docs] Move React Elements post to right place, fix typo
The URL already made its way around so we can't just break it. We might
want to just live with it instead of even doing this redirect.

2b225446c0 (commitcomment-8176218)
2014-10-15 16:10:03 -07:00
Paul O’Shannessy
e7f509d3a3 0.11.2 release materials
TODO: starter kit for cherry-pick to master
(cherry picked from commit 732ffad313)
2014-10-15 15:55:12 -07:00
Paul O’Shannessy
bc672c8bc5 Merge pull request #2344 from ThomasCrvsr/master
Use React.createFactory in examples/basic/
2014-10-15 10:48:33 -07:00
Ben Alpert
b8229cc761 Fix typo in blog post 2014-10-15 10:09:23 -07:00
ThomasCrvsr
e3734e2b43 #2315 : Use of React.createFactory in example basic/ 2014-10-15 09:20:25 +02:00
Paul O’Shannessy
efc7829e91 Merge pull request #2330 from alexeyraspopov/patch-1
use function composition instead of mutable state
2014-10-14 23:48:55 -07:00
Paul O’Shannessy
7853affd4f Merge pull request #2343 from zpao/proptypes-deprecation
Update PropTypes for ReactElement & ReactNode
2014-10-14 23:23:57 -07:00
Paul O’Shannessy
58165dfbcd Merge pull request #2349 from zpao/update-deps
Update npm dependencies, fix browserify task
2014-10-14 23:21:01 -07:00
Paul O’Shannessy
d03d49101b browserify update 2014-10-14 22:40:28 -07:00
Paul O’Shannessy
770b579aa2 Update PropTypes for ReactElement & ReactNode 2014-10-14 21:35:48 -07:00
Paul O’Shannessy
67307ce850 Update dependencies, removed unused ones
Also picked up a bit of JSON reformatting, presumably from npm >= 2

Test plan: build, run tests
2014-10-14 16:18:20 -07:00
Paul O’Shannessy
2b225446c0 React Elements blog post 2014-10-14 10:59:15 -07:00
Paul O’Shannessy
27cbd71394 Merge pull request #2317 from zpao/npm-ship-merge
Ship merge, mergeInto, copyProperties to npm
2014-10-14 10:21:51 -07:00
ThomasCrvsr
4f1f8c0605 Use react.createElement in example in basic/ 2014-10-14 10:18:00 +02:00
Paul O’Shannessy
b227837b0c Ship merge to npm
People may have a bad time if they're depending on these but we can
delay that a little bit. Unless they're using directly and not
polyfilling Object.assign.
2014-10-13 14:07:39 -07:00
Paul O’Shannessy
4dcc1161fa Update @emails in react-displayName-test 2014-10-13 12:56:02 -07:00
Sebastian Markbåge
3991d4de6b Merge pull request #2337 from sebmarkbage/devtoolshook
Inject the runtime to a global instead of exposing internals
2014-10-13 12:30:15 -07:00
Sebastian Markbage
ce19af9d30 Inject the runtime to a global instead of exposing internals
See 673de20a4a
2014-10-13 11:59:23 -07:00
Alexey Raspopov
1db3ed0d6d fix: var name 2014-10-12 16:06:53 +03:00
Alexey Raspopov
cc0e7d2a79 ballmer-peak: use composition instead of mutable state 2014-10-12 16:05:58 +03:00
Paul O’Shannessy
5d3b12bb3b Merge pull request #2312 from zpao/license-update
Update Licenses
2014-10-10 16:58:45 -07:00
Paul O’Shannessy
dcf415c2b9 BSD + PATENTS 2014-10-10 13:34:07 -07:00
Paul O’Shannessy
3bbed150ab Merge pull request #2139 from syranide/acceptcharset
Add form "acceptCharset" to HTMLDOMPropertyConfig
2014-10-10 12:40:13 -07:00
Sebastian Markbåge
eef9995093 Merge pull request #2313 from sebmarkbage/sanitizetags
Sanitize the string tag passed to DOM components
2014-10-10 12:33:45 -07:00
Paul O’Shannessy
31faa58c27 Merge pull request #2320 from zpao/jsxtransformer-no-docblock
JSXTransformer: don't look for docblock
2014-10-10 11:46:26 -07:00
Paul O’Shannessy
cf5fea4616 JSXTransformer: don't look for docblock 2014-10-10 11:45:52 -07:00
Paul O’Shannessy
0dccf64c67 Sync upstream modules 2014-10-10 10:40:18 -07:00
Paul O’Shannessy
5d127eaa49 Merge pull request #2316 from zpao/devtoolsmarker
Look for devtools global hook
2014-10-09 17:00:06 -07:00
Paul O’Shannessy
540731b7a8 Merge pull request #2002 from zpao/rename-renderComponent
React.renderComponent -> React.render
2014-10-09 16:41:37 -07:00
Paul O’Shannessy
1c86f5836a Codemod deprecated API usage away 2014-10-09 16:41:03 -07:00
Paul O’Shannessy
9b1fa914fa React.renderComponent -> React.render
Also rename all the associated render methods and adds deprecation
notices.
2014-10-09 16:41:03 -07:00
Sebastian Markbage
a4e923b7fc Sanitize the string tag passed to DOM components
Because we're using innerHTML to generate DOM Elements, we need to make
sure that the tag is sane and doesn't try to do injection.

This wouldn't be an issue if we used document.createElement instead.
2014-10-09 13:55:29 -07:00
Paul O’Shannessy
436c6c2db7 Merge pull request #2310 from tmcw/list-require-attribute
Require list property to be accessed as an attribute
2014-10-09 11:29:59 -07:00
Paul O’Shannessy
6ddf8de5ae Look for devtools global hook
It doesn't exist yet, but it could.

This also ensures we actually do our polyfill checks in *all* browsers,
not just Chrome.
2014-10-09 11:24:48 -07:00
Sebastian Markbåge
36b091bc44 Merge pull request #2308 from sebmarkbage/dropdocblock
Drop the @jsx docblock from unit tests
2014-10-08 15:24:18 -07:00
Tom MacWright
688f64c5c8 Require list property to be accessed as an attribute 2014-10-08 17:49:05 -04:00
Andreas Svensson
70a7506bb9 Add form "acceptCharset" to HTMLDOMPropertyConfig 2014-10-08 22:45:33 +02:00
Paul O’Shannessy
18209a1112 Merge pull request #2304 from zpao/rm-server-rendering-deprecation-notice
Update ReactServerRendering for the modern world
2014-10-08 13:09:01 -07:00
Paul O’Shannessy
8faca765e1 Update ReactServerRendering for the modern world
* ReactComponents aren't really the thing we need, ReactElements are
* Remove the deprecation notice that we've had in there for a long time

Test Plan: build, jest
2014-10-08 12:52:59 -07:00
Paul O’Shannessy
fe32477d97 Merge pull request #2306 from zpao/cleanup-textcomponent-dep
Remove ReactBrowserComponentMixin dependency from ReactTextComponent
2014-10-08 12:48:23 -07:00
Sebastian Markbage
348af57842 Drop the @jsx docblock from unit tests
This is no longer necessary in our transforms.
2014-10-08 12:46:45 -07:00
Sebastian Markbåge
85597bf3aa Merge pull request #2303 from sebmarkbage/dropmerge
Use Object.assign instead of merge, mergeInto, mixInto and copyPropertie...
2014-10-08 12:10:08 -07:00
Sebastian Markbage
096360db03 Use Object.assign instead of merge, mergeInto, mixInto and copyProperties
This makes it easier to contribute without having to learn a bunch of
slightly different helpers and remember their slightly different
signatures and semantics.

We'll probably start using ES7 spread properties instead of merge in the
future when at least one more transpiler supports it.
2014-10-08 11:32:40 -07:00
Paul O’Shannessy
f2f4006ff6 Remove ReactBrowserComponent dependency from ReactTextComponent
It's no longer used as of #1598, which just missed the require.

Test Plan: build, jest
2014-10-08 11:29:45 -07:00
Paul O’Shannessy
c0c90c0050 Merge pull request #2305 from sebmarkbage/missingrename
Rename ReactDescriptor followup
2014-10-08 10:54:57 -07:00
Sebastian Markbage
5541842284 Renamed ReactDescriptor-test
I forgot to rename the test.
2014-10-07 23:44:02 -07:00
Pedro Nauck
8a4b2763dc change note comment about namespaced components 2014-10-08 01:41:48 -03:00
Justin Woo
9c8ddb3316 Error when unmountComponentAtNode receives non-node 2014-10-07 21:12:56 -04:00
Paul O’Shannessy
9ef2b4e5d9 Merge pull request #2252 from syranide/htmlmanifest
Add manifest to HTMLDOMPropertyConfig
2014-10-07 15:29:57 -07:00
Paul O’Shannessy
33d2b5e8ff Merge pull request #2238 from syranide/noclassid
Remove superfluous classID from DOMAttributeNames
2014-10-07 15:26:19 -07:00
Paul O’Shannessy
8883d0f818 Merge pull request #2276 from spicyj/asap
Rename ReactUpdates.setImmediate to 'asap'
2014-10-07 14:27:00 -07:00
Sebastian Markbåge
f48954d8a3 Merge pull request #2300 from sebmarkbage/descriptorstoelements
Renamed Descriptor -> Element
2014-10-07 13:44:44 -07:00
Sebastian Markbage
8f1657bba6 Renamed Descriptor -> Element
We've decided on a new naming convention for ReactDescriptor. It's now
called ReactElement, which is a subset of the ReactNode union type.
2014-10-07 13:41:51 -07:00
Sebastian Markbage
7f9b1d18d1 Start warning when React.DOM.x is passed into JSX
React.DOM is becoming helper factories to generate ReactElements. They're not
classes. It will be ok to call them directly as functions, but not to use them
where a class is expected.
2014-10-07 10:49:18 -07:00
Sebastian Markbage
15a0c8920e Don't use React.DOM
I grepped for uses of React.DOM. This is going to be a set of helper functions
to generate ReactElements without JSX.

They're not classes so they cannot be used where a React class is expected.

Since we always use JSX, we should have no internal use for these helpers.
We can use strings instead.
2014-10-07 10:49:18 -07:00
Sebastian Markbage
b2dbccf9a2 Rename lower case variables in JSX to upper case
We're trying to move to a convention where lower-case variables on JSX are always HTML/SVG tags rather than variables in scope. See:

http://fb.me/react-jsx-lower-case

Therefore, this diff renames existing uses to upper case variables.

This throws an error on all these files, so I manually go rename all the variables. I then run lint to ensure that the rename doesn't leave any undeclared variables.
2014-10-07 10:48:57 -07:00
Sebastian Markbage
c4658c1728 Update React JSX Transforms
* Extract JSXDOM into separate transform
* Rename lower case variables in JSX to upper case
* Drop React.DOM docblock, use string tags instead
2014-10-07 10:48:57 -07:00
Pedro Nauck
fd9ddab532 change the global variable to a new sample component 2014-10-07 13:06:16 -03:00
Pedro Nauck
748a4ef1b2 add a section at 'jsx-in-depth' talking about namespaced components 2014-10-07 03:09:24 -03:00
Sebastian Markbåge
1a1104f56f Merge pull request #2287 from sebmarkbage/stringelements2
Use strings as the type for DOM elements
2014-10-03 10:49:31 -07:00
Sebastian Markbage
3aaccd2dc9 Use strings as the type for DOM elements
This makes ReactDOM a simple helper for creating ReactElements with the string tag as the type. The actual class is internal and created by instantiateReactComponent. Configurable using injection.

There's not a separate class for each tag. There's just a generic ReactDOMComponent which could take any tag name.

Invididual tags can be wrapped. When wrapping happens you can return the same tag again. If the wrapper returns the same string, then we fall back to the generic component. This avoids recursion in a single level wrapper.
2014-10-02 23:05:11 -07:00
Ben Alpert
a8fff93971 Rename ReactUpdates.setImmediate to 'asap'
Per https://github.com/facebook/react/pull/1554#issuecomment-57243842.

Test Plan: jest
2014-09-29 17:37:13 -07:00
Paul O’Shannessy
35764c5ffb [docs] Use subitem in new nav generation
(cherry picked from commit 995d0e588b)
2014-09-29 13:48:25 -07:00
Paul O’Shannessy
57de1b07d0 Merge pull request #2254 from jgable/spellingFix
Spelling fix for "Testing Flux Applications"
2014-09-26 23:11:42 -07:00
Paul O’Shannessy
3888b97433 Merge pull request #2219 from pablolmiranda/master
Creates a getMeasurementsSummaryMap in ReactDefaultPerf
2014-09-26 17:56:07 -07:00
Paul O’Shannessy
a37dcbb8e0 Merge pull request #2208 from wincent/typo-fix-03
Fix a comment typo
2014-09-26 17:55:10 -07:00
Paul O’Shannessy
0383534094 Merge pull request #2202 from syranide/noscroll
Remove non-attribute scrollLeft and scrollTop from HTMLDOMPropertyConfig
2014-09-26 17:54:49 -07:00
Paul O’Shannessy
778ca2f862 Merge pull request #1598 from syranide/nogettext
Un-mixin ReactBrowserComponentMixin from ReactTextComponent
2014-09-26 17:54:32 -07:00
Paul O’Shannessy
c14b3a1b13 Merge pull request #1520 from syranide/ediblechildren
Warn against contentEditable with children props
2014-09-26 17:54:24 -07:00
Jacob Gable
0b3c0ebced Spelling fix
- Puting -> Putting
2014-09-26 12:42:58 -05:00
Andreas Svensson
3de80ec4ba Add manifest to HTMLDOMPropertyConfig 2014-09-26 16:45:33 +02:00
fisherwebdev
65c1834059 Merge branch 'zpao-rm-flux-docs' 2014-09-26 07:05:02 -07:00
fisherwebdev
f45d753486 Merge pull request #2236 from zpao/rm-flux-docs 2014-09-26 07:03:37 -07:00
Paul O’Shannessy
6c19040d24 Point to Flux site for Flux docs
This doesn't actually remove the pages, just the main content. Sidebar
items now link offsite. The pages doesn't automatically redirect, but we
could do that if we really wanted.

Fixes #2229
2014-09-25 12:34:22 -07:00
Bill Fisher
ef327fcb23 Merge pull request #2240 from christianalfoni/patch-1
Update flux-todo-list.md
2014-09-25 08:33:02 -07:00
Bill Fisher
2f30b2648c Merge pull request #2237 from markhovskiy/patch-1
fix typos in "Testing Flux Applications"
2014-09-25 08:29:13 -07:00
Christian Alfoni
1b6a3d5215 Update flux-todo-list.md
You have to instantiate a Dispatcher to use it, not just grab the prototype or it will fail when trying to grab instance properties like: this.$Dispatcher._callbacks.
2014-09-25 11:54:52 +02:00
Andreas Svensson
cac45631c3 Remove superfluous classID from DOMAttributeNames 2014-09-25 10:46:29 +02:00
Oleksii Markhovskyi
5493b63b44 fix typos 2014-09-25 09:54:35 +02:00
Paul O’Shannessy
4f27dc30ad Merge pull request #2228 from XuefengWu/patch-1
add tip for the important jsx convention
2014-09-24 15:35:36 -07:00
Bill Fisher
6f54ed71da Merge pull request #2234 from fisherwebdev/master
[blog] testing flux applications
2014-09-24 13:08:45 -07:00
fisherwebdev
9952a54026 [blog] testing flux applications 2014-09-24 12:35:39 -07:00
Pablo Lacerda de Miranda
792b84c94b fixes ReactDefaultPerf.getMeasurementsSummaryMap format style 2014-09-23 18:50:18 -07:00
XuefengWu
b9f32a8295 Update getting-started.md
fix grammar
2014-09-24 08:26:10 +08:00
Paul O’Shannessy
67eeed601b Merge pull request #2212 from Oleg24/patch-1
Improved readability by removing semicolon
2014-09-23 17:06:53 -07:00
Oleg
86287bffd4 Add space after ellipses 2014-09-23 17:01:23 -07:00
Paul O’Shannessy
7339f8b7b8 Merge pull request #2149 from imcotton/jsx-reduce-warning
Reduce unnecessary warning while including JSX transformer in browser
2014-09-23 13:34:10 -07:00
XuefengWu
f04d648888 Update getting-started.md
merge the warn and explain for the @jsx
2014-09-23 15:22:11 +08:00
Isaac Salier-Hellendag
e7299f6039 Prefer window.getSelection for IE
IE9+ supports `window.getSelection()` but `SelectEventPlugin` gives precedence to `document.selection` instead. `document.selection` is still available in later versions of IE, but the modern Selection object is preferable. Swap the two.
2014-09-22 16:56:22 -07:00
Paul O’Shannessy
176d47319a Merge pull request #2225 from jesseskinner/patch-1
Fix inconsistency in mockComponent argument name
2014-09-22 14:42:38 -07:00
Paul O’Shannessy
9919734df3 Merge pull request #2180 from zpao/fix-2179
Reword Component API intro
2014-09-22 14:41:18 -07:00
Paul O’Shannessy
eafe786aef Reword Component API intro
Fixes #2179
2014-09-22 14:40:22 -07:00
Paul O’Shannessy
bf0fe94561 Merge pull request #2209 from glenjamin/patch-2
[docs] Clarify wording on sub-tree reconciliation
2014-09-22 14:32:18 -07:00
Paul O’Shannessy
8cd460ce24 Move examples from the website to the wiki. 2014-09-22 14:29:39 -07:00
Andreas Svensson
14ba6ee788 Un-mixin ReactBrowserComponentMixin from ReactTextComponent 2014-09-22 23:28:26 +02:00
Paul O’Shannessy
7cf350a5a1 Merge pull request #2223 from cody/stripTypes
Add stripTypes option to npm docs
2014-09-22 13:38:37 -07:00
Paul O’Shannessy
97a41db82c Merge pull request #2218 from fisherwebdev/master
Acknowledge ProjectMoon for allowing us to use the flux name on npm
2014-09-22 13:09:06 -07:00
XuefengWu
0ae09f4c70 add tip for the important jsx convention
I missed the convention and wast hours to figure out what's wrong. 
Add this tip in the document for who would miss the importance comment.
2014-09-22 20:10:34 +08:00
fisherwebdev
0e4e7ea7e1 Acknowledge ProjectMoon for allowing us to use the flux name on npm 2014-09-21 21:10:39 -07:00
Jesse Skinner
3109082144 Fix inconsistency in mockComponent argument name
The second argument of mockComponent was listed as tagName, but referred to in the description as mockTagName. I changed the first one to mockTagName to be consistent.
2014-09-21 23:00:25 -04:00
Stefan Dombrowski
7597cfc5fb Add stripTypes option to npm docs 2014-09-21 19:22:22 +02:00
Pablo Lacerda de Miranda
486c69b6de extracts getMeasurementsSummaryMap from ReactDefaultPerf.printWasted 2014-09-19 16:03:41 -07:00
Oleg
d06018cbac Improved readability by removing semicolon
The first sentence had an unnecessary semicolon which made the whole thing difficult to read.  The new syntax is not only easier to read but also more exciting.
2014-09-18 21:34:47 -07:00
Paul O’Shannessy
9d7e3a7471 Merge pull request #2211 from jacobgreenleaf/master
Fix typo in documentation in Flux Todo List
2014-09-18 18:33:04 -07:00
Jacob Greenleaf
8882f19187 Fix typo in documentation in Flux Todo List 2014-09-18 18:30:57 -07:00
Glen Mailer
cf512bf60d [docs] Clarify wording on sub-tree reconciliation
The previous wording could be interpreted to mean sub-trees moving from
within one sibling to within another, rather than the shuffling of siblings on
a single level as intended
2014-09-18 22:48:35 +01:00
Greg Hurrell
94eac0b8fa Fix a comment typo 2014-09-18 09:47:23 -07:00
Andreas Svensson
802ad0bc00 Remove non-attribute scrollLeft and scrollTop from HTMLDOMPropertyConfig 2014-09-17 14:40:37 +02:00
Paul O’Shannessy
21f601964f Merge pull request #1301 from markijbema/patch-1
Only stop if the transition on this element ended
2014-09-12 17:00:05 -07:00
Christopher Chedeau
aa25eb8e40 Update 2014-09-12-community-round-up-22.md 2014-09-12 11:34:29 -07:00
Christopher Chedeau
05cec04367 Merge pull request #2186 from vjeux/roundup_22
Community roundup #22
2014-09-12 11:06:25 -07:00
Christopher Chedeau
d53a365e77 Community roundup #22 2014-09-12 10:35:30 -07:00
Paul O’Shannessy
af485d928f Merge pull request #2181 from zpao/move-onscroll-detection
Move onscroll detection
2014-09-11 15:59:11 -07:00
Paul O’Shannessy
584e6bd648 Ignore .module-cache from jest [skip ci]
I hit a case where running jest was including files from the module
cache. I don't think that should have happened, but this works.
2014-09-11 15:28:20 -07:00
Paul O’Shannessy
def41dfd8f Move onscroll warning test
This moves it to the appropriate place to accomodate the move of the check.
2014-09-11 15:15:19 -07:00
Paul O’Shannessy
a10436d4ab Merge pull request #2097 from fitzgen/explain-where-to-provide-key
Explain where to provide the key for dynamic children.
2014-09-11 14:14:55 -07:00
Paul O’Shannessy
6daf6d31f3 Merge pull request #2178 from benfoxall/patch-1
Docs grammar tweak
2014-09-11 10:36:32 -07:00
Ben Foxall
fe08888fbb Less -> Fewer
bugs and bytes are countable, so should be fewer
2014-09-11 14:33:16 +01:00
Nick Fitzgerald
18874a6054 Explain where to provide the key for dynamic children. 2014-09-10 14:53:41 -07:00
Andrew Rasmussen
7ae8909504 Move IE8 onscroll check
Rather than checking if document.onscroll exists in EventPluginHub
(which is agnostic of the DOM) do it in ReactDOMComponent
2014-09-10 13:33:23 -07:00
Paul O’Shannessy
76d64812e1 Merge pull request #2170 from undernewmanagement/patch-1
Added extra explanation for require() statements
2014-09-10 13:21:47 -07:00
Sheraz
9e6c442df0 Updated small change with zuggestions from @zpao 2014-09-10 12:29:54 +02:00
Paul O’Shannessy
53be3905f8 Merge pull request #2167 from mhintz/patch-1
Update ref-03-component-specs.md
2014-09-09 16:00:39 -07:00
Paul O’Shannessy
99191046f9 Merge pull request #2113 from BinaryMuse/fix_numeric_properties
Fix DOMProperty bitmask checking
2014-09-09 15:26:38 -07:00
Paul O’Shannessy
0d66ea301e Merge pull request #2165 from DJCordhose/patch-1
Update 09.5-clone-with-props.md
2014-09-09 09:41:51 -07:00
Mark Anderson
e8e50986c5 Added extra explanation for require() statements 2014-09-09 14:39:07 +02:00
Mark Hintz
95def7f829 Update ref-03-component-specs.md
Edit the description of componentDidMount() to make clear that the function is called only once during the lifecycle of the component, after only the initial render() call. The description is now similar to that for componentWillMount(). The existing wording does not make it clear that the function is called only after the initial render. (Granted, it is possible to infer this from descriptions of the component lifecycle found elsewhere in the documentation, but I think explicit is better than implicit in this case).
2014-09-09 11:50:13 +02:00
Oliver Zeigermann
8601a3c27d Update 09.5-clone-with-props.md 2014-09-09 10:52:26 +02:00
Paul O’Shannessy
5d88ebbecb Merge pull request #2144 from zertosh/master
Comment typo
2014-09-08 19:37:00 -07:00
Paul O’Shannessy
79ca0c7fd2 Merge pull request #1848 from fgnass/master
add picture element and related attributes
2014-09-08 16:23:39 -07:00
Paul O’Shannessy
f3c64704ad Merge pull request #1988 from syranide/tacfix
Don't wrap values with ReactTextComponent in traverseAllChildren (cloneWithProps)
2014-09-08 15:36:26 -07:00
Paul O’Shannessy
61c42ccdee Update Bootstrap example to 3.2.0 2014-09-08 14:32:19 -07:00
Isaac Salier-Hellendag
8c9a24983e Remove calls to Range.detach
This method is a no-op, as demonstrated by console warnings in Chrome and https://developer.mozilla.org/en-US/docs/Web/API/range.detach.

Remove callsites.

Fixes #2142
2014-09-08 14:30:53 -07:00
Andreas Svensson
45f8837e35 Don't wrap values with ReactTextComponent in traverseAllChildren 2014-09-08 22:35:25 +02:00
Paul O’Shannessy
adb62c76e5 Merge pull request #2158 from Daniel15/htmltojsx-move
Move htmltojsx.js to React-Magic project.
2014-09-07 18:52:37 -07:00
Daniel Lo Nigro
6ceb47e8bf console.warn when html-jsx-lib.js is loaded 2014-09-07 15:20:42 -07:00
Paul O’Shannessy
4398879c2e Merge pull request #2155 from rickbeerendonk/patch-1
Update video.md with Forward JS 2014 talk
2014-09-07 14:31:03 -07:00
Cheng Lou
90d1aeb1c3 Merge pull request #2156 from simonwelsh/patch-1
Correct highlighted block
2014-09-07 14:51:27 -04:00
Daniel Lo Nigro
1d1b6ed07a Move htmltojsx.js to React-Magic project.
The HTMLtoJSX file is really a part of the React-Magic project, and should belong there rather than here:
 - It doesn't really follow the release cycle of React at all
 - It is totally standalone with no dependency on React
 - The only usage of this script is in React-Magic and on the HTML to JSX page on the React website (http://facebook.github.io/react/html-jsx.html)

I've hotlinked it from the Github site for that project since this was the easiest way to pull it in.

Due to the fact that Github Pages lacks redirects (among other basic web hosting functionality), I've replaced the `html-jsx-lib.js` file with a comment explaining where the file has moved to, just in case anyone was hotlinking it from the React site.
2014-09-06 22:51:52 -07:00
Simon Welsh
611abfbcb7 Correct highlighted block 2014-09-06 20:46:19 +10:00
Rick Beerendonk
34b4ed7316 Update video.md with Forward JS 2014 talk
Added "React and Flux: Building Applications with a Unidirectional Data Flow" by Bill Fisher and Jing Chen.
2014-09-06 11:33:36 +02:00
Paul O’Shannessy
ea76f9bf63 Merge pull request #2116 from spicyj/nl-jsx-spread
Add newline before JSX spread when appropriate
2014-09-05 14:34:54 -07:00
Paul O’Shannessy
6c8c70eea4 Merge pull request #2152 from RReverser/fix-pr-check
Fix check for commit ranges in racing PRs.
2014-09-05 14:13:33 -07:00
Paul O’Shannessy
0ad43aff5e Merge pull request #2153 from jeffmo/jsx_strip_types
Add --strip-types flag to bin/jsx
2014-09-05 14:10:37 -07:00
jeffmo
808730df59 Add support for a --strip-types flag to bin/jsx 2014-09-05 16:28:46 -04:00
jeffmo
bcc291b591 Bump esprima + jstransform versions 2014-09-05 15:42:07 -04:00
Paul O’Shannessy
ce014a00a5 Merge pull request #2148 from nordstrom-innovation/docfix
corrected highlighted/updated line in tutorial example
2014-09-05 10:59:24 -07:00
Ingvar Stepanyan
3b2cd51fa5 Fix check for commit ranges in racing PRs.
See #1768 / #2000 for original issue.
See https://github.com/travis-ci/travis-ci/issues/1719#issuecomment-51705110 for problem description and origin of this fix.
This is still a temporary fix until travis-ci/travis-core#383 is merged.
2014-09-05 15:45:21 +03:00
Paul O’Shannessy
b36c9f6638 Merge pull request #2147 from naman34/patch-2
added the missing **
2014-09-04 16:26:35 -07:00
Cotton Hou
6294d7aacc Reduce unnecessary warning while including JSX transformer in browser 2014-09-05 07:15:39 +08:00
jon madison
3e59977046 corrected highlighted/updated line in tutorial example 2014-09-04 16:07:34 -07:00
Nick Merwin
610b75a5b6 Update Like button example verbiage
Changes text "You unlike this" to "You liked this". Makes a bit more grammatical sense.

Closes #2146.
2014-09-04 15:21:27 -07:00
Naman Goel
815f267700 added the missing **
Missed it the last time. Apologies.
2014-09-05 03:21:30 +05:30
Andres Suarez
4c2f124aa8 Comment typo 2014-09-04 12:00:43 -04:00
Andreas Svensson
05fa75d395 IE8 does not have a setter for property "enctype" 2014-09-04 12:11:01 +02:00
Paul O’Shannessy
00fe66ddec Merge pull request #2106 from subtleGradient/subtleGradient/improve-ReactPerf-debugging
Improve debugging for methods using ReactPerf
2014-09-03 17:46:49 -07:00
Paul O’Shannessy
c707c2568e JSX spec blog post 2014-09-03 15:37:08 -07:00
Paul O’Shannessy
1854e8a912 Merge pull request #2033 from pekim/master
Add support for <dialog> tag.
2014-09-03 14:47:41 -07:00
Paul O’Shannessy
9a89edbb22 Fix broken link in animation docs
Missed in #2068
2014-09-03 11:59:14 -07:00
Paul O’Shannessy
073e1186d7 Merge pull request #2120 from zpao/svg-logo
[docs] SVG logo
2014-09-02 14:05:05 -07:00
Paul O’Shannessy
c406534c26 Merge pull request #2124 from Daniel15/htmltojsx-fixes
Small tweaks to HTML to JSX page
2014-09-02 14:03:21 -07:00
Paul O’Shannessy
f678591ad6 Merge pull request #2101 from jeffchan/patch-1
Fix typo in ReactDefaultPerfAnalysis comment
2014-09-02 11:57:45 -07:00
Brandon Tilley
0e28f5e6d7 Fix DOMProperty bitmask checking 2014-09-02 06:53:58 -07:00
Daniel Lo Nigro
e11b4078bc Small tweaks to HTML to JSX page:
- Remove "Compiled JS" tab since it doesn't make sense
 - Relabelled editor to "Live HTML Editor" rather than "Live JSX Editor"
2014-08-31 21:48:10 -07:00
Mike D Pilsbury
ffa0447177 Add support for <dialog> tag's open attribute. 2014-08-31 12:43:32 +01:00
Paul O’Shannessy
820210fd9e Merge pull request #2091 from julen/docs/LinkedState
Docs: renamed input's state to `inputValue`
2014-08-30 17:25:49 -07:00
Paul O’Shannessy
9f802e7703 Merge pull request #2075 from IvanVergiliev/patch-1
Add 2048-react to open-source demos
2014-08-30 17:24:11 -07:00
Paul O’Shannessy
11a96fd8ce Merge pull request #2119 from naman34/patch-1
added production example
2014-08-30 16:08:58 -07:00
Paul O’Shannessy
9a1236790b SVG logo
I traced the current logo in Illustrator to get a good version. And with
SVG we don't need any 2x magic because it's already vector. I should
probably care about IE8, but I don't.
2014-08-30 16:03:49 -07:00
Naman Goel
3c74626a70 added production example
Addition note: Scribbler.co uses an infinite.js/UITableView like rendering pattern with animations which is only possible because of React.
2014-08-31 03:26:08 +05:30
Paul O’Shannessy
59324ab6d5 Merge pull request #2117 from spicyj/jest-vendor
Include vendor/ when running jest tests
2014-08-30 12:55:20 -07:00
Paul O’Shannessy
87cbde0a40 Merge pull request #2118 from spicyj/es7-spread
Enable ES7 spread transform when using --harmony
2014-08-30 12:54:58 -07:00
Ben Alpert
9f4ae415e2 Enable ES7 spread transform when using --harmony
Test Plan: `echo "var o = {...x};" | bin/jsx --harmony` outputs `var o = Object.assign({},x);`.
2014-08-30 01:10:21 -07:00
Ben Alpert
1ba022b1ea Include vendor/ when running jest tests
Now the two transform tests get run alongside the React core tests.

Test Plan: jest
2014-08-30 01:08:57 -07:00
Ben Alpert
cc9735f889 Add newline before JSX spread when appropriate
Previously, we were losing the newline before a JSX spread attribute which would cause the lines to not match up; this fixes the problem.
2014-08-30 01:04:19 -07:00
Sebastian Markbage
4af98990db Bumping version to help filtering. 2014-08-29 14:35:22 -07:00
Sebastian Markbage
63046277e4 Bumping version to help filtering. 2014-08-29 14:35:12 -07:00
Sebastian Markbage
bad1b7c41a Start warning for JSX on plain functions
Let's also bump the version number for the log so that we can start filtering
out the other logs.
2014-08-29 14:35:07 -07:00
Sebastian Markbage
3c6c437d07 Don't transfer props to mocked empty component
We currently automatically render empty components in place of mocks. However,
we were accidentally transferring the props from the mocked descriptor to the
empty component placeholder. Even children.

This change just cleans that up and should only affect unit tests.
2014-08-29 14:35:01 -07:00
Sebastian Markbage
f5a0d667a5 Add version to legacy factory monitoring 2014-08-29 14:34:58 -07:00
Miorel Palii
335e91df71 Fix console warning in LegacyImmutableObject
It does check `hasOwnProperty`, but *after* accessing the field and therefore triggering enumerable getters in modified prototypes.
2014-08-29 14:32:50 -07:00
Ben Alpert
944f49c264 Merge pull request #2080 from fisherwebdev/master
[docs] Update Flux TodoMVC Tutorial
2014-08-28 12:11:28 -07:00
Thomas Aylott
755cc9671f Combine displayName using underscore 2014-08-28 14:58:59 -04:00
Thomas Aylott
a6116b31e5 Improve debugging for methods using ReactPerf 2014-08-28 13:49:51 -04:00
Jeff Chan
ef9c9c81d0 Fix typo 2014-08-27 21:17:10 -07:00
Cheng Lou
74ff6fb6b8 Merge pull request #2039 from crm416/return-false
Deprecate 'return false' in event handlers
2014-08-27 13:33:40 -07:00
Cheng Lou
95de877dce Merge pull request #2036 from crm416/static-functions
Throw an error when functions on `statics` clash due to duplicate keys
2014-08-27 11:36:53 -07:00
Julen Ruiz Aizpuru
ca66baee83 Docs: renamed input's state to message
Readers might feel confused with the actual input's `value` attribute.
2014-08-27 13:02:00 +02:00
Ben Alpert
f7c7676a98 Merge pull request #2083 from chenglou/docs-retina-icon
[Docs] Make retina react logo work
2014-08-24 23:19:41 -07:00
Cheng Lou
2920473ea1 [Docs] Make retina react logo work
Bourbon now takes *_2x instead of *@2x.
2014-08-23 18:09:20 -07:00
Charles Marsh
eb36b57079 Use warning module 2014-08-23 09:46:32 +08:00
Cheng Lou
174e67564c Merge pull request #2078 from michaelrp/patch-1
Including missing validation check
2014-08-22 11:36:47 -07:00
fisherwebdev
9fe36e591b [docs] remove redundant paragraph 2014-08-22 09:50:05 -07:00
fisherwebdev
149cadd664 [docs] fix nits 2014-08-22 09:46:34 -07:00
Michael Randers-Pehrson
c999785fa0 Adding e.preventDefault() to handleSubmit,
Also added plain `return`, updated text.
2014-08-22 08:27:23 -04:00
fisherwebdev
bc4d935cb0 [docs] Update Flux TodoMVC Tutorial 2014-08-22 02:21:04 -07:00
Charles Marsh
979a93a70a Removed monitorCodeUse call 2014-08-22 13:09:38 +08:00
Michael Randers-Pehrson
6c926094c3 Including missing validation check
The validation check was removed from the update to the CommentForm handleSubmit function.
2014-08-21 23:00:05 -04:00
Felix Gnass
942d358ace use attribute for media, srcSet and sizes 2014-08-22 00:37:32 +02:00
Charles Marsh
f01246d6bb Indentation for eventHandlerName 2014-08-21 09:13:35 +08:00
Cheng Lou
72e690ecfb Merge pull request #2037 from crm416/duplicate-key
More informative error message for mergeObjectsWithNoDuplicateKeys
2014-08-20 17:27:07 -07:00
Cheng Lou
b8ab95aaa7 Merge pull request #2054 from chenglou/accum
[RFC] Use `accumulateInto` to save even more allocation
2014-08-20 13:36:45 -07:00
Cheng Lou
48e901f8ae [RFC] Use accumulateInto to save even more allocation
Trying to make the event a bit more performant for events.

Feel free to reject this because the API inevitably isn't great. It's good for perf though, and since we're only using `accumulate` in very restrained places, I think we're fine.

`accumulateInto` is `accumulate` that mutates more and allocates less. I kept `accumulate` in case we want that in the future.
2014-08-20 13:10:50 -07:00
Paul O’Shannessy
ef47bb753c Merge pull request #2076 from whatasunnyday/master
Add example to if else in JSX.
2014-08-20 12:45:04 -07:00
Sunny Juneja
b9cf0d2bdd Add example to if else in JSX. 2014-08-20 12:29:21 -07:00
Paul O’Shannessy
4d9a2c4a29 Make npm run-script jest available
This is slightly shorter than typing `./node_modules/.bin/jest`.
2014-08-20 11:48:01 -07:00
Paul O’Shannessy
417678310c Update Object.assign polyfill
The spec changed to allow null & undefined sources without throwing.
Now our code depends on this new behavior. The only browser that
implements Object.assign has also updated its native implementation to
this behavior (Firefox Nightly).
2014-08-20 11:44:24 -07:00
IvanVergiliev
f627ddfb74 Add 2048-react to open-source demos
Nothing too complicated, but I think it could be a fun beginner demo.
2014-08-20 15:17:27 +03:00
Paul O’Shannessy
2058ad99be Sync out latest JSX transforms
The biggest change: instead of calling functions directly, we now use
React.createElement to wrap.

The other big change: this removes the need for the @jsx pragma.
Instead we'll parse everything, assume React is in scope,
and only look for the actual XJS parts in the AST (as opposed to only
runing the transform when @jsx was specified in the docblock).

Note: this is actually a series of commits internally and should have
been syned out in pieces over the past several weeks.
2014-08-20 00:27:38 -07:00
Sebastian Markbage
aae31ae24c ReactMount calls a legacy factory use createDescriptor instead
This fixes some log spew since this pattern is deprecated. This doesn't use
the validator in the descriptor creation so there's no prop type checks here.
I guess that's fine because we still have the second prop type checks.

We need to use ReactLegacyDescriptor because the constructor here will be a
legacy factory that we need to unwrap.

constructAndRenderComponent should be deprecated.
2014-08-20 00:15:43 -07:00
Sebastian Markbage
5c51f2fe46 Check if a function has a prototype first
Because somehow someone used a prototype less function with JSX.
2014-08-20 00:15:32 -07:00
Sebastian Markbage
68b7b82145 Start warning when calling a legacy factory
Let's start warning when a legacy factory is called as a plain function call.
2014-08-20 00:15:11 -07:00
Sebastian Markbage
989e6b618e Drop usage of plain functions to create descriptors
Replace plain function calls to legacy factories with createFactory or
createElement. For ReactDOMComponents the type should be replaced with
strings.

Because we don't have easy access to ReactLegacyDescriptor from within
React, we need to use the .type property to extract the real class.
This will go away later and is covered by unit tests.
2014-08-20 00:14:59 -07:00
Sebastian Markbage
c901b1005e Make createDescriptor return a descriptor for components
This moves all logic around legacy descriptors to ReactLegacyDescriptor. This
is responsible for the layer that knows that createClass exports a legacy
factory. When passed one of these classes, it unwraps it to be a real class.

If it is passed a non legacy factory, it is assumed to be a non-react component
that needs to be invoked as a plain function.

The semantic change is that a descriptor is now always returned if passed a
legacy factory. Even if that factory is a mock. A mock would previously return
undefined.

For mocks, I treat the factory as the authoritative function. I call it to extract
the instance or fill it with an empty component placeholder.

Additionally, I make the classes take props as the first argument to the
constructor. This is what the new class system will do.

We currently need to set up some internals by calling the internal construct
method. Instead of doing that automatically in the constructor, I now move that
to a second pass so that mocks can get the plain props.

This means that we can assert that a mock has been called once it's mounted
with it's final props. Instead of the descriptor factory being called.
2014-08-20 00:14:32 -07:00
Paul O’Shannessy
182379305a Update vendored modules 2014-08-20 00:14:28 -07:00
Cheng Lou
25c9d6d578 Merge pull request #2068 from ChrisSki/patch-1
Update 09.1-animation.md
2014-08-19 18:10:31 -07:00
Chris Sciolla
99ed64387d Update 09.1-animation.md 2014-08-19 20:59:13 -04:00
Charles Marsh
0ecc7e5a7f Look on __reactBoundContext for displayName 2014-08-20 08:44:33 +08:00
Chris Sciolla
65e1938708 Update 09.1-animation.md
The reason I chose to submit this is because it was initially unclear from the docs that the transition group needed to already be mounted in order for it to work properly.
2014-08-19 15:11:07 -04:00
Charles Marsh
cf45a40bb8 More info in monitorCodeUse call 2014-08-18 22:57:02 -04:00
Josh Duck
5b4e2be867 Iterate over expectedFeatures correctly
This fails if Array.prototype is extended.
2014-08-18 18:18:05 -07:00
Paul O’Shannessy
326be2faa6 Merge pull request #2053 from zpao/jsx-transformer-optional-sourcemaps
Don't force sourcemaps on for JSXTransformer APIs
2014-08-18 18:10:57 -07:00
Paul O’Shannessy
ea17506f6a Merge pull request #2062 from dmitriiabramov/patch-1
remove doubled whitespace chars in jsDoc
2014-08-18 16:54:06 -07:00
Paul O’Shannessy
32d3f79dc5 Upgrade Commoner
It no longer parses @providesModule directives by default.

Fixes #1145
2014-08-18 15:12:39 -07:00
Dmitrii Abramov
d50278997c remove doubled whitespace chars in jsDoc 2014-08-18 14:26:26 -07:00
Cheng Lou
a43d8c588b Fix bad merge from 04c9820694
Didn't sync out correctly.
2014-08-18 10:37:18 -07:00
Cheng Lou
196030aeb5 Merge pull request #2058 from chantastic/patch-2
docs(flux-todo-list): fix TodoStore syntax
2014-08-17 19:52:54 -07:00
Michael Chan
aaeb107e00 docs(flux-todo-list): fix TodoStore syntax
Add missing semicolon behind `TodoStore#addChangeListener'
2014-08-17 19:37:10 -07:00
Lee Byron
04c9820694 Merge pull request #1601 from gaearon/apply-component-and-mixin-spec-deterministically
Apply component and mixins specs deterministically
2014-08-15 18:08:03 -07:00
Paul O’Shannessy
d9a053d287 Don't force sourcemaps on for JSXTransformer APIs
In case somebody doesn't want sourcemaps (eg, react-rails) or r.js
2014-08-15 17:51:41 -07:00
Charles Marsh
429650a750 Test for both true and false 2014-08-15 19:47:36 -04:00
Charles Marsh
c5be746fda Fixed style and comment nits 2014-08-15 11:52:22 -04:00
Paul O’Shannessy
d970dc45d9 Merge pull request #1826 from syranide/jsxasync
JSXTransformer respects async attribute
2014-08-14 15:13:04 -07:00
Paul O’Shannessy
f479cffdbb Merge pull request #2042 from zpao/update-recast
Update recast to 0.6, update constants.js
2014-08-14 13:59:45 -07:00
Paul O’Shannessy
d7f21d760b Update recast to 0.6, update constants.js
I dropped the part of constants.js that we weren't using (namely the
part where we insert constants) but left it open to do that. It should
be trivial, we just aren't using it.

Fixes #1824
2014-08-14 11:14:20 -07:00
Charles Marsh
a195d3ea1f Re-add with warning and monitorCodeUse 2014-08-14 10:43:00 -04:00
Andreas Svensson
079400c2a6 JSXTransformer respects async attribute
Conflicts:
	vendor/browser-transforms.js
2014-08-14 10:00:27 +02:00
Charles Marsh
45f8b52135 Deprecate 'return false' in event handlers 2014-08-13 22:37:41 -04:00
Ben Alpert
5ca9e193ee Merge pull request #2038 from zpao/update-testutil-docs
TestUtils docs: isComponentOfType -> isDescriptorOfType
2014-08-13 19:29:16 -07:00
Paul O’Shannessy
aa959dcb97 TestUtils docs: isComponentOfType -> isDescriptorOfType
Fixes #1946
2014-08-13 19:23:47 -07:00
Charles Marsh
a70db003db Throw if a reserved property is defined in 'statics' 2014-08-13 21:34:49 -04:00
Paul O’Shannessy
5df9b90c3d Merge pull request #1832 from rayqian/master
Add chinese translation for 02-displaying-data.md
2014-08-13 17:38:44 -07:00
Paul O’Shannessy
d6f5ff0288 Merge pull request #1867 from WickyNilliams/patch-1
Add note about key prop being excluded by cloneWithProps
2014-08-13 17:36:48 -07:00
Paul O’Shannessy
f30e5b5a72 Merge pull request #2007 from janhancic/better-docs-for-select-multiple
Add a 'note' about passing arrays into the `value` attribute
2014-08-13 17:27:26 -07:00
Paul O’Shannessy
91cdd5af24 Merge pull request #2010 from nw/patch-1
Update ref-01-top-level-api.md
2014-08-13 17:26:51 -07:00
Ben Alpert
f982387c6e [docs] Move "| React" to end of OG title
For consistency!
2014-08-13 16:30:43 -07:00
Paul O’Shannessy
6d740448e2 [docs] Move "| React" to end of page title
Looks better in search results
2014-08-13 16:28:50 -07:00
Paul O’Shannessy
eb3ea3f2df Move batchedUpdated to React.addons
This is a followup to #1060, where I did not read closely enough before
merging.
2014-08-13 15:40:40 -07:00
Paul O’Shannessy
938bcbecd5 Merge pull request #1060 from spicyj/gh-906
Add React.batchedUpdates to public API
2014-08-13 15:37:43 -07:00
Paul O’Shannessy
ec6653aa56 Merge pull request #1952 from slorber/master
Update 09.2-form-input-binding-sugar.md -> document checkedLink
2014-08-13 15:32:27 -07:00
Charles Marsh
87607045e4 Abbreviated error message 2014-08-13 18:25:53 -04:00
Paul O’Shannessy
16dfaca66a Merge pull request #2035 from zpao/jekyll-update
[Docs] Update Jekyll + more
2014-08-13 15:23:37 -07:00
Charles Marsh
dcdc35fab6 More informative error message for mergeObjectsWithNoDuplicateKeys 2014-08-13 16:59:40 -04:00
Charles Marsh
71e49adf35 Throw an error when functions on statics clash due to duplicate keys 2014-08-13 16:33:57 -04:00
Karpich Dmitry
a185f09943 Add classid property for <object/> tag
This properties needed to work with ActiveX objects in IE, created by
<object/> tag.

Closes #1526
2014-08-13 13:28:19 -07:00
Paul O’Shannessy
fdf97f42f7 Update README to use bundle exec *
Also, referenced rake release task
2014-08-13 12:38:09 -07:00
Paul O’Shannessy
2cbf609856 Autogenerate acknowledgements 2014-08-13 12:38:09 -07:00
Paul O’Shannessy
51df0efe34 Use jekyll-redirect-from instead of our other redirect method 2014-08-13 12:38:09 -07:00
Paul O’Shannessy
4c7cd13ab3 Set default layout for docs 2014-08-13 11:40:14 -07:00
Paul O’Shannessy
03df215bd2 Default to layout: post for posts
Just a little less boilerplate. This also removes a bit of trailing
whitespace because it shouldn't have been there.
2014-08-13 11:37:19 -07:00
Paul O’Shannessy
b58b9d0b79 Update Bourbon files (4.0.2) 2014-08-13 11:20:00 -07:00
Paul O’Shannessy
8dbdd53e46 Reorder _config for sanity 2014-08-13 11:14:24 -07:00
Paul O’Shannessy
77fa3f35b5 Minimal updates for Jekyll 2.0 2014-08-13 11:10:40 -07:00
Paul O’Shannessy
ed27c89748 Merge pull request #2026 from spicyj/likely-a-bug-in-the-framework
Improve Danger error message to not blame React
2014-08-12 13:23:29 -07:00
Mike D Pilsbury
f035949e73 Add support for <dialog> tag.
fixes #2017
2014-08-12 19:58:10 +01:00
Ben Alpert
26aff787e7 Merge pull request #2028 from andrezsanchez/patch-1
Fix typo
2014-08-11 20:09:28 -07:00
Andre Z Sanchez
6f49827c12 Fix typo 2014-08-11 22:57:33 -04:00
Ben Alpert
e2ac2f326c Improve Danger error message to not blame React 2014-08-11 15:18:07 -07:00
Nathan White
c141a8581f changed type info. added descriptor to descriptions 2014-08-11 15:44:21 -06:00
Ben Alpert
13e60298e1 Merge pull request #2025 from zpao/rm-flux-todomvc
Remove TodoMVC flux example
2014-08-11 13:37:23 -07:00
Paul O’Shannessy
1033c4805f Remove TodoMVC flux example
It lives at https://github.com/facebook/flux/tree/master/examples/flux-todomvc now.
2014-08-11 13:02:12 -07:00
Ben Alpert
f7af58fa0c <noscript /> -> null in todomvc-flux Footer 2014-08-11 12:26:10 -07:00
Paul O’Shannessy
986f5a1a07 Merge pull request #1662 from gaearon/warn-when-using-hyphenated-style-names
Warn when using hyphenated style property names

Closes #1662

Conflicts:
	src/browser/ui/dom/CSSPropertyOperations.js
2014-08-11 10:18:08 -07:00
Paul O’Shannessy
0e5316f12f Merge pull request #2021 from adammark/patch-1
Close <section> tag in sample markup
2014-08-11 10:07:36 -07:00
Adam Mark
8642262aad Copy edit (fix grammar) 2014-08-11 12:19:08 -04:00
Adam Mark
77d7b4928e Close <section> tag in sample markup 2014-08-11 12:13:04 -04:00
Cheng Lou
82da739d9e Merge pull request #2018 from samselikoff/patch-2
Clarify section introducing callbacks
2014-08-10 13:59:20 -07:00
Sam Selikoff
90888debd0 Clarify section introducing callbacks 2014-08-10 16:47:06 -04:00
Cheng Lou
68930ad4a6 Merge pull request #2016 from samselikoff/patch-1
Clarify section introducing `props`
2014-08-09 17:54:15 -07:00
Sam Selikoff
255f238cee Clarify section introducing props 2014-08-09 19:24:40 -04:00
Paul O’Shannessy
c506b44173 Merge pull request #2000 from RReverser/stop-travis-on-docs
Cancelling Travis build on commits with docs updates only.
2014-08-08 13:25:23 -07:00
Nathan White
c53fb8f405 Update ref-01-top-level-api.md
Added docs for `React.isValidClass` and `React.isValidComponent`. 

Still missing top level api:

* `constructAndRenderComponent`
* `constructAndRenderComponentById`
* `withContext`
2014-08-07 12:09:45 -06:00
Jan Hancic
1db8756b8f Remove quotes around the value attribute 2014-08-07 09:22:46 +01:00
Jan Hancic
b25e4368bb Add ={true} so it's aligned with recommended practises 2014-08-07 08:10:55 +01:00
Josh Duck
f71455fb31 Fire onBeforeUpdate for space on Android
We deliberately skip the event, but Android Chrome
doesn't fire the keypress, so this is wrong.
2014-08-06 16:41:56 -07:00
Sebastian Markbage
036d751397 Add createElement alias for createDescriptor 2014-08-06 16:41:47 -07:00
Jan Hancic
b016400bb1 Add a 'note' about passing arrays into the value attribute
This is for #1700
2014-08-06 23:45:37 +01:00
Cheng Lou
aaa8a5ff50 Merge pull request #1990 from syranide/rmctest
Simplified and improved test-cases for ReactMultiChildText-test
2014-08-06 11:20:59 -07:00
Cheng Lou
12ab5e8345 Merge pull request #1974 from jstoja/jquery-tutorial
jQuery note in tutorial
2014-08-05 22:10:58 -07:00
Andreas Svensson
41d5cee44e Simplified and improved test-cases for ReactMultiChildText-test 2014-08-05 23:40:11 +02:00
Ingvar Stepanyan
233af7e2df Cancelling Travis build on commits with docs updates only.
Currently recognized patterns:

* any Markdown files (*.md)
* any files in docs or examples directories.

Closes facebook/react#1768.
2014-08-06 00:39:55 +03:00
Ben Alpert
e39a28c175 [docs] Add parens to defeat ASI in example
Fixes #1996.
2014-08-04 21:48:24 -07:00
Cheng Lou
2d250d44a5 Merge pull request #1993 from spicyj/devtools-warning-2
Slightly more considerate devtools warning
2014-08-04 14:25:16 -07:00
Ben Alpert
3045291417 Slightly more considerate devtools warning
See #953.
2014-08-04 11:16:51 -07:00
Ben Alpert
e2dad02ef2 Wording tweaks to reconciliation docs 2014-08-04 08:36:49 -07:00
Ben Alpert
716742dcd7 Merge pull request #1972 from cutbko/patch-1
Update ref-08-reconciliation.md
2014-08-04 08:35:22 -07:00
Julien Bordellier
46c0bbfb11 Using the markdown's quote syntax and explaining why use include jQuery 2014-08-04 10:42:55 +02:00
Christopher Chedeau
226f45b24d typo "refere" -> "reference" 2014-08-03 18:53:18 +02:00
Christopher Chedeau
5805ab17ed Merge pull request #1976 from vjeux/community_21
Community Roundup #21
2014-08-03 18:22:57 +02:00
Christopher Chedeau
ffef61e407 english + casing + 02 -> 03 2014-08-03 18:20:54 +02:00
Ben Alpert
320d72c735 Merge pull request #1985 from jimobrien/master
Fix typo in test utils documentation
2014-08-03 00:41:49 -07:00
Jim OBrien
0e7526e401 typo 2014-08-02 22:04:37 -07:00
Christopher Chedeau
cd25fe1ef3 Community Roundup #21 2014-08-02 14:44:57 +02:00
Julien Bordellier
5eca8d604f Adding a note just below the jQuery inclusion in the tutorial to inform that jQuery is not mandatory.
It's linked with #603
2014-08-02 11:32:31 +02:00
cutbko
d0494ac85c Update ref-08-reconciliation.md 2014-08-02 02:59:16 +03:00
Paul O’Shannessy
5d288deba5 Merge pull request #1956 from syranide/ffenter
Improve normalization of charCode, fix FF not reporting Enter
2014-07-31 15:11:09 -07:00
Andreas Svensson
b83076468d Improve normalization of charCode, fix FF not reporting Enter 2014-07-31 22:00:23 +02:00
Paul O’Shannessy
ab2406ffec Merge pull request #1885 from syranide/testinnerhtml
Use faster cached regexps for tests in setInnerHTML
2014-07-31 11:44:21 -07:00
Ben Alpert
3acb5f84b3 Merge pull request #1960 from julen/docs/setState
Docs: added note about setState() side-effects
2014-07-31 00:33:53 -07:00
Julen Ruiz Aizpuru
1219663e9a Docs: added note about setState() side-effects 2014-07-31 09:31:01 +02:00
Paul O’Shannessy
db6e07e87d Merge pull request #1827 from syranide/jsxstrict
JSXTransformer, stricter parsing of script type
2014-07-30 21:39:37 -07:00
Paul O’Shannessy
62a336f9ab Update CONTRIBUTING.md 2014-07-30 13:09:23 -07:00
Vjeux
aed0931f9a update background color for image 2014-07-30 21:09:17 +02:00
Vjeux
76c3d7c647 fix spurious ) 2014-07-30 21:09:17 +02:00
Vjeux
9f5403b18c Include image 2014-07-30 19:31:16 +02:00
Vjeux
10bcfdf1f7 Flux blog post about dispatcher 2014-07-30 19:12:21 +02:00
Paul O’Shannessy
61c8b2a6e8 Merge pull request #1961 from knuton/patch-1
Fix typo
2014-07-30 10:04:24 -07:00
Johannes Emerich
52143700e8 Fix typo 2014-07-30 15:38:19 +02:00
Sébastien Lorber
d0d15a3a3c Update 09.2-form-input-binding-sugar.md -> better checkedLink documentation 2014-07-30 11:17:38 +02:00
Paul O’Shannessy
590e5057bc Merge pull request #1759 from spicyj/gh-1698
Use setImmediate to defer value restoration
2014-07-29 20:15:59 -07:00
Paul O’Shannessy
0a1c5dad67 Merge pull request #1758 from spicyj/setimmediate
Add ReactUpdates.setImmediate for async callbacks
2014-07-29 20:15:31 -07:00
Paul O’Shannessy
45c719942e Merge pull request #1854 from syranide/floatfix
cssFloat is only accessible as styleFloat on IE8
2014-07-29 13:00:20 -07:00
Sébastien Lorber
b9a0c27914 Update 09.2-form-input-binding-sugar.md
Add better explanation for 2-way data binding to checkboxes using `checkedLink`. As mentionned here: https://github.com/facebook/react/issues/1930
2014-07-29 16:14:27 +02:00
Andreas Svensson
ffafae5cfe cssFloat is only accessible as styleFloat on IE8 2014-07-29 10:15:01 +02:00
Paul O’Shannessy
90df0ea8bd Merge pull request #1951 from JedWatson/patch-1
Adding "Tutorial" label to Flux Todo List nav item
2014-07-28 21:57:16 -07:00
Jed Watson
bfd0a53d3e Updating "Tutorial" label as per suggestion 2014-07-29 12:20:15 +10:00
Jed Watson
2e6ff6449b Adding "Tutorial" label to Flux Todo List nav item 2014-07-29 10:54:22 +10:00
Christopher Chedeau
2822d63df2 Rename "Ice Lab studio" to "Icelab" 2014-07-28 11:48:25 +02:00
Christopher Chedeau
ba76ba8d4b Merge pull request #1944 from shaneosullivan/patch-3
Fix small language nits
2014-07-28 11:46:55 +02:00
Ben Alpert
8cb2812cff Merge pull request #1941 from divad12/animating-one-or-zero-items-docs
Clarify animating one or zero items in animation docs
2014-07-27 16:05:24 -07:00
Shane O'Sullivan
460ca72abb Update 2014-07-28-community-roundup-20.md 2014-07-27 14:16:59 -07:00
Shane O'Sullivan
b606dac461 Fix small language nits 2014-07-27 13:44:47 -07:00
Ben Alpert
673e228af9 Merge pull request #1943 from shaneosullivan/patch-1
Fix typo for 'fundations'
2014-07-27 13:30:12 -07:00
Shane O'Sullivan
0c4b2728c8 Fix typo for 'fundations' 2014-07-27 13:29:12 -07:00
Ben Alpert
e30b60cc58 Wording tweaks to community roundup 2014-07-27 13:06:20 -07:00
Christopher Chedeau
88d0c81680 Merge pull request #1942 from LoukaN/roundup_20
Community Round-up #20
2014-07-27 14:19:55 +02:00
Vjeux
75ee7d05bb Community Round-up #20 2014-07-27 13:55:20 +02:00
David Hu
721f397303 Clarify animating one or zero items in docs
When I first read these docs, it was not immediately clear to me that I could
use `React.addons.CSSTransitionGroup` to animate a single item coming into view,
or an item replacing an item already there. This was partly due to the example
which rendered a list of items.

This PR adds a blurb about being able to use
`React.addons.CSSTransitionGroup` with one or zero items, provides a code
example, and adds a note blockquote that a `key` attribute must always be
provided on each child of `React.addons.CSSTransitionGroup`. The latter point
was not immediately obvious from the original `TodoList` code example, since it
renders a list which would normally require `key` attributes anyway.

Test Plan:
- Refreshed `http://localhost:4000/react/docs/animation.html`, saw that the
  docs additions rendered correctly.
- Example code not tested (it was extracted from working code).
2014-07-27 00:26:17 -07:00
Sebastian Markbage
c6b2687bbd Partially revert React.createDescriptor
We still have some issues to work out when the type argument is a mock.
2014-07-25 16:48:10 -07:00
Paul O’Shannessy
d526456951 Delete ImmutableObject-test.js
Our syncing doesn't update these tests so just remove them.
2014-07-25 16:47:48 -07:00
Cheng Lou
aed2d86e7b Merge pull request #1929 from zertosh/master
ReactTransitionChildMapping comment typo
2014-07-25 16:38:55 -07:00
Paul O’Shannessy
631705f31d v0.11.1 release materials, update to 0.11.0 release materials
* 0.11.1 blog post, changelog
* Update to 0.11.0 post, changelog
* Update version in site, add starter kit
2014-07-25 12:59:56 -07:00
andres suarez
1961fecf2d ReactTransitionChildMapping comment typo 2014-07-25 09:03:51 -04:00
Cheng Lou
af21aeb59f Merge pull request #1924 from spicyj/autobind-bind
Use .bind when autobinding
2014-07-25 01:34:15 -07:00
Paul O’Shannessy
eb8f766005 [docs] increase base font-weight
Closes #1926
2014-07-24 21:01:20 -07:00
Cheng Lou
7f584f3a49 Merge pull request #1511 from syranide/strsidefx
HAS_SIDE_EFFECTS should compare by type-casting
2014-07-24 13:38:01 -07:00
Paul O’Shannessy
f76d4dd48f Merge pull request #1770 from eins78/master
Also list <form> in error message as possible culprit
2014-07-24 12:53:19 -07:00
Ben Alpert
f1508c4937 Use .bind when autobinding
This eliminates all of the `boundMethod` frames from call stacks when debugging and as far as I know should behave the same otherwise.

Test Plan: jest
2014-07-24 12:11:19 -07:00
Andreas Svensson
3b94abcb3b HAS_SIDE_EFFECTS properties must compare as property type 2014-07-24 11:53:02 +02:00
Paul O’Shannessy
efdc5da097 Merge pull request #1903 from syranide/ie8nmlb
Remove empty TextNode left behind by IE8 setInnerHTML workaround
2014-07-23 18:40:35 -07:00
Cheng Lou
b0945b16cc Merge pull request #1560 from spicyj/simplify-lifecycle
Simplify composite lifecycle state
2014-07-23 18:02:39 -07:00
Andreas Svensson
8a135c0e75 Remove empty TextNode left behind by IE8 setInnerHTML workaround 2014-07-23 21:52:56 +02:00
Paul O’Shannessy
13e2c38a01 Merge pull request #1865 from syranide/modistatefalse
getModifierState should always return a boolean
2014-07-23 10:12:49 -07:00
Andreas Svensson
030071dd8b getModifierState should always return a boolean 2014-07-23 10:01:22 -07:00
Cheng Lou
79076fad9c Merge pull request #1774 from syranide/ie8focusthrow
Fix IE8 potentially throwing during restoreSelection
2014-07-22 16:29:07 -07:00
Paul O’Shannessy
6d02e04672 Merge pull request #1879 from syranide/modistatewrong
getModifierState incorrectly exposed as SyntheticMouseEvent.getEventModifierState
2014-07-22 15:50:15 -07:00
Paul O’Shannessy
2ba254af70 Merge pull request #1909 from zpao/move-react-source
Move react-source gem out of project root
2014-07-22 15:34:50 -07:00
Paul O’Shannessy
520c4f96d4 Move react-source gem out of project root
Now it requires a build step. At least the confusing lib directory is
gone though.
2014-07-21 22:56:32 -07:00
Ben Alpert
354fb44299 Use setImmediate to defer value restoration
Depends on #1758.

Fixes #1698.

Previously, controlled components would update too soon when using something like ReactLayeredComponentMixin (i.e., before the layer's updates could propagate from the parent), causing the cursor to jump even when always updating the new model value to match the DOM state. With this change, we defer the update until after all nested updates have had a chance to finish, which prevents the cursor from misbehaving.

Also cleaned up the logic around updating a bit -- the .value and .checked updates in ReactDOMInput weren't being relied on at all so I removed them and opted for a simple forceUpdate instead. I also got rid of _isChanging which hasn't been necessary since the introduction of update batching.

Test Plan: Tested the example in http://jsfiddle.net/Bobris/ZZtXn/2/ and verified that the cursor didn't jump. Changed the code to filter out numbers and verified that the field prevents typing numbers (attempting to do so still causes the cursor to jump to the end). Also verified that controlled and uncontrolled radio buttons, textareas, and select boxes work.
2014-07-21 22:42:18 -07:00
Ben Alpert
12b532c253 Add ReactUpdates.setImmediate for async callbacks
Callbacks passed to this setImmediate function are called at the end of the current update cycle, which is guaranteed to be asynchronous but in the same event loop (with the default batching strategy).

This is useful for new-style refs (#1373, #1554) and for fixing #1698.

Test Plan: jest
2014-07-21 22:41:00 -07:00
Paul O’Shannessy
520d73d73c Merge pull request #1908 from spicyj/simpler-server-willmount
Simpler way to prevent flushing updates on server
2014-07-21 21:42:07 -07:00
Ben Alpert
6259d88f03 Simpler way to prevent flushing updates on server
Test Plan: Only failing tests in jest are immutable tests that were already failing.
2014-07-21 17:25:52 -07:00
Paul O’Shannessy
04e341936c Include Object.assign polyfill
This isn't a good final solution but it makes React actually usable on
its own.

This also makes tests runnable, though only via jest
(./node_modules/.bin/jest)
2014-07-21 16:18:12 -07:00
Paul O’Shannessy
4bb7b70b28 Merge pull request #1892 from thauburger/patch-1
Remove _addPromise from Dispatcher code example
2014-07-21 15:55:41 -07:00
Cheng Lou
af72d9f37f Merge pull request #1891 from robarnold/patch-1
Fix small issue in ReactContext comment
2014-07-21 14:47:07 -07:00
WickyNilliams
ee325eb5d5 follow docs convention for notes 2014-07-21 17:11:40 +01:00
Cheng Lou
d210269985 Merge pull request #1882 from glenjamin/patch-1
Note how to access Perf in docs
2014-07-20 11:45:24 -07:00
Ben Alpert
76d2ebdf74 Merge pull request #1893 from chenglou/docs-bar
[Docs] Add recent addons to addons.html; tweak wording
2014-07-20 01:16:52 -07:00
Cheng Lou
d95a4ef983 [Docs] Add recent addons to addons.html; tweak wording
Add PureRenderMixin and Perf to this page. Also, I think it's better if the link titles reflect the name used by these addons.
2014-07-20 00:59:19 -07:00
Tom Hauburger
c94bb20cb8 Remove _addPromise from Dispatcher code example
`_addPromise` is not used in the provided Dispatcher example, nor does it exist in Dispatcher.js found here: https://github.com/facebook/react/blob/master/examples/todomvc-flux/js/dispatcher/Dispatcher.js
2014-07-19 19:52:33 -07:00
robarnold
83e5e9bedf Fix small issue in ReactContext comment
Noticed this the other day and meant to fix it.
2014-07-19 19:09:35 -07:00
Andreas Svensson
0efe8ca362 JSXTransformer, stricter parsing of script type 2014-07-20 01:20:30 +02:00
Ben Alpert
93712246c8 Reword sentence in reconciliation docs 2014-07-19 14:44:16 -07:00
Andreas Svensson
6950a8418c Use faster cached regexps for tests in setInnerHTML 2014-07-19 21:00:35 +02:00
Glen Mailer
83fd5583bf Note how to access Perf in docs 2014-07-19 16:14:27 +01:00
Andreas Svensson
6f0db65777 getModifierState incorrectly exposed as SyntheticMouseEvent.getEventModifierState 2014-07-19 10:44:11 +02:00
Sebastian Markbage
c419cce5c9 Move defaultProps resolution to the descriptor factory
Moves the defaultProps resolution to the descriptor factory.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
3a7dbe6b73 Deprecate transferPropsTo 2014-07-18 22:01:36 -07:00
Paul O'Shannessy
de711efcc9 When proxying statics functions, copy properties
Port of 076047012a which went in
externally before ReactLegacyDescriptor happened, so it needed to be
ported.
2014-07-18 22:01:36 -07:00
Ben Newman
23c5332208 Fix ReactTestUtils.mockComponent so that mockTagName is not ignored.
The `mockTagName` parameter was always optional, and so probably was not
used very often. If you tried to use it, it would be shadowed by the
`var mockTagName` declaration in the `render` method, so only
`module.mockTagName` or `"div"` were ever possible values.
2014-07-18 22:01:36 -07:00
Ben Newman
2347abf75c Don't call window.getSelection when it isn't defined.
Sadly, jsdom does not support `window.getSelection` yet, but
`ExecutionEnvironment.canUseDOM` is `true` in a jsdom environment.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
3818656f70 Use Object.assign in merge/mergeInto
Relax the argument type checks. Currently we throw for non-objects and terminals
but Object.assign does a coercion to Object instead. It also allows merging
Arrays as if they are objects.

This also relaxes the check for dependents such as ImmutableObject. This sucks
but it will allow us to use a fast code path to native Object.assign.

We always have the option of adding warnings to Object.assign or static type
checks.

I'm keeping the null check. Object.assign throws for null checks.

We'll also start returning the result of coercions just like Object.assign.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
225d76f772 Drop transferPropsTo usage in React core
These were completely unnecessary uses of transferPropsTo.
2014-07-18 22:01:36 -07:00
Ben Newman
66cdba3dfb Avoid leading spaces when first argument to joinClasses is falsy.
This detail is going to become more important once the idiom
`className={joinClasses(this.props.className, newClass)}` becomes more
common, as it will when we move away from `this.transferPropsTo`.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
5aab0bddaa Move key/ref off props and prepare for new descriptor factories
Breaking changes

- key/ref are no longer accessible on props but they are accessible on the
  descriptors. This means that parents/owners can access it but not the
  component itself.

- Descriptor factories are now plain functions and you can't rely on the
  prototype or constructors of descriptors to identify the component type.

Existing descriptor factories are now wrapped in a legacy factory. Currently it
does nothing but it will give us a hook to track callers to factories that are
not using JSX but just invoking the function directly. It also proxies static
methods/properties to the underlying class. The newer factories don't have this
feature.

ReactTextComponent has it's own little factory because it's props is not an
object. This is a detail and will go away once ReactTextComponent no longer
needs descriptors.
2014-07-18 22:01:36 -07:00
Paul O’Shannessy
06e6313a72 Merge pull request #1876 from petehunt/fix-jsxt2
Fix JSXTransformer
2014-07-18 20:07:49 -07:00
petehunt
e8efa2a1e9 Fix browser-tranforms 2014-07-18 19:02:31 -07:00
Paul O’Shannessy
9929f6de1e Merge pull request #1870 from spicyj/gh-1866
Don't initialize reconcile transaction on server
2014-07-18 16:40:03 -07:00
Paul O’Shannessy
8439deadd0 Merge pull request #1869 from syranide/modistatecase
getModifierState is case sensitive
2014-07-18 16:13:34 -07:00
Ben Alpert
54d91c293d Don't initialize reconcile transaction on server
...when calling setState from within a componentWillMount. Fixes #1866.

Test Plan: jest
2014-07-18 11:03:34 -07:00
Paul O’Shannessy
f367785a78 Merge pull request #1837 from garrensmith/update-todo-example
Update Todo MVC example
2014-07-18 10:56:21 -07:00
Andreas Svensson
495d866a66 getModifierState is case sensitive 2014-07-18 18:24:11 +02:00
Nick Williams
48006b0e63 Add note about key prop being excluded by cloneWithProps
Whilst this is intentional behaviour (see #1274), it is not documented anywhere, so it is worth mentioning.

It would also be nice if React issued a warning to console if a cloned component loses its key (as this will silently break reconciliation?)
2014-07-18 16:14:55 +01:00
Garren Smith
0c4be5a8f9 Update Todo MVC example
A small patch for the Todo MVC example to use React 0.11.0.
This then allows the `MainSection` to return `null` instead of
previous `<noscript/>`.
2014-07-18 10:51:43 +02:00
James Seppi
6d1ede34df fix typo
Closes #1859.
2014-07-17 15:58:33 -07:00
Ben Alpert
9698b54dfe Merge pull request #1860 from KyleAMathews/patch-3
Not a candidate anymore
2014-07-17 15:22:04 -07:00
Ben Alpert
384e8fe195 Fix appearance of video thumbnail 2014-07-17 15:19:58 -07:00
Kyle Mathews
bd5e8aa076 Update 2014-07-17-react-v0.11.md 2014-07-17 15:18:41 -07:00
Ben Alpert
d39b8078a3 Merge pull request #1835 from amm385/patch-1
Update videos.md
2014-07-17 15:15:11 -07:00
Paul O’Shannessy
5bfee601ce Bump version for 0.12.0-alpha
[skip ci]
2014-07-17 14:22:50 -07:00
Paul O’Shannessy
8814ee2065 Release materials for 0.11 2014-07-17 14:18:28 -07:00
Felix Gnass
5f56f4ac36 add picture to xjs.knownTags 2014-07-16 19:57:19 +02:00
Felix Gnass
33bd509737 add picture element and related attributes 2014-07-16 13:19:55 +02:00
Areeb Malik
28ed79c2ce Update videos.md
reordering to spot #4
2014-07-14 17:31:56 -07:00
Areeb Malik
afe30ad8ee Update videos.md
Adding video for my recent talk in London about using React in large scale applications
2014-07-14 17:16:44 -07:00
Andreas Svensson
f8ccc2186f Fix IE8 potentially throwing during restoreSelection 2014-07-14 21:07:56 +02:00
Ray
bea24ca944 fix some translation bug 2014-07-14 20:25:07 +08:00
Ray
8758addb41 add translation for 02-displaying-data.md and change next link in 01-why-react.zh-CN.md 2014-07-14 20:13:33 +08:00
Max F. Albrecht
bcea3bee45 Also list <form> in error message as possible culprit 2014-07-08 14:08:17 +02:00
Ben Alpert
cb20dec85f Simplify composite lifecycle state
We now forbid calling setState or forceUpdate if any component's render function is higher in the stack, not just the component you're trying to update. (We do this already now for React.renderComponent and React.unmountComponentAtNode.)

This also has the advantage that we can now remove CompositeLifeCycle.RECEIVING_STATE, making _compositeLifeCycleState easier to reason about (not to mention that RECEIVING_STATE was a confusing name) and making it possible to remove a try/finally from the render path which might help with perf.
2014-06-28 01:04:04 -07:00
Dan Abramov
e625b8b234 Warn when using hyphenated style property names 2014-06-24 13:05:52 +04:00
Dan Abramov
367c88e399 Apply component and mixins specs deterministically
Fixes #1589.
2014-05-26 02:56:28 +04:00
Mark IJbema
59616672d7 Make sure it works when we have no css transitions 2014-05-18 11:31:24 +02:00
Mark IJbema
cd7b8aa0b1 Added event parameter 2014-05-18 11:29:29 +02:00
Andreas Svensson
3bec9f070f Guard against contentEditable with children props 2014-05-15 11:08:25 +02:00
Ben Alpert
7fb7e95108 Add React.batchedUpdates to public API
Fixes #906.
2014-04-16 15:59:54 -07:00
Mark IJbema
89a2157914 Only stop if the transition on this element ended
This way it doesn't end when some random element elsewhere on the page has an ending transition.

It must be noted that this is not a complete fix. If you have multiple transitions on the element, it still ends when the first ends.

I ran into this not working (the transition ends almost immediately, because some unrelated transition ends). This fixes it for me, but I was wondering whether this cornercase was considered, and whether the other cornercase (multiple transitions) was considered.

I think it's very hard to get this correct, and think it might be better to make the timeout explicit, or at least allow to set it explicit, and fall back to this behaviour. But I'm really interested in feedback on this one.
2014-03-25 15:02:12 +01:00
749 changed files with 61294 additions and 17664 deletions

21
.eslintignore Normal file
View File

@@ -0,0 +1,21 @@
# We can probably lint these later but not important at this point
src/vendor
# eslint uses JSX* node types to determine if using JSX. esprima-fb still uses
# XJS* nodes. When we fix that (https://github.com/facebook/esprima/pull/85) we
# can enable linting the tests and fix those errors.
src/**/__tests__/**
# This should be enabled but that folder has too much in it that doesn't belong
src/test
test/the-files-to-test.generated.js
# This is synced with a different file internally, don't want to lint it yet
vendor/fbtransform/syntax.js
vendor/jasmine/
vendor/jasmine-jsreporter/
# But not in docs/_js/examples/*
docs/_js/*.js
docs/js/
# gems
docs/vendor/bundle/
# This should be more like examples/**/thirdparty/** but
# we should fix https://github.com/facebook/esprima/pull/85 first
examples/

51
.eslintrc Normal file
View File

@@ -0,0 +1,51 @@
---
parser: esprima-fb
env:
browser: true
node: true
globals:
__DEV__: true
rules:
# ERRORS
space-before-blocks: 2
indent: [2, 2, indentSwitchCase: true]
brace-style: 2
space-after-keywords: 2
strict: 2
# We actually have a transform to support this and we fix this for bundled
# releases but not for the npm package, so enforce it strictly
no-comma-dangle: 2
# Make this a warning for now. We do this in a few places so we might need to
# disable
no-unused-expressions: 2
block-scoped-var: 2
eol-last: 2
dot-notation: 2
consistent-return: 2
no-unused-vars: [2, args: none]
quotes: [2, 'single']
# WARNINGS
# This is the only one that's hard to track since we don't lint just changes.
max-len: [1, 80]
# WISHLIST. One day...
# We'll need a custom version of this that does a subset of the whole rule.
# Otherwise this is just too noisy.
# valid-jsdoc: 1
# DISABLED. These aren't compatible with our style
# We use this for private/internal variables
no-underscore-dangle: 0
# We pass constructors around / access them from members
new-cap: 0
# We do this a lot.
no-use-before-define: 0
# We do this in a few places to align values
key-spacing: 0
# DISABLED. These currently cause errors when running.
no-multi-spaces: 0

2
.gitignore vendored
View File

@@ -9,11 +9,13 @@ __benchmarks__
build/
.module-cache
*.gem
docs/.bundle
docs/code
docs/_site
docs/.sass-cache
docs/js/*
docs/downloads
docs/vendor/bundle
examples/shared/*.js
test/the-files-to-test.generated.js
*.log*

View File

@@ -1,21 +0,0 @@
{
"node": true,
"boss": true,
"curly": true,
"devel": true,
"eqnull": true,
"expr": true,
"funcscope": true,
"globalstrict": true,
"loopfunc": true,
"newcap": false,
"noempty": true,
"nonstandard": true,
"onecase": true,
"sub": true,
"regexdash": true,
"trailing": true,
"undef": true,
"unused": "vars"
}

View File

@@ -1,6 +1,13 @@
Alex Mykyta <dancingwithcows@gmail.com>
Andreas Svensson <andreas@syranide.com>
Andres Suarez <zertosh@gmail.com>
Ben Alpert <ben@benalpert.com> <balpert@fb.com>
Ben Alpert <ben@benalpert.com> <spicyjalapeno@gmail.com>
Ben Newman <bn@cs.stanford.edu> <benjamn@fb.com>
Bill Fisher <fisherwebdev@gmail.com>
Brandon Tilley <brandon@brandontilley.com>
Cheng Lou <chenglou92@gmail.com> <chenglou@fb.com>
Christian Oliff <christianoliff@yahoo.com>
Christoph Pojer <christoph.pojer@gmail.com>
Christoph Pojer <christoph.pojer@gmail.com> <cpojer@fb.com>
Connor McSheffrey <c@conr.me> <connor.mcsheffrey@gmail.com>
@@ -12,31 +19,42 @@ Evan Coonrod <evan@paloalto.com>
Fabio M. Costa <fabiomcosta@gmail.com> <fabs@fb.com>
Felix Kling <felix.kling@gmx.net> <fkling@fb.com>
François-Xavier Bois <fxbois@gmail.com>
Gabe Levi <gabelevi@gmail.com> <glevi@fb.com>
Geert Pasteels <geert.pasteels@gmail.com>
George A Sisco III <george.sisco@gmail.com>
Harry Hull <harry.hull1@gmail.com>
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
Ian Obermiller <ian@obermillers.com> <iano@fb.com>
Ingvar Stepanyan <me@rreverser.com> <rreverser@ubuntu.rreverser.a4.internal.cloudapp.net>
Irae Carvalho <irae@irae.pro.br>
Ivan Vergiliev <ivan.vergiliev@gmail.com>
Jaime Mingo <j.mingov@3boll.com>
James Brantly <james@jbrantly.com>
Jan Hancic <jan.hancic@gmail.com> <jan.hancic@caplin.com>
Jan Kassens <jan@kassens.net> <jkassens@fb.com>
Jason Bonta <jbonta@gmail.com> <jasonbonta@fb.com>
Jason Trill <jason@jasontrill.com>
Jeff Morrison <jeff@anafx.com> <Jeff@anafx.com>
Jeff Morrison <jeff@anafx.com> <jeffmo@fb.com>
Jeff Morrison <jeff@anafx.com> <lbljeffmo@gmail.com>
Jeffrey Lin <lin.jeffrey@gmail.com> <jeffreylin@fb.com>
Jim Sproch <jsproch@fb.com>
Jim Sproch <jsproch@fb.com> <jsfb@github>
Jon Madison <jon@tfftech.com>
Jonathan Hsu <jhiswin@gmail.com>
Jordan Walke <jordojw@gmail.com>
Jordan Walke <jordojw@gmail.com> <jordanjcw@fb.com>
Josh Duck <josh@fb.com> <github@joshduck.com>
Juan Serrano <germ13@users.noreply.github.com>
Jun Wu <quark@lihdd.net>
Keito Uchiyama <projects@keito.me> <keito@fb.com>
Kunal Mehta <k.mehta@berkeley.edu> <kunalm@fb.com>
Laurence Rowe <l@lrowe.co.uk> <laurence@lrowe.co.uk>
Martin Andert <mandert@gmail.com>
Mathieu M-Gosselin <mathieumg@gmail.com> <mathieumg@atx33.com>
Matt Zabriskie <mzabriskie@gmail.com>
Michal Srb <xixixao@seznam.cz> xixixao <xixixao@seznam.cz>
Minwe LUO <minwe@yunshipei.com>
Nick Gavalas <njg57@cornell.edu>
Nick Thompson <ncthom91@gmail.com> <nickt@instagram.com>
Paul OShannessy <paul@oshannessy.com> <poshannessy@fb.com>
@@ -48,15 +66,24 @@ Pete Hunt <floydophone@gmail.com> <phunt@instagram.com>
Petri Lievonen <plievone@cc.hut.fi>
Petri Lievonen <plievone@cc.hut.fi> <petri.lievonen@tkk.fi>
Pieter Vanderwerff <me@pieter.io> <pieter@heyday.co.nz>
Pouja Nikray <poujanik@gmail.com>
Ray <ray@tomo.im>
Richard Feldman <richard.t.feldman@gmail.com> <richard@noredink.com>
Richard Livesey <Livesey7@hotmail.co.uk>
Rob Arnold <robarnold@cs.cmu.edu>
Sander Spies <sandermail@gmail.com>
Scott Feeney <scott@oceanbase.org> <smf@fb.com>
Sebastian Markbåge <sebastian@calyptus.eu> <sema@fb.com>
Sergey Rubanov <chi187@gmail.com>
Steven Luscher <react@steveluscher.com> <github@steveluscher.com>
Steven Luscher <react@steveluscher.com> <steveluscher@instagram.com>
Steven Luscher <react@steveluscher.com> <steveluscher@users.noreply.github.com>
Stoyan Stefanov <ssttoo@ymail.com>
Thomas Aylott <oblivious@subtlegradient.com> <aylott@fb.com>
Timothy Yung <yungsters@gmail.com> <yungsters@fb.com>
Vjeux <vjeuxx@gmail.com>
Vjeux <vjeuxx@gmail.com> <vjeux@fb.com>
Volkan Unsal <spocksplanet@gmail.com>
YouBao Nong <noyobo@gmail.com> <nongyoubao@alibaba-inc.com>
Zach Bruggeman <mail@bruggie.com> <zbruggeman@me.com>
张敏 <cookfront@gmail.com>

View File

@@ -2,12 +2,48 @@
language: node_js
node_js:
- '0.10'
sudo: false
cache:
directories:
- docs/vendor/bundle
- node_modules
before_install:
- |
if [ "$TEST_TYPE" != build_website ] && \
! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/'
then
echo "Only docs were updated, stopping build process."
exit
fi
script:
- |
grunt $TEST_TYPE
if [ "$TEST_TYPE" = build_website ]; then
if [ "$TRAVIS_BRANCH" = "$REACT_WEBSITE_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
set -e
GH_PAGES_DIR="$TRAVIS_BUILD_DIR"/../react-gh-pages
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
git config --global user.name "Travis CI"
git config --global user.email "travis@reactjs.org"
git clone --branch gh-pages --depth=50 \
https://reactjs-bot@github.com/facebook/react.git \
$GH_PAGES_DIR
pushd docs
bundle install --jobs=3 --retry=3 --path=vendor/bundle
bundle exec rake release
cd $GH_PAGES_DIR
git status
if ! git diff-index --quiet HEAD --; then
git add -A .
git commit -m "Rebuild website"
git push origin gh-pages
fi
popd
fi
else
grunt $TEST_TYPE
fi
after_script:
- |
if [ "$TEST_TYPE" = test ] && [ "$SERVER" ]; then
@@ -30,17 +66,20 @@ after_script:
env:
matrix:
- TEST_TYPE=test
- TEST_TYPE=jest
- TEST_TYPE=lint
- TEST_TYPE=build_website
- TEST_TYPE=test:webdriver:saucelabs:modern
global:
# SERVER
- secure: qPvsJ46XzGrdIuPA70b55xQNGF8jcK7N1LN5CCQYYocXLa+fBrl+fTE77QvehOPhqwJXcj6kOxI+sY0KrVwV7gmq2XY2HZGWUSCxTN0SZlNIzqPA80Y7G/yOjA4PUt8LKgP+8tptyhTAY56qf+hgW8BoLiKOdztYF2p+3zXOLuA=
# SECRET_TOKEN
- secure: dkpPW+VnoqC/okhRdV90m36NcyBFhcwEKL3bNFExAwi0dXnFao8RoFlvnwiPlA23h2faROkMIetXlti6Aju08BgUFV+f9aL6vLyU7gUent4Nd3413zf2fwDtXIWIETg6uLnOpSykGKgCAT/hY3Q2oPLqOoY0OxfgnbqwxkxljrE=
# GITHUB_TOKEN
- secure: EHCyCSKMwKlLHNtcj9nmkRzmiiPE3aDGlPcnEyrDJeRI0SeN/iCXHXfFivR0vFq3vr+9naMBczAR2AEidtps5KbJrKqdZnjPFRbmfVtzWr/LlvVCub3u13Pub6TdKIVBTny1PuZ5X8GvdxMNVig89jGjvzhhWuQRaz3VhJnTra4=
matrix:
fast_finish: true
allow_failures:
- env: TEST_TYPE=lint
- env: TEST_TYPE=test:coverage
- env: TEST_TYPE=perf:full
- env: TEST_TYPE=test:webdriver:saucelabs:modern

169
AUTHORS
View File

@@ -1,46 +1,91 @@
Aaron Franks <aaron.franks@gmail.com>
Adam Krebs <amk528@cs.nyu.edu>
Adam Mark <adammark75@gmail.com>
Adam Solove <asolove@gmail.com>
Alan deLevie <adelevie@gmail.com>
Alex Boyd <alex@opengroove.org>
Alex Mykyta <dancingwithcows@gmail.com>
Alex Zelenskiy <azelenskiy@fb.com>
Alexander Solovyov <alexander@solovyov.net>
Alexander Tseung <alextsg@gmail.com>
Alexandre Gaudencio <shahor@shahor.fr>
Alexey Raspopov <avenger7x13@gmail.com>
Alexey Shamrin <shamrin@gmail.com>
Andre Z Sanchez <andrezacsanchez@gmail.com>
Andreas Svensson <andreas@syranide.com>
Andres Suarez <zertosh@gmail.com>
Andrew Cobby <cobbweb@users.noreply.github.com>
Andrew Davey <andrew@equin.co.uk>
Andrew Rasmussen <andras@fb.com>
Andrew Zich <azich@fb.com>
Andrey Popp <8mayday@gmail.com>
Anthony van der Hoorn <anthony.vanderhoorn@gmail.com>
Antti Ahti <antti.ahti@gmail.com>
Areeb Malik <areeb.malik91@gmail.com>
Aria Buckles <aria@khanacademy.org>
Artem Nezvigin <artem@artnez.com>
Ayman Osman <aymano.osman@gmail.com>
Ben Alpert <spicyjalapeno@gmail.com>
Bartosz Kaszubowski <gosimek@gmail.com>
Beau Smith <beau@beausmith.com>
Ben Alpert <ben@benalpert.com>
Ben Foxall <benfoxall@gmail.com>
Ben Newman <bn@cs.stanford.edu>
Ben Ripkens <bripkens.dev@gmail.com>
Benjamin Keen <ben.keen@gmail.com>
Benjamin Leiken <benleiken@gmail.com>
Bill Fisher <fisherwebdev@gmail.com>
Blaine Hatab <jbhatab@gmail.com>
Bob Eagan <bob@synapsestudios.com>
Bob Ralian <bob.ralian@gmail.com>
Bojan Mihelac <bmihelac@mihelac.org>
Brandon Bloom <brandon@brandonbloom.name>
Brandon Tilley <brandon@brandontilley.com>
Brian Cooke <bri@bricooke.com>
Brian Holt <btholt@gmail.com>
Brian Hsu <brianhsu@Brians-MacBook-Pro.local>
Brian Kim <briankimpossible@gmail.com>
Brian Kung <brian@callmekung.com>
Brian Reavis <brian@thirdroute.com>
Brian Rue <brian@rollbar.com>
Bruno Škvorc <bruno@skvorc.me>
Cam Song <neosoyn@gmail.com>
Cam Spiers <camspiers@gmail.com>
Cassus Adam Banko <banko.adam@gmail.com>
Cat Chen <catchen@fb.com>
Cedric Sohrauer <cedric.sohrauer@infopark.de>
Charles Marsh <charlie@khanacademy.org>
Cheng Lou <chenglou92@gmail.com>
Chitharanjan Das <das.chitharanjan@gmail.com>
Chris Sciolla <csciolla1@gmail.com>
Christian <christianoliff@yahoo.com>
Christian Alfoni <christianalfoni@gmail.com>
Christian Roman <chroman16@gmail.com>
Christoph Pojer <christoph.pojer@gmail.com>
Christopher Monsanto <chris@monsan.to>
Clay Allsopp <clay.allsopp@gmail.com>
Connor McSheffrey <c@conr.me>
Cotton Hou <himcotton@gmail.com>
Dan Abramov <dan.abramov@gmail.com>
Dan Fox <iamdanfox@gmail.com>
Dan Schafer <dschafer@fb.com>
Daniel Carlsson <daniel.carlsson.1987@gmail.com>
Daniel Gasienica <daniel@gasienica.ch>
Daniel Lo Nigro <daniel@dan.cx>
Daniel Mané <danmane@gmail.com>
Daniel Miladinov <dmiladinov@wingspan.com>
Daniel Schonfeld <daniel@schonfeld.org>
Danny Ben-David <dannybd@fb.com>
Daryl Lau <daryl@weak.io>
David Hellsing <david@aino.se>
David Hu <davidhu91@gmail.com>
Denis Sokolov <denis@sokolov.cc>
Dennis Johnson <djohnson@rallydev.com>
Devon Blandin <dblandin@gmail.com>
Dmitrii Abramov <dmitrii@rheia.us>
Dmitry Mazuro <dmitry.mazuro@icloud.com>
Dustan Kasten <dustan.kasten@gmail.com>
Dustin Getz <dgetz@wingspan.com>
Dylan Harrington <dylanharrington@gmail.com>
Enguerran <engcolson@gmail.com>
Eric Clemmons <eric@smarterspam.com>
Eric Florenzano <floguy@gmail.com>
@@ -48,49 +93,77 @@ Eric Schoffstall <contra@wearefractal.com>
Evan Coonrod <evan@paloalto.com>
Fabio M. Costa <fabiomcosta@gmail.com>
Felipe Oliveira Carvalho <felipekde@gmail.com>
Felix Gnass <fgnass@gmail.com>
Felix Kling <felix.kling@gmx.net>
Fernando Correia <fernando@servicero.com>
François-Xavier Bois <fxbois@gmail.com>
Fred Zhao <fredz@fb.com>
G Scott Olson <gscottolson@gmail.com>
G. Kay Lee <balancetraveller+github@gmail.com>
Gabe Levi <gabelevi@gmail.com>
Garren Smith <garren.smith@gmail.com>
Geert Pasteels <geert.pasteels@gmail.com>
Geert-Jan Brits <gbrits@gmail.com>
George A Sisco III <george.sisco@gmail.com>
Gilbert <gilbertbgarza@gmail.com>
Glen Mailer <glenjamin@gmail.com>
Greg Hurrell <glh@fb.com>
Greg Roodt <groodt@gmail.com>
Guangqiang Dong <gqdong@fb.com>
Guido Bouman <m@guido.vc>
Harry Hull <harry.hull1@gmail.com>
Harry Marr <harry.marr@gmail.com>
Harry Moreno <morenoh149@gmail.com>
Harshad Sabne <harshadsabne@users.noreply.github.com>
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
Henry Zhu <hi@henryzoo.com>
Hou Chia <kchia87@gmail.com>
Hugo Jobling <me@thisishugo.com>
Ian Obermiller <iano@fb.com>
Héliton Nordt <hnordt@hnordt.com>
Ian Obermiller <ian@obermillers.com>
Ingvar Stepanyan <me@rreverser.com>
Irae Carvalho <irae@irae.pro.br>
Isaac Salier-Hellendag <isaac@fb.com>
Ivan Kozik <ivan@ludios.org>
Ivan Krechetov <ikr@ikr.su>
Ivan Vergiliev <ivan.vergiliev@gmail.com>
Jacob Gable <jacob.gable@gmail.com>
Jacob Greenleaf <jake@imgur.com>
Jaime Mingo <j.mingov@3boll.com>
Jakub Malinowski <jakubmal@gmail.com>
James Brantly <james@jbrantly.com>
James Ide <ide@fb.com>
James Seppi <james.seppi@gmail.com>
Jamie Wong <jamie.lf.wong@gmail.com>
Jamison Dance <jergason@gmail.com>
Jan Hancic <jan.hancic@gmail.com>
Jan Kassens <jan@kassens.net>
Jared Forsyth <jared@jaredforsyth.com>
Jason Bonta <jbonta@gmail.com>
Jason Ly <jason.ly@gmail.com>
Jason Trill <jason@jasontrill.com>
Jean Lauliac <lauliacj@gmail.com>
Jed Watson <jed.watson@me.com>
Jeff Barczewski <jeff.barczewski@gmail.com>
Jeff Carpenter <gcarpenterv@gmail.com>
Jeff Chan <jefftchan@gmail.com>
Jeff Kolesky <github@kolesky.com>
Jeff Morrison <jeff@anafx.com>
Jeff Welch <whatthejeff@gmail.com>
Jeffrey Lin <lin.jeffrey@gmail.com>
Jesse Skinner <jesse@thefutureoftheweb.com>
Jignesh Kakadiya <jigneshhk1992@gmail.com>
Jim OBrien <jimobrien930@gmail.com>
Jim Sproch <jsproch@fb.com>
Jimmy Jea <jimjea@gmail.com>
Jing Chen <jingc@fb.com>
Joel Auterson <joel.auterson@googlemail.com>
Johannes Baiter <johannes.baiter@gmail.com>
Johannes Emerich <johannes@emerich.de>
John Heroy <johnheroy@users.noreply.github.com>
John Watson <jwatson@fb.com>
Jon Beebe <jon.beebe@daveramsey.com>
Jon Madison <jon@tfftech.com>
Jonas Enlund <jonas.enlund@gmail.com>
Jonas Gebhardt <jonas@instagram.com>
Jonathan Hsu <jhiswin@gmail.com>
@@ -98,17 +171,29 @@ Jordan Walke <jordojw@gmail.com>
Josh Bassett <josh.bassett@gmail.com>
Josh Duck <josh@fb.com>
Josh Yudaken <yud@instagram.com>
Joshua Goldberg <jsgoldberg90@gmail.com>
Joshua Ma <me@joshma.com>
João Valente <filipevalente@gmail.com>
Juan Serrano <germ13@users.noreply.github.com>
Julen Ruiz Aizpuru <julenx@gmail.com>
Julien Bordellier <git@julienbordellier.com>
Jun Wu <quark@lihdd.net>
Juraj Dudak <jdudak@fb.com>
Justin Jaffray <justinjaffray@khanacademy.org>
Justin Woo <moomoowoo@gmail.com>
Karl Mikkelsen <karl@kingkarl.com>
Karpich Dmitry <karpich@gollard.ru>
Keito Uchiyama <projects@keito.me>
Kevin Old <kevin@kevinold.com>
Kirk Steven Hansen <hanski07@kirk-hansens-macbook.local>
Kit Randel <kit@nocturne.net.nz>
Kunal Mehta <k.mehta@berkeley.edu>
Kurt Ruppel <me@kurtruppel.com>
Kyle Mathews <mathews.kyle@gmail.com>
Laurence Rowe <l@lrowe.co.uk>
Lee Byron <lee@leebyron.com>
Lei <tendant@gmail.com>
Leon Fedotov <LeonFedotov@users.noreply.github.com>
Levi McCallum <levi@levimccallum.com>
Lily <qvang.j@gmail.com>
Logan Allen <loganfynne@gmail.com>
@@ -116,63 +201,143 @@ Luigy Leon <luichi.19@gmail.com>
Marcin Kwiatkowski <marcin.kwiatkowski@hotmail.com>
Marcin Szczepanski <marcins@gmail.com>
Mariano Desanze <protronm@gmail.com>
Mark Anderson <undernewmanagement@users.noreply.github.com>
Mark Funk <mark@boomtownroi.com>
Mark Hintz <markohintz@gmail.com>
Mark IJbema <markijbema@gmail.com>
Mark Richardson <echo@fb.com>
Marlon Landaverde <milanlandaverde@gmail.com>
Marshall Roch <mroch@fb.com>
Martin Andert <mandert@gmail.com>
Martin Jul <martin@mjul.com>
Martin Konicek <mkonicek@fb.com>
Mathieu M-Gosselin <mathieumg@gmail.com>
Matias Singers <mail@matiassingers.com>
Matt Harrison <mt.harrison86@gmail.com>
Matt Huggins <matt.huggins@gmail.com>
Matt Zabriskie <mzabriskie@gmail.com>
Matthew Dapena-Tretter <m@tthewwithanm.com>
Matthew Johnston <matthewjohnston4@users.noreply.github.com>
Matti Nelimarkka <matti.nelimarkka@hiit.fi>
Max F. Albrecht <1@178.is>
Michael Chan <mijoch@gmail.com>
Michael Randers-Pehrson <michael.rp@gmail.com>
Michal Srb <xixixao@seznam.cz>
Michelle Todd <himichelletodd@gmail.com>
Mihai Parparita <mihai.parparita@gmail.com>
Mike D Pilsbury <mike.pilsbury@gmail.com>
Minwe LUO <minwe@yunshipei.com>
Miorel Palii <miorel@fb.com>
Mouad Debbar <mdebbar@fb.com>
Nadeesha Cabral <nadeesha.cabral@gmail.com>
Naman Goel <naman34@gmail.com>
Nate Hunzaker <nate.hunzaker@gmail.com>
Nathan White <nw@nwhite.net>
Nicholas Bergson-Shilcock <me@nicholasbs.net>
Nick Fitzgerald <fitzgen@gmail.com>
Nick Gavalas <njg57@cornell.edu>
Nick Merwin <nick@lemurheavy.com>
Nick Raienko <enaqxx@gmail.com>
Nick Thompson <ncthom91@gmail.com>
Nick Williams <WickyNilliams@users.noreply.github.com>
Niklas Boström <nbostrom@gmail.com>
Oiva Eskola <oiva.eskola@gmail.com>
Oleg <o.yanchinskiy@gmail.com>
Oleksii Markhovskyi <olexiy.markhovsky@gmail.com>
Oliver Zeigermann <oliver.zeigermann@gmail.com>
Owen Coutts <owenc@fb.com>
Pablo Lacerda de Miranda <pablolm@yahoo-inc.com>
Pascal Hartig <passy@twitter.com>
Patrick Laughlin <patrick@laughl.info>
Paul OShannessy <paul@oshannessy.com>
Paul Seiffert <paul.seiffert@gmail.com>
Paul Shen <paul@mnml0.com>
Pedro Nauck <pedronauck@gmail.com>
Pete Hunt <floydophone@gmail.com>
Peter Blazejewicz <peter.blazejewicz@gmail.com>
Peter Cottle <pcottle@fb.com>
Peter Jaros <peter.a.jaros@gmail.com>
Petri Lehtinen <petri@digip.org>
Petri Lievonen <plievone@cc.hut.fi>
Pieter Vanderwerff <me@pieter.io>
Pouja Nikray <poujanik@gmail.com>
Preston Parry <ClimbsRocks@users.noreply.github.com>
Rafael <rafael.garcia@clever.com>
Rafal Dittwald <rafal.dittwald@gmail.com>
Rajiv Tirumalareddy <rajivtreddy@gmail.com>
Randall Randall <randall@randallsquared.com>
Ray <ray@tomo.im>
Raymond Ha <raymond@shraymonks.com>
Richard D. Worth <rdworth@gmail.com>
Richard Feldman <richard.t.feldman@gmail.com>
Richard Kho <hello@richardkho.com>
Richard Littauer <richard.littauer@gmail.com>
Richard Livesey <Livesey7@hotmail.co.uk>
Rick Beerendonk <rick@beerendonk.com>
Riley Tomasek <riley.tomasek@gmail.com>
Rob Arnold <robarnold@cs.cmu.edu>
Robert Sedovsek <robert.sedovsek@gmail.com>
Roman Vanesyan <roman.vanesyan@gmail.com>
Ryan Seddon <seddon.ryan@gmail.com>
Sahat Yalkabov <sakhat@gmail.com>
Sam Saccone <samccone@gmail.com>
Sam Selikoff <sam.selikoff@gmail.com>
Sander Spies <sandermail@gmail.com>
Scott Feeney <scott@oceanbase.org>
Sean Kinsey <oyvind@fb.com>
Sebastian Markbåge <sebastian@calyptus.eu>
Sergey Generalov <sergey@genbit.ru>
Sergey Rubanov <chi187@gmail.com>
Shane O'Sullivan <shaneosullivan1@gmail.com>
Shaun Trennery <shaun.trennery@gmail.com>
Sheraz <undernewmanagement@users.noreply.github.com>
ShihChi Huang <hhuang@netflix.com>
Shripad K <assortmentofsorts@gmail.com>
Simon Højberg <r.hackr@gmail.com>
Simon Welsh <simon@simon.geek.nz>
Sophia Westwood <sophia@quip.com>
Spencer Handley <spencerhandley@gmail.com>
Stefan Dombrowski <sdo451@gmail.com>
Stephen Murphy <smurphy3@apple.com>
Steve Baker <_steve_@outlook.com>
Steven Luscher <react@steveluscher.com>
Stoyan Stefanov <ssttoo@ymail.com>
Sundeep Malladi <sundeep.malladi@gmail.com>
Sunny Juneja <me@sunnyjuneja.com>
Sven Helmberger <fforw@gmx.de>
Sébastien Lorber <lorber.sebastien@gmail.com>
Thomas Aylott <oblivious@subtlegradient.com>
Thomas Boyt <thomas.boyt@venmo.com>
Thomas Shaddox <thomas@heyzap.com>
Thomas Shafer <thomasjshafer@gmail.com>
ThomasCrvsr <crevoisier.thomas@gmail.com>
Tienchai Wirojsaksaree <tienchai@fb.com>
Tim Schaub <tschaub@users.noreply.github.com>
Timothy Yung <yungsters@gmail.com>
Tom Haggie <thaggie@gmail.com>
Tom Hauburger <thauburger@gmail.com>
Tom MacWright <tom@macwright.org>
Tom Occhino <tomocchino@gmail.com>
Toru Kobayashi <koba0004@gmail.com>
Ville Immonen <ville.immonen@iki.fi>
Vincent Riemer <vincentriemer@gmail.com>
Vincent Siao <vincent@asana.com>
Vjeux <vjeuxx@gmail.com>
Volkan Unsal <spocksplanet@gmail.com>
Wayne Larsen <wayne@larsen.st>
WickyNilliams <WickyNilliams@MBA>
Wincent Colaiuta <win@wincent.com>
Wout Mertens <Wout.Mertens@gmail.com>
XuefengWu <benewu@gmail.com>
YouBao Nong <noyobo@gmail.com>
Yuriy Dybskiy <yuriy@dybskiy.com>
Yuval Dekel <thedekel@fb.com>
Zach Bruggeman <mail@bruggie.com>
Zacharias <zachasme@users.noreply.github.com>
brafdlog <brafdlog@gmail.com>
chen <kikyous@163.com>
cutbko <kutsenko.eugene@hotmail.com>
davidxi <davidgraycn@gmail.com>
imagentleman <imagentlemail@gmail.com>
Árni Hermann Reynisson <arnihr@gmail.com>
张敏 <cookfront@gmail.com>

View File

@@ -1,3 +1,235 @@
## 0.13.3 (May 8, 2015)
### React Core
#### New Features
* Added `clipPath` element and attribute for SVG
* Improved warnings for deprecated methods in plain JS classes
#### Bug Fixes
* Loosened `dangerouslySetInnerHTML` restrictions so `{__html: undefined}` will no longer throw
* Fixed extraneous context warning with non-pure `getChildContext`
* Ensure `replaceState(obj)` retains prototype of `obj`
### React with Add-ons
### Bug Fixes
* Test Utils: Ensure that shallow rendering works when components define `contextTypes`
## 0.13.2 (April 18, 2015)
### React Core
#### New Features
* Added `strokeDashoffset`, `flexPositive`, `flexNegative` to the list of unitless CSS properties
* Added support for more DOM properties:
* `scoped` - for `<style>` elements
* `high`, `low`, `optimum` - for `<meter>` elements
* `unselectable` - IE-specific property to prevent user selection
#### Bug Fixes
* Fixed a case where re-rendering after rendering null didn't properly pass context
* Fixed a case where re-rendering after rendering with `style={null}` didn't properly update `style`
* Update `uglify` dependency to prevent a bug in IE8
* Improved warnings
### React with Add-Ons
#### Bug Fixes
* Immutabilty Helpers: Ensure it supports `hasOwnProperty` as an object key
### React Tools
* Improve documentation for new options
## 0.13.1 (March 16, 2015)
### React Core
#### Bug Fixes
* Don't throw when rendering empty `<select>` elements
* Ensure updating `style` works when transitioning from `null`
### React with Add-Ons
#### Bug Fixes
* TestUtils: Don't warn about `getDOMNode` for ES6 classes
* TestUtils: Ensure wrapped full page components (`<html>`, `<head>`, `<body>`) are treated as DOM components
* Perf: Stop double-counting DOM components
### React Tools
#### Bug Fixes
* Fix option parsing for `--non-strict-es6module`
## 0.13.0 (March 10, 2015)
### React Core
#### Breaking Changes
* Deprecated patterns that warned in 0.12 no longer work: most prominently, calling component classes without using JSX or React.createElement and using non-component functions with JSX or createElement
* Mutating `props` after an element is created is deprecated and will cause warnings in development mode; future versions of React will incorporate performance optimizations assuming that props aren't mutated
* Static methods (defined in `statics`) are no longer autobound to the component class
* `ref` resolution order has changed slightly such that a ref to a component is available immediately after its `componentDidMount` method is called; this change should be observable only if your component calls a parent component's callback within your `componentDidMount`, which is an anti-pattern and should be avoided regardless
* Calls to `setState` in life-cycle methods are now always batched and therefore asynchronous. Previously the first call on the first mount was synchronous.
* `setState` and `forceUpdate` on an unmounted component now warns instead of throwing. That avoids a possible race condition with Promises.
* Access to most internal properties has been completely removed, including `this._pendingState` and `this._rootNodeID`.
#### New Features
* Support for using ES6 classes to build React components; see the [v0.13.0 beta 1 notes](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html) for details.
* Added new top-level API `React.findDOMNode(component)`, which should be used in place of `component.getDOMNode()`. The base class for ES6-based components will not have `getDOMNode`. This change will enable some more patterns moving forward.
* Added a new top-level API `React.cloneElement(el, props)` for making copies of React elements see the [v0.13 RC2 notes](/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement) for more details.
* New `ref` style, allowing a callback to be used in place of a name: `<Photo ref={(c) => this._photo = c} />` allows you to reference the component with `this._photo` (as opposed to `ref="photo"` which gives `this.refs.photo`).
* `this.setState()` can now take a function as the first argument for transactional state updates, such as `this.setState((state, props) => ({count: state.count + 1}));` this means that you no longer need to use `this._pendingState`, which is now gone.
* Support for iterators and immutable-js sequences as children.
#### Deprecations
* `ComponentClass.type` is deprecated. Just use `ComponentClass` (usually as `element.type === ComponentClass`).
* Some methods that are available on `createClass`-based components are removed or deprecated from ES6 classes (`getDOMNode`, `replaceState`, `isMounted`, `setProps`, `replaceProps`).
### React with Add-Ons
#### New Features
* [`React.addons.createFragment` was added](/react/docs/create-fragment.html) for adding keys to entire sets of children.
#### Deprecations
* `React.addons.classSet` is now deprecated. This functionality can be replaced with several freely available modules. [classnames](https://www.npmjs.com/package/classnames) is one such module.
* Calls to `React.addons.cloneWithProps` can be migrated to use `React.cloneElement` instead make sure to merge `style` and `className` manually if desired.
### React Tools
#### Breaking Changes
* When transforming ES6 syntax, `class` methods are no longer enumerable by default, which requires `Object.defineProperty`; if you support browsers such as IE8, you can pass `--target es3` to mirror the old behavior
#### New Features
* `--target` option is available on the jsx command, allowing users to specify and ECMAScript version to target.
* `es5` is the default.
* `es3` restores the previous default behavior. An additional transform is added here to ensure the use of reserved words as properties is safe (eg `this.static` will become `this['static']` for IE8 compatibility).
* The transform for the call spread operator has also been enabled.
### JSX
#### Breaking Changes
* A change was made to how some JSX was parsed, specifically around the use of `>` or `}` when inside an element. Previously it would be treated as a string but now it will be treated as a parse error. The [`jsx_orphaned_brackets_transformer`](https://www.npmjs.com/package/jsx_orphaned_brackets_transformer) package on npm can be used to find and fix potential issues in your JSX code.
## 0.12.2 (December 18, 2014)
### React Core
* Added support for more HTML attributes: `formAction`, `formEncType`, `formMethod`, `formTarget`, `marginHeight`, `marginWidth`
* Added `strokeOpacity` to the list of unitless CSS properties
* Removed trailing commas (allows npm module to be bundled and used in IE8)
* Fixed bug resulting in error when passing `undefined` to `React.createElement` - now there is a useful warning
### React Tools
* JSX-related transforms now always use double quotes for props and `displayName`
## 0.12.1 (November 18, 2014)
### React Tools
* Types transform updated with latest support
* jstransform version updated with improved ES6 transforms
* Explicit Esprima dependency removed in favor of using Esprima information exported by jstransform
## 0.12.0 (October 28, 2014)
### React Core
#### Breaking Changes
* `key` and `ref` moved off props object, now accessible on the element directly
* React is now BSD licensed with accompanying Patents grant
* Default prop resolution has moved to Element creation time instead of mount time, making them effectively static
* `React.__internals` is removed - it was exposed for DevTools which no longer needs access
* Composite Component functions can no longer be called directly - they must be wrapped with `React.createFactory` first. This is handled for you when using JSX.
#### New Features
* Spread operator (`{...}`) introduced to deprecate `this.transferPropsTo`
* Added support for more HTML attributes: `acceptCharset`, `classID`, `manifest`
#### Deprecations
* `React.renderComponent` --> `React.render`
* `React.renderComponentToString` --> `React.renderToString`
* `React.renderComponentToStaticMarkup` --> `React.renderToStaticMarkup`
* `React.isValidComponent` --> `React.isValidElement`
* `React.PropTypes.component` --> `React.PropTypes.element`
* `React.PropTypes.renderable` --> `React.PropTypes.node`
* **DEPRECATED** `React.isValidClass`
* **DEPRECATED** `instance.transferPropsTo`
* **DEPRECATED** Returning `false` from event handlers to preventDefault
* **DEPRECATED** Convenience Constructor usage as function, instead wrap with `React.createFactory`
* **DEPRECATED** use of `key={null}` to assign implicit keys
#### Bug Fixes
* Better handling of events and updates in nested results, fixing value restoration in "layered" controlled components
* Correctly treat `event.getModifierState` as case sensitive
* Improved normalization of `event.charCode`
* Better error stacks when involving autobound methods
* Removed DevTools message when the DevTools are installed
* Correctly detect required language features across browsers
* Fixed support for some HTML attributes:
* `list` updates correctly now
* `scrollLeft`, `scrollTop` removed, these should not be specified as props
* Improved error messages
### React With Addons
#### New Features
* `React.addons.batchedUpdates` added to API for hooking into update cycle
#### Breaking Changes
* `React.addons.update` uses `assign` instead of `copyProperties` which does `hasOwnProperty` checks. Properties on prototypes will no longer be updated correctly.
#### Bug Fixes
* Fixed some issues with CSS Transitions
### JSX
#### Breaking Changes
* Enforced convention: lower case tag names are always treated as HTML tags, upper case tag names are always treated as composite components
* JSX no longer transforms to simple function calls
#### New Features
* `@jsx React.DOM` no longer required
* spread (`{...}`) operator introduced to allow easier use of props
#### Bug Fixes
* JSXTransformer: Make sourcemaps an option when using APIs directly (eg, for react-rails)
## 0.11.2 (September 16, 2014)
### React Core
@@ -94,7 +326,7 @@
#### New Features
* Added warnings to help migrate towards descriptors
* Made it possible to server render without React-related markup (`data-reactid`, `data-react-checksum`). This DOM will not be mountable by React. [Read the docs for `React.renderComponentToStaticMarkup`](http://facebook.github.io/react/docs/top-level-api.html#react.rendercomponenttostaticmarkup)
* Made it possible to server render without React-related markup (`data-reactid`, `data-react-checksum`). This DOM will not be mountable by React. [Read the docs for `React.renderComponentToStaticMarkup`](https://facebook.github.io/react/docs/top-level-api.html#react.rendercomponenttostaticmarkup)
* Added support for more attributes:
* `srcSet` for `<img>` to specify images at different pixel ratios
* `textAnchor` for SVG
@@ -106,7 +338,7 @@
### Addons
* `update` function to deal with immutable data. [Read the docs](http://facebook.github.io/react/docs/update.html)
* `update` function to deal with immutable data. [Read the docs](https://facebook.github.io/react/docs/update.html)
### react-tools
* Added an option argument to `transform` function. The only option supported is `harmony`, which behaves the same as `jsx --harmony` on the command line. This uses the ES6 transforms from [jstransform](https://github.com/facebook/jstransform).
@@ -268,7 +500,7 @@
### React with Addons (New!)
* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](http://facebook.github.io/react/docs/addons.html).
* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](https://facebook.github.io/react/docs/addons.html).
### JSX
@@ -301,10 +533,10 @@
* Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
* Support for more DOM elements and attributes (e.g., `<canvas>`)
* Improved server-side rendering APIs. `React.renderComponentToString(<component>, callback)` allows you to use React on the server and generate markup which can be sent down to the browser.
* `prop` improvements: validation and default values. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](http://facebook.github.io/react/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](http://facebook.github.io/react/docs/forms.html)
* `prop` improvements: validation and default values. [Read our blog post for details...](https://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](https://facebook.github.io/react/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](https://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](https://facebook.github.io/react/docs/forms.html)
* We've implemented an improved synthetic event system that conforms to the W3C spec.
* Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as it's second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.

View File

@@ -1,6 +1,6 @@
# Contributing to React
React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on facebook.com. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
## Our Development Process
@@ -27,7 +27,7 @@ The core team will be monitoring for pull requests. When we get one, we'll run s
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
Complete your CLA here: <https://code.facebook.com/cla>
[Complete your CLA here](https://code.facebook.com/cla)
## Bugs
@@ -41,24 +41,30 @@ The best way to get your bug fixed is to provide a reduced test case. jsFiddle,
### Security Bugs
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues and go through the process outlined on that page.
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
## How to Get in Touch
* IRC - [#reactjs on freenode](http://webchat.freenode.net/?channels=reactjs)
* Mailing list - [reactjs on Google Groups](http://groups.google.com/group/reactjs)
* IRC - [#reactjs on freenode](https://webchat.freenode.net/?channels=reactjs)
* Discussion forum - [discuss.reactjs.org](https://discuss.reactjs.org/)
## Coding Style
## Style Guide
### Code
* Use semicolons;
* Commas last,
* 2 spaces for indentation (no tabs)
* Prefer `'` over `"`
* `"use strict";`
* `'use strict';`
* 80 character line length
* "Attractive"
* Do not use the optional parameters of `setTimeout` and `setInterval`
### Documentation
* Do not wrap lines at 80 characters
## License
By contributing to React, you agree that your contributions will be licensed under the [Apache License Version 2.0 (APLv2)](LICENSE).
By contributing to React, you agree that your contributions will be licensed under its BSD license.

View File

@@ -1,6 +1,5 @@
'use strict';
var exec = require('child_process').exec;
var jsxTask = require('./grunt/tasks/jsx');
var browserifyTask = require('./grunt/tasks/browserify');
var populistTask = require('./grunt/tasks/populist');
@@ -12,35 +11,54 @@ var releaseTasks = require('./grunt/tasks/release');
var npmReactTasks = require('./grunt/tasks/npm-react');
var npmReactToolsTasks = require('./grunt/tasks/npm-react-tools');
var versionCheckTask = require('./grunt/tasks/version-check');
var gemReactSourceTasks = require('./grunt/tasks/gem-react-source');
var eslintTask = require('./grunt/tasks/eslint');
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: require('./grunt/config/copy'),
jsx: require('./grunt/config/jsx'),
browserify: require('./grunt/config/browserify'),
populist: require('./grunt/config/populist')(grunt),
connect: require('./grunt/config/server')(grunt),
"webdriver-jasmine": require('./grunt/config/webdriver-jasmine'),
"webdriver-perf": require('./grunt/config/webdriver-perf'),
'webdriver-jasmine': require('./grunt/config/webdriver-jasmine'),
'webdriver-perf': require('./grunt/config/webdriver-perf'),
npm: require('./grunt/config/npm'),
clean: ['./build', './*.gem', './docs/_site', './examples/shared/*.js', '.module-cache'],
clean: [
'./build',
'./*.gem',
'./docs/_site',
'./examples/shared/*.js',
'.module-cache'
],
jshint: require('./grunt/config/jshint'),
/*eslint-disable camelcase */
compare_size: require('./grunt/config/compare_size')
/*eslint-enable camelcase */
});
grunt.config.set('compress', require('./grunt/config/compress'));
Object.keys(grunt.file.readJSON('package.json').devDependencies)
.filter(function(npmTaskName) { return npmTaskName.indexOf('grunt-') === 0; })
.filter(function(npmTaskName) { return npmTaskName != 'grunt-cli'; })
.forEach(function(npmTaskName) { grunt.loadNpmTasks(npmTaskName); });
.filter(function(npmTaskName) {
return npmTaskName.indexOf('grunt-') === 0;
})
.filter(function(npmTaskName) {
return npmTaskName !== 'grunt-cli';
})
.forEach(function(npmTaskName) {
grunt.loadNpmTasks(npmTaskName);
});
// Alias 'jshint' to 'lint' to better match the workflow we know
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('eslint', eslintTask);
grunt.registerTask('download-previous-version', require('./grunt/tasks/download-previous-version.js'));
grunt.registerTask('lint', ['eslint']);
grunt.registerTask(
'download-previous-version',
require('./grunt/tasks/download-previous-version.js')
);
grunt.registerTask('delete-build-modules', function() {
if (grunt.file.exists('build/modules')) {
@@ -68,14 +86,33 @@ module.exports = function(grunt) {
grunt.registerTask('npm-react:pack', npmReactTasks.packRelease);
grunt.registerTask('npm-react-tools:release', npmReactToolsTasks.buildRelease);
grunt.registerTask('npm-react-tools:pack', npmReactToolsTasks.packRelease);
grunt.registerTask('gem-react-source:release', gemReactSourceTasks.buildRelease);
grunt.registerTask('gem-react-source:pack', gemReactSourceTasks.packRelease);
grunt.registerTask('version-check', versionCheckTask);
grunt.registerTask('build:basic', ['jsx:normal', 'version-check', 'browserify:basic']);
grunt.registerTask('build:addons', ['jsx:normal', 'browserify:addons']);
grunt.registerTask('build:transformer', ['jsx:normal', 'browserify:transformer']);
grunt.registerTask('build:min', ['jsx:normal', 'version-check', 'browserify:min']);
grunt.registerTask('build:addons-min', ['jsx:normal', 'browserify:addonsMin']);
grunt.registerTask('build:basic', [
'jsx:normal',
'version-check',
'browserify:basic'
]);
grunt.registerTask('build:addons', [
'jsx:normal',
'browserify:addons'
]);
grunt.registerTask('build:transformer', [
'jsx:normal',
'browserify:transformer'
]);
grunt.registerTask('build:min', [
'jsx:normal',
'version-check',
'browserify:min'
]);
grunt.registerTask('build:addons-min', [
'jsx:normal',
'browserify:addonsMin'
]);
grunt.registerTask('build:withCodeCoverageLogging', [
'jsx:normal',
'version-check',
@@ -95,7 +132,15 @@ module.exports = function(grunt) {
'version-check',
'populist:test'
]);
grunt.registerTask('build:npm-react', ['version-check', 'jsx:normal', 'npm-react:release']);
grunt.registerTask('build:npm-react', [
'version-check',
'jsx:normal',
'npm-react:release'
]);
grunt.registerTask('build:gem-react-source', [
'build',
'gem-react-source:release'
]);
grunt.registerTask('webdriver-phantomjs', webdriverPhantomJSTask);
@@ -138,7 +183,7 @@ module.exports = function(grunt) {
'webdriver-perf:saucelabs_firefox',
'webdriver-perf:saucelabs_chrome',
'webdriver-perf:saucelabs_ie11',
'webdriver-perf:saucelabs_ie8',
'webdriver-perf:saucelabs_ie8'
]);
grunt.registerTask('test:webdriver:saucelabs', [
@@ -223,7 +268,6 @@ module.exports = function(grunt) {
'npm-react:pack',
'npm-react-tools:release',
'npm-react-tools:pack',
'copy:react_docs',
'compare_size'
]);
@@ -238,7 +282,8 @@ module.exports = function(grunt) {
'release:setup',
'clean',
'build',
'gem:only',
'gem-react-source:release',
'gem-react-source:pack',
'release:bower',
'release:starter',
'compress',
@@ -246,14 +291,6 @@ module.exports = function(grunt) {
'release:msg'
]);
// `gem` task to build the react-source gem
grunt.registerTask('gem', ['build', 'gem:only']);
grunt.registerTask('gem:only', function() {
var done = this.async();
exec('gem build react-source.gemspec', done);
});
// The default task - build - to keep setup easy
grunt.registerTask('default', ['build']);
};

218
LICENSE
View File

@@ -1,201 +1,31 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
BSD License
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
For React software
1. Definitions.
Copyright (c) 2013-2015, Facebook, Inc.
All rights reserved.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
* Neither the name Facebook nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

393
LICENSE-docs Normal file
View File

@@ -0,0 +1,393 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the "Licensor." Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.

9
LICENSE-examples Normal file
View File

@@ -0,0 +1,9 @@
The examples provided by Facebook are for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

33
PATENTS Normal file
View File

@@ -0,0 +1,33 @@
Additional Grant of Patent Rights Version 2
"Software" means the React software distributed by Facebook, Inc.
Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software
("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable
(subject to the termination provision below) license under any Necessary
Claims, to make, have made, use, sell, offer to sell, import, and otherwise
transfer the Software. For avoidance of doubt, no license is granted under
Facebook's rights in any patent claims that are infringed by (i) modifications
to the Software made by you or any third party or (ii) the Software in
combination with any software or other technology.
The license granted hereunder will terminate, automatically and without notice,
if you (or any of your subsidiaries, corporate affiliates or agents) initiate
directly or indirectly, or take a direct financial interest in, any Patent
Assertion: (i) against Facebook or any of its subsidiaries or corporate
affiliates, (ii) against any party if such Patent Assertion arises in whole or
in part from any software, technology, product or service of Facebook or any of
its subsidiaries or corporate affiliates, or (iii) against any party relating
to the Software. Notwithstanding the foregoing, if Facebook or any of its
subsidiaries or corporate affiliates files a lawsuit alleging patent
infringement against you in the first instance, and you respond by filing a
patent infringement counterclaim in that lawsuit against that party that is
unrelated to the Software, the license granted hereunder will not terminate
under section (i) of this paragraph due to such counterclaim.
A "Necessary Claim" is a claim of a patent owned by Facebook that is
necessarily infringed by the Software standing alone.
A "Patent Assertion" is any lawsuit or other action alleging direct, indirect,
or contributory infringement or inducement to infringe any patent, including a
cross-claim or counterclaim.

View File

@@ -1,26 +1,27 @@
# [React](http://facebook.github.io/react) [![Build Status](https://travis-ci.org/facebook/react.svg?branch=0.11-stable)](https://travis-ci.org/facebook/react)
# [React](https://facebook.github.io/react/) [![Build Status](https://travis-ci.org/facebook/react.svg?branch=0.13-stable)](https://travis-ci.org/facebook/react)
React is a JavaScript library for building user interfaces.
* **Just the UI:** Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
* **Virtual DOM:** React uses a *virtual DOM* diff implementation for ultra-high performance. It can also render on the server using Node.js — no heavy browser DOM required.
* **Virtual DOM:** React abstracts away the DOM from you, giving a simpler programming model and better performance. React can also render on the server using Node, and it can power native apps using [React Native](https://facebook.github.io/react-native/).
* **Data flow:** React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding.
[Learn how to use React in your own project.](http://facebook.github.io/react/docs/getting-started.html)
**NEW**! Check out our newest project [React Native](https://github.com/facebook/react-native), which uses React and JavaScript to create native mobile apps.
[Learn how to use React in your own project.](https://facebook.github.io/react/docs/getting-started.html).
## Examples
We have several examples [on the website](http://facebook.github.io/react/). Here is the first one to get you started:
We have several examples [on the website](https://facebook.github.io/react/). Here is the first one to get you started:
```js
/** @jsx React.DOM */
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
React.renderComponent(
React.render(
<HelloMessage name="John" />,
document.getElementById('container')
);
@@ -28,20 +29,20 @@ React.renderComponent(
This example will render "Hello John" into a container on the page.
You'll notice that we used an HTML-like syntax; [we call it JSX](http://facebook.github.io/react/docs/jsx-in-depth.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.
You'll notice that we used an HTML-like syntax; [we call it JSX](https://facebook.github.io/react/docs/jsx-in-depth.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.
## Installation
The fastest way to get started is to serve JavaScript from the CDN (also available on [CDNJS](http://cdnjs.com/#react)):
The fastest way to get started is to serve JavaScript from the CDN (also available on [cdnjs](https://cdnjs.com/libraries/react) and [jsdelivr](http://www.jsdelivr.com/#!react)):
```html
<!-- The core React library -->
<script src="http://fb.me/react-0.11.2.js"></script>
<script src="https://fb.me/react-0.13.3.js"></script>
<!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
<script src="http://fb.me/JSXTransformer-0.11.2.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
```
We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.11.2.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
We've also built a [starter kit](https://facebook.github.io/react/downloads/react-0.13.3.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
If you'd like to use [bower](http://bower.io), it's as easy as:
@@ -87,12 +88,20 @@ grunt test
grunt test --debug
# For speed, you can use fasttest and add --filter to only run one test
grunt fasttest --filter=ReactIdentity
# Lint the code with JSHint
# Lint the code with ESLint
grunt lint
# Wipe out build directory
grunt clean
```
### License
React is [BSD licensed](./LICENSE). We also provide an additional [patent grant](./PATENTS).
React documentation is [Creative Commons licensed](./LICENSE-docs).
Examples provided in this repository and in the documentation are [separately licensed](./LICENSE-examples).
### More…
There's only so much we can cram in here. To read more about the community and guidelines for submitting pull requests, please read the [Contributing document](CONTRIBUTING.md).

27
bin/jsx
View File

@@ -1,6 +1,6 @@
#!/usr/bin/env node
// -*- mode: js -*-
"use strict";
'use strict';
var transform = require('../main').transform;
@@ -11,18 +11,41 @@ require('commoner').version(
}).option(
'--harmony',
'Turns on JS transformations such as ES6 Classes etc.'
).option(
'--target [version]',
'Specify your target version of ECMAScript. Valid values are "es3" and ' +
'"es5". The default is "es5". "es3" will avoid uses of defineProperty and ' +
'will quote reserved words. WARNING: "es5" is not properly supported, even ' +
'with the use of es5shim, es5sham. If you need to support IE8, use "es3".',
'es5'
).option(
'--strip-types',
'Strips out type annotations.'
).option(
'--es6module',
'Parses the file as a valid ES6 module. ' +
'(Note that this means implicit strict mode)'
).option(
'--non-strict-es6module',
'Parses the file as an ES6 module, except disables implicit strict-mode. ' +
'(This is useful if you\'re porting non-ES6 modules to ES6, but haven\'t ' +
'yet verified that they are strict-mode safe yet)'
).option(
'--source-map-inline',
'Embed inline sourcemap in transformed source'
).process(function(id, source) {
// This is where JSX, ES6, etc. desugaring happens.
// We don't do any pre-processing of options so that the command line and the
// JS API both expose the same set of options. We do extract the options that
// we care about from commoner though so we aren't passing too many things
// along.
var options = {
harmony: this.options.harmony,
sourceMap: this.options.sourceMapInline,
stripTypes: this.options.stripTypes
stripTypes: this.options.stripTypes,
es6module: this.options.es6module,
nonStrictEs6module: this.options.nonStrictEs6module,
target: this.options.target
};
return transform(source, options);
});

View File

@@ -2,8 +2,7 @@
// -*- mode: js -*-
"use strict";
var getAllVisitors = require('../vendor/fbtransform/visitors').getAllVisitors;
var transform = require('jstransform').transform;
var transform = require('../main').transform;
var propagate = require("../vendor/constants").propagate;
require("commoner").version(
@@ -31,7 +30,7 @@ require("commoner").version(
var constants = context.config.constants || {};
// This is where JSX, ES6, etc. desugaring happens.
source = transform(getAllVisitors(), source).code;
source = transform(source, {harmony: true, stripTypes: true});
// Constant propagation means removing any obviously dead code after
// replacing constant expressions with literal (boolean) values.

View File

@@ -61,7 +61,7 @@ GEM
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (3.1.2)
safe_yaml (1.0.3)
safe_yaml (1.0.4)
sanitize (2.0.6)
nokogiri (>= 1.4.4)
sass (3.3.14)
@@ -80,3 +80,6 @@ DEPENDENCIES
rake
rb-fsevent
sanitize (~> 2.0)
BUNDLED WITH
1.10.1

View File

@@ -52,7 +52,7 @@ $ bundle exec rake watch # Automatically compiles as needed.
### Updating `facebook.github.io/react`
The easiest way to do this is to have a separate clone of this repository, checked out to the `gh-pages` branch. We have a build step that expects this to be in a directory named `react-gh-pages` at the same depth as `react`. Then it's just a matter of running `grunt docs`, which will compile the site and copy it out to this repository. From there you can check it in.
The easiest way to do this is to have a separate clone of this repository, checked out to the `gh-pages` branch. We have a build step that expects this to be in a directory named `react-gh-pages` at the same depth as `react`. Then it's just a matter of running `grunt docs`, which will compile the site and copy it out to this repository. From there, you can check it in.
**Note:** This should only be done for new releases. You should create a tag corresponding to the release tag in the main repository.

View File

@@ -4,12 +4,13 @@ require('yaml')
desc "generate js from jsx"
task :js do
system "../bin/jsx _js js"
system "cp ../node_modules/babel/node_modules/babel-core/browser.min.js ./js/babel-browser.min.js"
system "../node_modules/.bin/babel _js --out-dir=js"
end
desc "watch js"
task :watch do
Process.spawn "../bin/jsx --watch _js js"
Process.spawn "../bin/jsx --watch --harmony _js js"
Process.waitall
end

View File

@@ -1,7 +1,7 @@
---
name: React
description: A JavaScript library for building user interfaces
url: http://facebook.github.io
url: https://facebook.github.io
baseurl: "/react"
permalink: "/blog/:year/:month/:day/:title.html"
paginate_path: "/blog/page:num/"
@@ -25,13 +25,15 @@ exclude:
- Gemfile.lock
- README.md
- Rakefile
- vendor/bundle
markdown: redcarpet
redcarpet:
extensions:
- fenced_code_blocks
- footnotes
sass:
style: :compressed
sass_dir: _css
gems:
- jekyll-redirect-from
react_version: 0.11.2
react_version: 0.13.3

View File

@@ -68,7 +68,7 @@ h3 {
}
h4 {
font-size: 17px;
font-size: 16px;
}
h5 {

View File

@@ -1,47 +1,92 @@
---
- - Adam Krebs
- - Aaron Franks
- Adam Krebs
- Adam Mark
- Adam Solove
- Alan deLevie
- Alex Boyd
- Alex Mykyta
- Alex Zelenskiy
- Alexander Solovyov
- Alexander Tseung
- Alexandre Gaudencio
- Alexey Raspopov
- Alexey Shamrin
- Andre Z Sanchez
- Andreas Svensson
- Andres Suarez
- Andrew Cobby
- Andrew Davey
- Andrew Rasmussen
- Andrew Zich
- Andrey Popp
- Anthony van der Hoorn
- Antti Ahti
- Areeb Malik
- Aria Buckles
- Artem Nezvigin
- Ayman Osman
- Bartosz Kaszubowski
- Beau Smith
- Ben Alpert
- Ben Foxall
- Ben Newman
- Ben Ripkens
- Benjamin Keen
- Benjamin Leiken
- Bill Fisher
- Blaine Hatab
- Bob Eagan
- Bob Ralian
- Bojan Mihelac
- Brandon Bloom
- Brandon Tilley
- Brian Cooke
- Brian Holt
- Brian Hsu
- Brian Kim
- Brian Kung
- Brian Reavis
- Brian Rue
- Bruno Škvorc
- Cam Song
- Cam Spiers
- Cassus Adam Banko
- Cat Chen
- Cedric Sohrauer
- Charles Marsh
- Cheng Lou
- Chitharanjan Das
- Chris Sciolla
- Christian
- Christian Alfoni
- Christian Roman
- Christoph Pojer
- Christopher Monsanto
- Clay Allsopp
- Connor McSheffrey
- Cotton Hou
- Dan Abramov
- Dan Fox
- Dan Schafer
- Daniel Carlsson
- Daniel Gasienica
- Daniel Lo Nigro
- Daniel Mané
- Daniel Miladinov
- Daniel Schonfeld
- Danny Ben-David
- Daryl Lau
- David Hellsing
- David Hu
- Denis Sokolov
- Dennis Johnson
- Devon Blandin
- Dmitrii Abramov
- Dmitry Mazuro
- Dustan Kasten
- Dustin Getz
- Dylan Harrington
- Enguerran
- Eric Clemmons
- Eric Florenzano
@@ -49,49 +94,77 @@
- Evan Coonrod
- Fabio M. Costa
- Felipe Oliveira Carvalho
- Felix Gnass
- Felix Kling
- Fernando Correia
- François-Xavier Bois
- Fred Zhao
- G Scott Olson
- G. Kay Lee
- Gabe Levi
- Garren Smith
- Geert Pasteels
- Geert-Jan Brits
- George A Sisco III
- Gilbert
- Glen Mailer
- Greg Hurrell
- - Greg Roodt
- Greg Roodt
- Guangqiang Dong
- Guido Bouman
- Harry Hull
- Harry Marr
- - Harry Moreno
- Harshad Sabne
- Hendrik Swanepoel
- Henry Zhu
- Hou Chia
- Hugo Jobling
- Héliton Nordt
- Ian Obermiller
- Ingvar Stepanyan
- Irae Carvalho
- Isaac Salier-Hellendag
- Ivan Kozik
- Ivan Krechetov
- Ivan Vergiliev
- Jacob Gable
- Jacob Greenleaf
- Jaime Mingo
- Jakub Malinowski
- James Brantly
- James Ide
- James Seppi
- Jamie Wong
- Jamison Dance
- Jan Hancic
- Jan Kassens
- Jared Forsyth
- Jason Bonta
- Jason Ly
- Jason Trill
- Jean Lauliac
- Jed Watson
- Jeff Barczewski
- Jeff Carpenter
- Jeff Chan
- Jeff Kolesky
- Jeff Morrison
- Jeff Welch
- Jeffrey Lin
- Jesse Skinner
- Jignesh Kakadiya
- Jim OBrien
- Jim Sproch
- Jimmy Jea
- Jing Chen
- Joel Auterson
- Johannes Baiter
- Johannes Emerich
- John Heroy
- John Watson
- Jon Beebe
- Jon Madison
- Jonas Enlund
- Jonas Gebhardt
- Jonathan Hsu
@@ -99,17 +172,29 @@
- Josh Bassett
- Josh Duck
- Josh Yudaken
- Joshua Goldberg
- Joshua Ma
- João Valente
- Juan Serrano
- Julen Ruiz Aizpuru
- Julien Bordellier
- Jun Wu
- Juraj Dudak
- Justin Jaffray
- Justin Woo
- Karl Mikkelsen
- Karpich Dmitry
- Keito Uchiyama
- Kevin Old
- Kirk Steven Hansen
- Kit Randel
- Kunal Mehta
- Kurt Ruppel
- Kyle Mathews
- Laurence Rowe
- Lee Byron
- Lei
- Leon Fedotov
- Levi McCallum
- Lily
- Logan Allen
@@ -117,63 +202,143 @@
- Marcin Kwiatkowski
- Marcin Szczepanski
- Mariano Desanze
- Mark Anderson
- Mark Funk
- Mark Hintz
- Mark IJbema
- Mark Richardson
- Marlon Landaverde
- Marshall Roch
- - Martin Andert
- Martin Andert
- Martin Jul
- Martin Konicek
- Mathieu M-Gosselin
- Matias Singers
- Matt Harrison
- Matt Huggins
- Matt Zabriskie
- Matthew Dapena-Tretter
- Matthew Johnston
- Matti Nelimarkka
- Max F. Albrecht
- Michael Chan
- Michael Randers-Pehrson
- Michal Srb
- Mouad Debbar
- Michelle Todd
- Mihai Parparita
- Mike D Pilsbury
- Minwe LUO
- Miorel Palii
- - Mouad Debbar
- Nadeesha Cabral
- Naman Goel
- Nate Hunzaker
- Nathan White
- Nicholas Bergson-Shilcock
- Nick Fitzgerald
- Nick Gavalas
- Nick Merwin
- Nick Raienko
- Nick Thompson
- Nick Williams
- Niklas Boström
- Oiva Eskola
- Oleg
- Oleksii Markhovskyi
- Oliver Zeigermann
- Owen Coutts
- Pablo Lacerda de Miranda
- Pascal Hartig
- Patrick Laughlin
- Paul OShannessy
- Paul Seiffert
- Paul Shen
- Pedro Nauck
- Pete Hunt
- Peter Blazejewicz
- Peter Cottle
- Peter Jaros
- Petri Lehtinen
- Petri Lievonen
- Pieter Vanderwerff
- Pouja Nikray
- Preston Parry
- Rafael
- Rafal Dittwald
- Rajiv Tirumalareddy
- Randall Randall
- Ray
- Raymond Ha
- Richard D. Worth
- Richard Feldman
- Richard Kho
- Richard Littauer
- Richard Livesey
- Rick Beerendonk
- Riley Tomasek
- Rob Arnold
- Robert Sedovsek
- Roman Vanesyan
- Ryan Seddon
- Sahat Yalkabov
- Sam Saccone
- Sam Selikoff
- Sander Spies
- Scott Feeney
- Sean Kinsey
- Sebastian Markbåge
- Sergey Generalov
- Sergey Rubanov
- Shane O'Sullivan
- Shaun Trennery
- Sheraz
- ShihChi Huang
- Shripad K
- Simon Højberg
- Simon Welsh
- Sophia Westwood
- Spencer Handley
- Stefan Dombrowski
- Stephen Murphy
- Steve Baker
- Steven Luscher
- Stoyan Stefanov
- Sundeep Malladi
- Sunny Juneja
- Sven Helmberger
- Sébastien Lorber
- Thomas Aylott
- Thomas Boyt
- Thomas Shaddox
- Thomas Shafer
- ThomasCrvsr
- Tienchai Wirojsaksaree
- Tim Schaub
- Timothy Yung
- Tom Haggie
- Tom Hauburger
- Tom MacWright
- Tom Occhino
- Toru Kobayashi
- Ville Immonen
- Vincent Riemer
- Vincent Siao
- Vjeux
- Volkan Unsal
- Wayne Larsen
- WickyNilliams
- Wincent Colaiuta
- Wout Mertens
- XuefengWu
- YouBao Nong
- Yuriy Dybskiy
- Yuval Dekel
- Zach Bruggeman
- Zacharias
- brafdlog
- chen
- cutbko
- davidxi
- imagentleman
- "Árni Hermann Reynisson"
- "张敏"

58
docs/_data/authors.yml Normal file
View File

@@ -0,0 +1,58 @@
# Map of short name to more information. `name` will be used but if you don't
# want to use your real name, just use whatever. If url is included, your name
# will be a link to the provided url.
billandjing:
name: Bill Fisher and Jing Chen
chenglou:
name: Cheng Lou
url: https://twitter.com/_chenglou
Daniel15:
name: Daniel Lo Nigro
url: http://dan.cx/
fisherwebdev:
name: Bill Fisher
url: https://twitter.com/fisherwebdev
jaredly:
name: Jared Forsyth
url: https://twitter.com/jaredforsyth
jgebhardt:
name: Jonas Gebhardt
url: https://twitter.com/jonasgebhardt
jimandsebastian:
name: Jim Sproch and Sebastian Markbåge
josephsavona:
name: Joseph Savona
url: https://twitter.com/en_JS
kmeht:
name: Kunal Mehta
url: https://github.com/kmeht
LoukaN:
name: Lou Husson
url: https://twitter.com/loukan42
matthewjohnston4:
name: Matthew Johnston
url: https://github.com/matthewathome
petehunt:
name: Pete Hunt
url: https://twitter.com/floydophone
schrockn:
name: Nick Schrock
url: https://twitter.com/schrockn
sebmarkbage:
name: Sebastian Markbåge
url: https://twitter.com/sebmarkbage
spicyj:
name: Ben Alpert
url: http://benalpert.com
steveluscher:
name: Steven Luscher
url: https://twitter.com/steveluscher
vjeux:
name: Vjeux
url: https://twitter.com/vjeux
wincent:
name: Greg Hurrell
url: https://twitter.com/wincent
zpao:
name: Paul OShannessy
url: https://twitter.com/zpao

View File

@@ -8,6 +8,8 @@
title: Thinking in React
- title: Community Resources
items:
- id: conferences
title: Conferences
- id: videos
title: Videos
- id: complementary-tools
@@ -23,6 +25,8 @@
subitems:
- id: jsx-in-depth
title: JSX in Depth
- id: jsx-spread
title: JSX Spread Attributes
- id: jsx-gotchas
title: JSX Gotchas
- id: interactivity-and-dynamic-uis
@@ -31,6 +35,8 @@
title: Multiple Components
- id: reusable-components
title: Reusable Components
- id: transferring-props
title: Transferring Props
- id: forms
title: Forms
- id: working-with-the-browser
@@ -52,13 +58,17 @@
- id: test-utils
title: Test Utilities
- id: clone-with-props
title: Cloning Components
title: Cloning Elements
- id: create-fragment
title: Keyed Fragments
- id: update
title: Immutability Helpers
- id: pure-render-mixin
title: PureRenderMixin
- id: perf
title: Performance Tools
- id: advanced-performance
title: Advanced Performance
- title: Reference
items:
- id: top-level-api
@@ -77,11 +87,13 @@
title: Special Non-DOM Attributes
- id: reconciliation
title: Reconciliation
- id: glossary
title: React (Virtual) DOM Terminology
- title: Flux
items:
- id: flux-overview
title: Flux Overview
href: http://facebook.github.io/flux/docs/overview.html
href: https://facebook.github.io/flux/docs/overview.html
- id: flux-todo-list
title: Flux TodoMVC Tutorial
href: http://facebook.github.io/flux/docs/todo-list.html
href: https://facebook.github.io/flux/docs/todo-list.html

View File

@@ -34,3 +34,7 @@
title: References to Components
- id: children-undefined
title: this.props.children undefined
- id: use-react-with-other-libraries
title: Use React with Other Libraries
- id: dangerously-set-inner-html
title: Dangerously Set innerHTML

View File

@@ -1,10 +1,30 @@
<h1><a href="/react{{ page.url }}">{{ page.title }}</a></h1>
<p class="meta">{{ page.date | date_to_string }} by {{ page.author }}</p>
{% assign page = include.page %}
{% assign author = site.data.authors[page.author] %}
<div id="post">
{% if content != '' %}
{{ page.excerpt }}
<h1>
{% if include.isPermalink %}
{{ page.title }}
{% else %}
{{ page.content }}
<a href="/react{{ page.url }}">{{ page.title }}</a>
{% endif %}
</h1>
<p class="meta">
{{ page.date | date: "%B %e, %Y" }}
by
{% if author.url %}
<a href="{{author.url}}">{{ author.name }}</a>
{% else %}
{{ author.name }}
{% endif %}
</p>
<hr>
<div class="post">
{{ include.content }}
</div>
{% if include.isPermalink %}
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
{% endif %}

View File

@@ -0,0 +1,3 @@
rules:
block-scoped-var: false
no-undef: false

View File

@@ -1,19 +1,14 @@
/**
* @jsx React.DOM
*/
var HELLO_COMPONENT = `
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
var HELLO_COMPONENT = "\
/** @jsx React.DOM */\n\
var HelloMessage = React.createClass({\n\
render: function() {\n\
return <div>Hello {this.props.name}</div>;\n\
}\n\
});\n\
\n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\
";
React.render(<HelloMessage name="John" />, mountNode);
`;
React.renderComponent(
React.render(
<ReactPlayground codeText={HELLO_COMPONENT} />,
document.getElementById('helloExample')
);

View File

@@ -1,43 +1,36 @@
/**
* @jsx React.DOM
*/
var MARKDOWN_COMPONENT = `
var MarkdownEditor = React.createClass({
getInitialState: function() {
return {value: 'Type some *markdown* here!'};
},
handleChange: function() {
this.setState({value: React.findDOMNode(this.refs.textarea).value});
},
rawMarkup: function() {
return { __html: marked(this.state.value, {sanitize: true}) };
},
render: function() {
return (
<div className="MarkdownEditor">
<h3>Input</h3>
<textarea
onChange={this.handleChange}
ref="textarea"
defaultValue={this.state.value} />
<h3>Output</h3>
<div
className="content"
dangerouslySetInnerHTML={this.rawMarkup()}
/>
</div>
);
}
});
var MARKDOWN_COMPONENT = "\
/** @jsx React.DOM */\n\
\n\
var converter = new Showdown.converter();\n\
\n\
var MarkdownEditor = React.createClass({\n\
getInitialState: function() {\n\
return {value: 'Type some *markdown* here!'};\n\
},\n\
handleChange: function() {\n\
this.setState({value: this.refs.textarea.getDOMNode().value});\n\
},\n\
render: function() {\n\
return (\n\
<div className=\"MarkdownEditor\">\n\
<h3>Input</h3>\n\
<textarea\n\
onChange={this.handleChange}\n\
ref=\"textarea\"\n\
defaultValue={this.state.value} />\n\
<h3>Output</h3>\n\
<div\n\
className=\"content\"\n\
dangerouslySetInnerHTML={{\n\
__html: converter.makeHtml(this.state.value)\n\
}}\n\
/>\n\
</div>\n\
);\n\
}\n\
});\n\
\n\
React.renderComponent(<MarkdownEditor />, mountNode);\
";
React.render(<MarkdownEditor />, mountNode);
`;
React.renderComponent(
React.render(
<ReactPlayground codeText={MARKDOWN_COMPONENT} />,
document.getElementById('markdownExample')
);

View File

@@ -1,33 +1,28 @@
/**
* @jsx React.DOM
*/
var TIMER_COMPONENT = `
var Timer = React.createClass({
getInitialState: function() {
return {secondsElapsed: 0};
},
tick: function() {
this.setState({secondsElapsed: this.state.secondsElapsed + 1});
},
componentDidMount: function() {
this.interval = setInterval(this.tick, 1000);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
render: function() {
return (
<div>Seconds Elapsed: {this.state.secondsElapsed}</div>
);
}
});
var TIMER_COMPONENT = "\
/** @jsx React.DOM */\n\
var Timer = React.createClass({\n\
getInitialState: function() {\n\
return {secondsElapsed: 0};\n\
},\n\
tick: function() {\n\
this.setState({secondsElapsed: this.state.secondsElapsed + 1});\n\
},\n\
componentDidMount: function() {\n\
this.interval = setInterval(this.tick, 1000);\n\
},\n\
componentWillUnmount: function() {\n\
clearInterval(this.interval);\n\
},\n\
render: function() {\n\
return (\n\
<div>Seconds Elapsed: {this.state.secondsElapsed}</div>\n\
);\n\
}\n\
});\n\
\n\
React.renderComponent(<Timer />, mountNode);\
";
React.render(<Timer />, mountNode);
`;
React.renderComponent(
React.render(
<ReactPlayground codeText={TIMER_COMPONENT} />,
document.getElementById('timerExample')
);

View File

@@ -1,47 +1,43 @@
/**
* @jsx React.DOM
*/
var TODO_COMPONENT = `
var TodoList = React.createClass({
render: function() {
var createItem = function(itemText, index) {
return <li key={index + itemText}>{itemText}</li>;
};
return <ul>{this.props.items.map(createItem)}</ul>;
}
});
var TodoApp = React.createClass({
getInitialState: function() {
return {items: [], text: ''};
},
onChange: function(e) {
this.setState({text: e.target.value});
},
handleSubmit: function(e) {
e.preventDefault();
var nextItems = this.state.items.concat([this.state.text]);
var nextText = '';
this.setState({items: nextItems, text: nextText});
},
render: function() {
return (
<div>
<h3>TODO</h3>
<TodoList items={this.state.items} />
<form onSubmit={this.handleSubmit}>
<input onChange={this.onChange} value={this.state.text} />
<button>{'Add #' + (this.state.items.length + 1)}</button>
</form>
</div>
);
}
});
var TODO_COMPONENT = "\
/** @jsx React.DOM */\n\
var TodoList = React.createClass({\n\
render: function() {\n\
var createItem = function(itemText) {\n\
return <li>{itemText}</li>;\n\
};\n\
return <ul>{this.props.items.map(createItem)}</ul>;\n\
}\n\
});\n\
var TodoApp = React.createClass({\n\
getInitialState: function() {\n\
return {items: [], text: ''};\n\
},\n\
onChange: function(e) {\n\
this.setState({text: e.target.value});\n\
},\n\
handleSubmit: function(e) {\n\
e.preventDefault();\n\
var nextItems = this.state.items.concat([this.state.text]);\n\
var nextText = '';\n\
this.setState({items: nextItems, text: nextText});\n\
},\n\
render: function() {\n\
return (\n\
<div>\n\
<h3>TODO</h3>\n\
<TodoList items={this.state.items} />\n\
<form onSubmit={this.handleSubmit}>\n\
<input onChange={this.onChange} value={this.state.text} />\n\
<button>{'Add #' + (this.state.items.length + 1)}</button>\n\
</form>\n\
</div>\n\
);\n\
}\n\
});\n\
React.renderComponent(<TodoApp />, mountNode);\
";
React.render(<TodoApp />, mountNode);
`;
React.renderComponent(
React.render(
<ReactPlayground codeText={TODO_COMPONENT} />,
document.getElementById('todoExample')
);

View File

@@ -1,23 +1,14 @@
/**
* Copyright 2013-2014 Facebook, Inc.
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @jsx React.DOM
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/**
* This is a web interface for the HTML to JSX converter contained in
* This is a web interface for the HTML to JSX converter contained in
* `html-jsx-lib.js`.
*/
;(function() {
@@ -87,5 +78,5 @@ var HELLO_COMPONENT = "\
}
});
React.renderComponent(<HTMLtoJSXComponent />, document.getElementById('jsxCompiler'));
}());
React.render(<HTMLtoJSXComponent />, document.getElementById('jsxCompiler'));
}());

View File

@@ -0,0 +1,11 @@
(function() {
var tag = document.querySelector(
'script[type="application/javascript;version=1.7"]'
);
if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) {
alert('Bad JSFiddle configuration, please fork the original React JSFiddle');
}
tag.setAttribute('type', 'text/jsx;harmony=true');
tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, '');
})();

View File

@@ -1,50 +0,0 @@
/**
* @jsx React.DOM
*/
var HELLO_COMPONENT = "\
/** @jsx React.DOM */\n\
var HelloMessage = React.createClass({\n\
render: function() {\n\
return <div>Hello {this.props.name}</div>;\n\
}\n\
});\n\
\n\
React.renderComponent(<HelloMessage name=\"John\" />, mountNode);\
";
function transformer(harmony, code) {
return JSXTransformer.transform(code, {harmony: harmony}).code;
}
var CompilerPlayground = React.createClass({
getInitialState: function() {
return {harmony: false};
},
handleHarmonyChange: function(e) {
this.setState({harmony: e.target.checked});
},
render: function() {
return (
<div>
<ReactPlayground
codeText={HELLO_COMPONENT}
renderCode={true}
transformer={transformer.bind(null, this.state.harmony)}
showCompiledJSTab={false}
/>
<label className="compiler-option">
<input
type="checkbox"
onChange={this.handleHarmonyChange}
checked={this.state.harmony} />{' '}
Enable ES6 transforms (<code>--harmony</code>)
</label>
</div>
);
},
});
React.renderComponent(
<CompilerPlayground />,
document.getElementById('jsxCompiler')
);

View File

@@ -1,8 +1,3 @@
/**
* @jsx React.DOM
*/
var IS_MOBILE = (
navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
@@ -14,12 +9,21 @@ var IS_MOBILE = (
);
var CodeMirrorEditor = React.createClass({
propTypes: {
lineNumbers: React.PropTypes.bool,
onChange: React.PropTypes.func
},
getDefaultProps: function() {
return {
lineNumbers: false
};
},
componentDidMount: function() {
if (IS_MOBILE) return;
this.editor = CodeMirror.fromTextArea(this.refs.editor.getDOMNode(), {
this.editor = CodeMirror.fromTextArea(React.findDOMNode(this.refs.editor), {
mode: 'javascript',
lineNumbers: false,
lineNumbers: this.props.lineNumbers,
lineWrapping: true,
smartIndent: false, // javascript mode does bad things with jsx indents
matchBrackets: true,
@@ -80,16 +84,18 @@ var ReactPlayground = React.createClass({
transformer: React.PropTypes.func,
renderCode: React.PropTypes.bool,
showCompiledJSTab: React.PropTypes.bool,
showLineNumbers: React.PropTypes.bool,
editorTabTitle: React.PropTypes.string
},
getDefaultProps: function() {
return {
transformer: function(code) {
return JSXTransformer.transform(code).code;
return babel.transform(code).code;
},
editorTabTitle: 'Live JSX Editor',
showCompiledJSTab: true
showCompiledJSTab: true,
showLineNumbers: false
};
},
@@ -127,6 +133,7 @@ var ReactPlayground = React.createClass({
onChange={this.handleCodeChange}
codeText={compiledCode}
readOnly={true}
lineNumbers={this.props.showLineNumbers}
/>;
var JSXContent =
@@ -135,6 +142,7 @@ var ReactPlayground = React.createClass({
onChange={this.handleCodeChange}
className="playgroundStage"
codeText={this.state.code}
lineNumbers={this.props.showLineNumbers}
/>;
var JSXTabClassName =
@@ -186,7 +194,7 @@ var ReactPlayground = React.createClass({
},
executeCode: function() {
var mountNode = this.refs.mount.getDOMNode();
var mountNode = React.findDOMNode(this.refs.mount);
try {
React.unmountComponentAtNode(mountNode);
@@ -195,7 +203,7 @@ var ReactPlayground = React.createClass({
try {
var compiledCode = this.compileCode();
if (this.props.renderCode) {
React.renderComponent(
React.render(
<CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
mountNode
);
@@ -204,7 +212,7 @@ var ReactPlayground = React.createClass({
}
} catch (err) {
this.setTimeout(function() {
React.renderComponent(
React.render(
<div className="playgroundError">{err.toString()}</div>,
mountNode
);

View File

@@ -8,8 +8,8 @@
<meta name="viewport" content="width=device-width">
<meta property="og:title" content="{{ page.title }} | React">
<meta property="og:type" content="website">
<meta property="og:url" content="http://facebook.github.io/react{{ page.url }}">
<meta property="og:image" content="http://facebook.github.io/react/img/logo_og.png">
<meta property="og:url" content="https://facebook.github.io/react{{ page.url }}">
<meta property="og:image" content="https://facebook.github.io/react/img/logo_og.png">
<meta property="og:description" content="A JavaScript library for building user interfaces">
<meta property="fb:app_id" content="623268441017527">
@@ -28,12 +28,11 @@
<script type="text/javascript" src="/react/js/es5-shim.min.js"></script>
<script type="text/javascript" src="/react/js/es5-sham.min.js"></script>
<![endif]-->
<script type="text/javascript" src="/react/js/babel-browser.min.js"></script>
<script type="text/javascript" src="/react/js/codemirror.js"></script>
<script type="text/javascript" src="/react/js/javascript.js"></script>
<script type="text/javascript" src="/react/js/react.js"></script>
<script type="text/javascript" src="/react/js/JSXTransformer.js"></script>
<script type="text/javascript" src="/react/js/live_editor.js"></script>
<script type="text/javascript" src="/react/js/showdown.js"></script>
</head>
<body>
@@ -45,12 +44,16 @@
<img class="nav-logo" src="/react/img/logo.svg" width="36" height="36">
React
</a>
<ul class="nav-site">
<li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' or page.sectionid == 'tips' %} class="active"{% endif %}>docs</a></li>
<li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>support</a></li>
<li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>download</a></li>
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>blog</a></li>
<li><a href="http://github.com/facebook/react">github</a>
<ul class="nav-site nav-site-internal">
<li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' or page.sectionid == 'tips' %} class="active"{% endif %}>Docs</a></li>
<li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>Support</a></li>
<li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>Download</a></li>
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>Blog</a></li>
</ul>
<ul class="nav-site nav-site-external">
<li><a href="https://github.com/facebook/react">GitHub</a>
<li><a href="https://facebook.github.io/react-native/">React Native</a>
</ul>
</div>
</div>
@@ -78,7 +81,10 @@
A Facebook &amp; Instagram collaboration.<br>
<a href="/react/acknowledgements.html">Acknowledgements</a>
</div>
<div class="right">&copy; 2014 Facebook Inc.</div>
<div class="right">
&copy; 2013&ndash;{{ site.time | date: '%Y' }} Facebook Inc.<br>
Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
</div>
</footer>
</div>
<div id="fb-root"></div>

View File

@@ -6,15 +6,6 @@ sectionid: blog
<section class="content wrap blogContent">
{% include nav_blog.html %}
<div class="inner-content">
<h1>{{ page.title }}</h1>
<p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
<hr>
<div class="post">
{{ content }}
</div>
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
{% include blog_post.html isPermalink="true" page=page content=content %}
</div>
</section>

View File

@@ -8,13 +8,15 @@ layout: default
<div class="subHeader">{{ page.description }}</div>
{{ content }}
<div class="docs-prevnext">
{% if page.prev %}
<a class="docs-prev" href="/react/docs/{{ page.prev }}">&larr; Prev</a>
{% endif %}
{% if page.next %}
<a class="docs-next" href="/react/docs/{{ page.next }}">Next &rarr;</a>
{% endif %}
</div>
{% if page.prev or page.next %}
<div class="docs-prevnext">
{% if page.prev %}
<a class="docs-prev" href="/react/docs/{{ page.prev }}">&larr; Prev</a>
{% endif %}
{% if page.next %}
<a class="docs-next" href="/react/docs/{{ page.next }}">Next &rarr;</a>
{% endif %}
</div>
{% endif %}
</div>
</section>

View File

@@ -1,9 +1,9 @@
---
title: JSFiddle Integration
author: Christopher Chedeau
author: vjeux
---
[JSFiddle](http://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available.
[JSFiddle](https://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available.
<blockquote class="twitter-tweet" align="center"><p>React (by Facebook) is now available on JSFiddle. <a href="http://t.co/wNQf9JPv5u" title="http://facebook.github.io/react/">facebook.github.io/react/</a></p>&mdash; JSFiddle (@jsfiddle) <a href="https://twitter.com/jsfiddle/status/341114115781177344">June 2, 2013</a></blockquote>

View File

@@ -1,6 +1,6 @@
---
title: Why did we build React?
author: Pete Hunt
author: petehunt
---
There are a lot of JavaScript MVC frameworks out there. Why did we build React
@@ -40,7 +40,7 @@ React really shines when your data changes over time.
In a traditional JavaScript application, you need to look at what data changed
and imperatively make changes to the DOM to keep it up-to-date. Even AngularJS,
which provides a declarative interface via directives and data binding [requires
a linking function to manually update DOM nodes](http://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
a linking function to manually update DOM nodes](https://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
React takes a different approach.
@@ -74,7 +74,7 @@ some pretty cool things with it:
- We've built internal prototypes that run React apps in a web worker and use
React to drive **native iOS views** via an Objective-C bridge.
- You can run React
[on the server](http://github.com/petehunt/react-server-rendering-example)
[on the server](https://github.com/petehunt/react-server-rendering-example)
for SEO, performance, code sharing and overall flexibility.
- Events behave in a consistent, standards-compliant way in all browsers
(including IE8) and automatically use

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #1"
author: Vjeux
author: vjeux
---
React was open sourced two weeks ago and it's time for a little round-up of what has been going on.
@@ -38,10 +38,10 @@ It looks like [Ben Alpert](http://benalpert.com/) is the first person outside of
## Origins of React
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](http://facebook.github.io/react/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/react/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
> React isn't quite like any other popular Javascript libraries, and it solves a very specific problem: complex UI rendering. It's also intended to be used along side many other popular libraries. For example, React works well with Backbone.js, amongst many others.
>
> React was born out of frustrations with the common pattern of writing two-way data bindings in complex MVC apps. React is an implementation of one-way data bindings.
>
> [Read the full post...](http://www.quora.com/React-JS-Library/How-is-Facebooks-React-JavaScript-library/answer/Lee-Byron?srid=3DcX)
> [Read the full post...](https://www.quora.com/React-JS-Library/How-is-Facebooks-React-JavaScript-library/answer/Lee-Byron?srid=3DcX)

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #2"
author: Vjeux
author: vjeux
---
Since the launch we have received a lot of feedback and are actively working on React 0.4. In the meantime, here are the highlights of this week.
@@ -21,12 +21,12 @@ Since the launch we have received a lot of feedback and are actively working on
## React and Socket.IO Chat Application
[Danial Khosravi](http://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO.
[Danial Khosravi](https://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO.
> A week ago I was playing with AngularJS and [this little chat application](https://github.com/btford/angular-socket-io-im) which uses socket.io and nodejs for realtime communication. Yesterday I saw a post about ReactJS in [EchoJS](http://www.echojs.com/) and started playing with this UI library. After playing a bit with React, I decided to write and chat application using React and I used Bran Ford's Backend for server side of this little app.
> <figure>[![](/react/img/blog/chatapp.png)](http://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)</figure>
> <figure>[![](/react/img/blog/chatapp.png)](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)</figure>
>
> [Read the full post...](http://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)
> [Read the full post...](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)
## React and Other Frameworks
@@ -36,7 +36,7 @@ Since the launch we have received a lot of feedback and are actively working on
>
> We've designed React from the beginning to work well with other libraries. Angular is no exception. Let's take the original Angular example and use React to implement the fundoo-rating directive.
>
> [Read the full post...](http://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look)
> [Read the full post...](https://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look)
In the same vein, [Markov Twain](https://twitter.com/markov_twain/status/345702941845499906) re-implemented the examples on the front-page [with Ember](http://jsbin.com/azihiw/2/edit) and [Vlad Yazhbin](https://twitter.com/vla) re-implemented the tutorial [with Angular](http://jsfiddle.net/vla/Cdrse/).
@@ -64,7 +64,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v
Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences:
- [Whitespace removal](http://facebook.github.io/react/docs/jsx-is-not-html.html)
- [HTML Entities](http://facebook.github.io/react/docs/jsx-is-not-html.html)
- [Comments](http://facebook.github.io/react/docs/jsx-is-not-html.html)
- [Custom HTML Attributes](http://facebook.github.io/react/docs/jsx-is-not-html.html)
- [Whitespace removal](/react/docs/jsx-is-not-html.html)
- [HTML Entities](/react/docs/jsx-is-not-html.html)
- [Comments](/react/docs/jsx-is-not-html.html)
- [Custom HTML Attributes](/react/docs/jsx-is-not-html.html)

View File

@@ -1,6 +1,6 @@
---
title: "React v0.3.3"
author: Paul O'Shannessy
author: zpao
---
We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use.

View File

@@ -1,13 +1,13 @@
---
title: "Community Round-up #3"
author: Vjeux
author: vjeux
---
The highlight of this week is that an interaction-heavy app has been ported to React. React components are solving issues they had with nested views.
## Moving From Backbone To React
[Clay Allsopp](http://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React.
[Clay Allsopp](https://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React.
> [<img style="float: right; margin: 0 0 10px 10px;" src="/react/img/blog/propeller-logo.png" />](http://usepropeller.com/blog/posts/from-backbone-to-react/)Subviews involve a lot of easy-to-forget boilerplate that Backbone (by design) doesn't automate. Libraries like Backbone.Marionette offer more abstractions to make view nesting easier, but they're all limited by the fact that Backbone delegates how and went view-document attachment occurs to the application code.
>
@@ -19,7 +19,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
## Grunt Task for JSX
[Eric Clemmons](http://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your Javascript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together.
[Eric Clemmons](https://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your Javascript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together.
> Grunt task for compiling Facebook React's .jsx templates into .js
>

View File

@@ -1,6 +1,6 @@
---
title: "New in React v0.4: Autobind by Default"
author: Paul O'Shannessy
author: zpao
---
React v0.4 is very close to completion. As we finish it off, we'd like to share with you some of the major changes we've made since v0.3. This is the first of several posts we'll be making over the next week.
@@ -8,7 +8,7 @@ React v0.4 is very close to completion. As we finish it off, we'd like to share
## What is React.autoBind?
If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](http://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be.
If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](https://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be.
Before we launched React, we would write this:

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #4"
author: Vjeux
author: vjeux
---
React reconciliation process appears to be very well suited to implement a text editor with a live preview as people at Khan Academy show us.
@@ -47,11 +47,11 @@ Over the past several weeks, members of our team, [Pete Hunt](http://www.petehun
[Pete Hunt](http://www.petehunt.net/) recorded himself implementing a simple `<Blink>` tag in React.
<figure><iframe src="http://player.vimeo.com/video/67248575" width="500" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure>
<figure><iframe src="https://player.vimeo.com/video/67248575" width="500" height="340" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure>
## Snake in React
[Tom Occhino](http://tomocchino.com/) implemented Snake in 150 lines with React.
> [Check the source on Github](https://github.com/tomocchino/react-snake/blob/master/src/snake.js)
> <figure>[![](/react/img/blog/snake.png)](http://tomocchino.github.io/react-snake/)</figure>
> <figure>[![](/react/img/blog/snake.png)](https://tomocchino.github.io/react-snake/)</figure>

View File

@@ -1,6 +1,6 @@
---
title: "New in React v0.4: Prop Validation and Default Values"
author: Paul O'Shannessy
author: zpao
---
Many of the questions we got following the public launch of React revolved around `props`, specifically that people wanted to do validation and to make sure their components had sensible defaults.

View File

@@ -1,12 +1,12 @@
---
title: "React v0.4.0"
author: Paul O'Shannessy
author: zpao
---
Over the past 2 months we've been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we're proud to announce the availability of React v0.4!
This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the [Google Group](http://groups.google.com/group/reactjs), and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!
This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the [Google Group](https://groups.google.com/group/reactjs), and issues and pull requests on GitHub. We've had contributions ranging from documentation improvements to major changes to React's rendering. We've seen people integrate React into the tools they're using and the products they're building, and we're all very excited to see what our budding community builds next!
React v0.4 has some big changes. We've also restructured the documentation to better communicate how to use React. We've summarized the changes below and linked to documentation where we think it will be especially useful.
@@ -18,10 +18,10 @@ When you're ready, [go download it](/react/downloads.html)!
* Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
* Support for more DOM elements and attributes (e.g., `<canvas>`)
* Improved server-side rendering APIs. `React.renderComponentToString(<component>, callback)` allows you to use React on the server and generate markup which can be sent down to the browser.
* `prop` improvements: validation and default values. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](http://facebook.github.io/react/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](http://facebook.github.io/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](http://facebook.github.io/react/docs/forms.html)
* `prop` improvements: validation and default values. [Read our blog post for details...](/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](/react/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](/react/docs/forms.html)
* We've implemented an improved synthetic event system that conforms to the W3C spec.
* Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as its second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #5"
author: Vjeux
author: vjeux
---
We launched the [React Facebook Page](https://www.facebook.com/react) along with the React v0.4 launch. 700 people already liked it to get updated on the project :)
@@ -52,7 +52,7 @@ Learning a new library is always easier when you have working examples you can p
## React Chosen Wrapper
[Cheng Lou](https://github.com/chenglou) wrote a wrapper for the [Chosen](http://harvesthq.github.io/chosen/) input library called [react-chosen](https://github.com/chenglou/react-chosen). It took just 25 lines to be able to use jQuery component as a React one.
[Cheng Lou](https://github.com/chenglou) wrote a wrapper for the [Chosen](https://harvesthq.github.io/chosen/) input library called [react-chosen](https://github.com/chenglou/react-chosen). It took just 25 lines to be able to use jQuery component as a React one.
```javascript
React.renderComponent(
@@ -60,7 +60,7 @@ React.renderComponent(
<option value="Facebook">Facebook</option>
<option value="Harvest">Harvest</option>
</Chosen>
, document.body);
, document.getElementById('example'));
```
@@ -68,14 +68,14 @@ React.renderComponent(
[Domenic Denicola](http://domenicdenicola.com/) wrote a slide deck about the great applications of ES6 features and one slide shows how we could use Template Strings to compile JSX at run-time without the need for a pre-processing phase.
<figure><iframe src="http://www.slideshare.net/slideshow/embed_code/24187146?rel=0&startSlide=36" width="600" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe></figure>
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/24187146?rel=0&startSlide=36" width="600" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe></figure>
## React Presentation
[Tom Occhino](http://tomocchino.com/) and [Jordan Walke](https://github.com/jordwalke), React developers, did a presentation of React at Facebook Seattle's office. Check out the first 25 minutes for the presentation and the remaining 45 for a Q&A. I highly recommend you watching this video.
<figure><iframe width="650" height="400" src="//www.youtube.com/embed/XxVg_s8xAms" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="650" height="400" src="//www.youtube-nocookie.com/embed/XxVg_s8xAms" frameborder="0" allowfullscreen></iframe></figure>
## Docs

View File

@@ -1,6 +1,6 @@
---
title: "React v0.4.1"
author: Paul O'Shannessy
author: zpao
---
React v0.4.1 is a small update, mostly containing correctness fixes. Some code has been restructured internally but those changes do not impact any of our public APIs.

View File

@@ -1,6 +1,6 @@
---
title: "Use React and JSX in Ruby on Rails"
author: Paul O'Shannessy
author: zpao
---
Today we're releasing a gem to make it easier to use React and JSX in Ruby on Rails applications: [react-rails](https://github.com/facebook/react-rails).
@@ -38,7 +38,7 @@ When you name your file with `myfile.js.jsx`, `react-rails` will automatically t
```js
/** @jsx React.DOM */
React.renderComponent(<MyComponent/>, document.body)
React.renderComponent(<MyComponent/>, document.getElementById('example'))
```

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #6"
author: Vjeux
author: vjeux
---
This is the first Community Round-up where none of the items are from Facebook/Instagram employees. It's great to see the adoption of React growing.
@@ -54,7 +54,7 @@ este.demos.react.todoApp = este.react.create (`/** @lends {React.ReactComponent.
## React Stylus Boilerplate
[Zaim Bakar](http://zaim.github.io/) shared his boilerplate to get started with Stylus CSS processor.
[Zaim Bakar](https://zaim.github.io/) shared his boilerplate to get started with Stylus CSS processor.
> This is my boilerplate React project using Grunt as the build tool, and Stylus as my CSS preprocessor.
>

View File

@@ -1,6 +1,6 @@
---
title: "Use React and JSX in Python Applications"
author: Kunal Mehta
author: kmeht
---
Today we're happy to announce the initial release of [PyReact](https://github.com/facebook/react-python), which makes it easier to use React and JSX in your Python applications. It's designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #7"
author: Vjeux
author: vjeux
---
It's been three months since we open sourced React and it is going well. Some stats so far:
@@ -10,7 +10,7 @@ It's been three months since we open sourced React and it is going well. Some st
* [226 posts on Google Group](https://groups.google.com/forum/#!forum/reactjs)
* [76 Github projects using React](https://gist.github.com/vjeux/6335762)
* [30 contributors](https://github.com/facebook/react/graphs/contributors)
* [15 blog posts](http://facebook.github.io/react/blog/)
* [15 blog posts](/react/blog/)
* 2 early adopters: [Khan Academy](http://benalpert.com/2013/06/09/using-react-to-speed-up-khan-academy.html) and [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/)

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #8"
author: Vjeux
author: vjeux
---
A lot has happened in the month since our last update. Here are some of the more interesting things we've found. But first, we have a couple updates before we share links.
@@ -66,4 +66,4 @@ While this is not going to work for all the attributes since they are camelCased
[Vjeux](http://blog.vjeux.com/) re-implemented the display part of the IRC logger in React. Just 130 lines are needed for a performant infinite scroll with timestamps and color-coded author names.
<iframe width="100%" height="300" src="http://jsfiddle.net/vjeux/QL9tz/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
[View the source on JSFiddle...](http://jsfiddle.net/vjeux/QL9tz)

View File

@@ -1,6 +1,6 @@
---
title: "React v0.5"
author: Paul O'Shannessy
author: zpao
---
This release is the result of several months of hard work from members of the team and the community. While there are no groundbreaking changes in core, we've worked hard to improve performance and memory usage. We've also worked hard to make sure we are being consistent in our usage of DOM properties.

View File

@@ -1,6 +1,6 @@
---
title: "React v0.5.1"
author: Paul O'Shannessy
author: zpao
---
This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to [Ben Alpert][1], [Andrey Popp][2], and [Laurence Rowe][3] for their contributions!

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #9"
author: Vjeux
author: vjeux
---
We organized a React hackathon last week-end in the Facebook Seattle office. 50 people, grouped into 15 teams, came to hack for a day on React. It was a lot of fun and we'll probably organize more in the future.
@@ -29,7 +29,7 @@ We organized a React hackathon last week-end in the Facebook Seattle office. 50
The video will be available soon on the [JSConf EU website](http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-best-practices.html), but in the meantime, here are Pete's slides:
<figure><iframe src="http://www.slideshare.net/slideshow/embed_code/26589373" width="550" height="450" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen></iframe></figure>
<figure><iframe src="https://www.slideshare.net/slideshow/embed_code/26589373" width="550" height="450" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen></iframe></figure>
## Pump - Clojure bindings for React

View File

@@ -1,142 +0,0 @@
---
title: "Thinking in React"
author: Pete Hunt
---
React is, in my opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us at Facebook and Instagram.
One of the many great parts of React is how it makes you think about apps as you build them. In this post I'll walk you through the thought process of building a searchable product data table using React.
## Start with a mock
Imagine that we already have a JSON API and a mock from our designer. Our designer apparently isn't very good because the mock looks like this:
![Mockup](/react/img/blog/thinking-in-react-mock.png)
Our JSON API returns some data that looks like this:
```
[
{category: "Sporting Goods", price: "$49.99", stocked: true, name: "Football"},
{category: "Sporting Goods", price: "$9.99", stocked: true, name: "Baseball"},
{category: "Sporting Goods", price: "$29.99", stocked: false, name: "Basketball"},
{category: "Electronics", price: "$99.99", stocked: true, name: "iPod Touch"},
{category: "Electronics", price: "$399.99", stocked: false, name: "iPhone 5"},
{category: "Electronics", price: "$199.99", stocked: true, name: "Nexus 7"}
];
```
## Step 1: break the UI into a component hierarchy
The first thing you'll want to do is to draw boxes around every component (and subcomponent) in the mock and give them all names. If you're working with a designer they may have already done this, so go talk to them! Their Photoshop layer names may end up being the names of your React components!
But how do you know what should be its own component? Just use the same techniques for deciding if you should create a new function or object. One such technique is the [single responsibility principle](http://en.wikipedia.org/wiki/Single_responsibility_principle), that is, a component should ideally only do one thing. If it ends up growing it should be decomposed into smaller subcomponents.
Since you're often displaying a JSON data model to a user, you'll find that if your model was built correctly your UI (and therefore your component structure) will map nicely onto it. That's because user interfaces and data models tend to adhere to the same *information architecture* which means the work of separating your UI into components is often trivial. Just break it up into components that represent exactly one piece of your data model.
![Component diagram](/react/img/blog/thinking-in-react-components.png)
You'll see here that we have five components in our simple app. I've italicized the data each component represents.
1. **`FilterableProductTable` (orange):** contains the entirety of the example
2. **`SearchBar` (blue):** receives all *user input*
3. **`ProductTable` (green):** displays and filters the *data collection* based on *user input*
4. **`ProductCategoryRow` (turquoise):** displays a heading for each *category*
5. **`ProductRow` (red):** displays a row for each *product*
If you look at `ProductTable` you'll see that the table header (containing the "Name" and "Price" labels) isn't its own component. This is a matter of preference and there's an argument to be made either way. For this example I left it as part of `ProductTable` because it is part of rendering the *data collection* which is `ProductTable`'s responsibility. However if this header grows to be complex (i.e. if we were to add affordances for sorting) it would certainly make sense to make this its own `ProductTableHeader` component.
Now that we've identified the components in our mock, let's arrange them into a hierarchy. This is easy. Components that appear within another component in the mock should appear as a child in the hierarchy:
* `FilterableProductTable`
* `SearchBar`
* `ProductTable`
* `ProductCategoryRow`
* `ProductRow`
## Step 2: Build a static version in React
<iframe width="100%" height="300" src="http://jsfiddle.net/6wQMG/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
Now that you have your component hierarchy it's time to start implementing your app. The easiest way is to build a version that takes your data model and renders the UI but has no interactivity. It's easiest to decouple these processes because building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing. We'll see why.
To build a static version of your app that renders your data model you'll want to build components that reuse other components and pass data using *props*. *props* are a way of passing data from parent to child. If you're familiar with the concept of *state*, **don't use state at all** to build this static version. State is reserved only for interactivity, that is, data that changes over time. Since this is a static version of the app you don't need it.
You can build top-down or bottom-up. That is, you can either start with building the components higher up in the hierarchy (i.e. starting with `FilterableProductTable`) or with the ones lower in it (`ProductRow`). In simpler examples it's usually easier to go top-down and on larger projects it's easier to go bottom-up and write tests as you build.
At the end of this step you'll have a library of reusable components that render your data model. The components will only have `render()` methods since this is a static version of your app. The component at the top of the hierarchy (`FilterableProductTable`) will take your data model as a prop. If you make a change to your underlying data model and call `renderComponent()` again the UI will be updated. It's easy to see how your UI is updated and where to make changes since there's nothing complicated going on since React's **one-way data flow** (also called *one-way binding*) keeps everything modular, easy to reason about, and fast.
Simply refer to the [React docs](http://facebook.github.io/react/docs/) if you need help executing this step.
### A brief interlude: props vs state
There are two types of "model" data in React: props and state. It's important to understand the distinction between the two; skim [the official React docs](http://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html) if you aren't sure what the difference is.
## Step 3: Identify the minimal (but complete) representation of UI state
To make your UI interactive you need to be able to trigger changes to your underlying data model. React makes this easy with **state**.
To build your app correctly you first need to think of the minimal set of mutable state that your app needs. The key here is DRY: *Don't Repeat Yourself*. Figure out what the absolute minimal representation of the state of your application needs to be and compute everything else you need on-demand. For example, if you're building a TODO list, just keep an array of the TODO items around; don't keep a separate state variable for the count. Instead, when you want to render the TODO count simply take the length of the TODO items array.
Think of all of the pieces of data in our example application. We have:
* The original list of products
* The search text the user has entered
* The value of the checkbox
* The filtered list of products
Let's go through each one and figure out which one is state. Simply ask three questions about each piece of data:
1. Is it passed in from a parent via props? If so, it probably isn't state.
2. Does it change over time? If not, it probably isn't state.
3. Can you compute it based on any other state or props in your component? If so, it's not state.
The original list of products is passed in as props, so that's not state. The search text and the checkbox seem to be state since they change over time and can't be computed from anything. And finally, the filtered list of products isn't state because it can be computed by combining the original list of products with the search text and value of the checkbox.
So finally, our state is:
* The search text the user has entered
* The value of the checkbox
## Step 4: Identify where your state should live
<iframe width="100%" height="300" src="http://jsfiddle.net/QvHnx/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
OK, so we've identified what the minimal set of app state is. Next we need to identify which component mutates, or *owns*, this state.
Remember: React is all about one-way data flow down the component hierarchy. It may not be immediately clear which component should own what state. **This is often the most challenging part for newcomers to understand,** so follow these steps to figure it out:
For each piece of state in your application:
* Identify every component that renders something based on that state.
* Find a common owner component (a single component above all the components that need the state in the hierarchy).
* Either the common owner or another component higher up in the hierarchy should own the state.
* If you can't find a component where it makes sense to own the state, create a new component simply for holding the state and add it somewhere in the hierarchy above the common owner component.
Let's run through this strategy for our application:
* `ProductTable` needs to filter the product list based on state and `SearchBar` needs to display the search text and checked state.
* The common owner component is `FilterableProductTable`.
* It conceptually makes sense for the filter text and checked value to live in `FilterableProductTable`
Cool, so we've decided that our state lives in `FilterableProductTable`. First, add a `getInitialState()` method to `FilterableProductTable` that returns `{filterText: '', inStockOnly: false}` to reflect the initial state of your application. Then pass `filterText` and `inStockOnly` to `ProductTable` and `SearchBar` as a prop. Finally, use these props to filter the rows in `ProductTable` and set the values of the form fields in `SearchBar`.
You can start seeing how your application will behave: set `filterText` to `"ball"` and refresh your app. You'll see the data table is updated correctly.
## Step 5: Add inverse data flow
<iframe width="100%" height="300" src="http://jsfiddle.net/3Vs3Q/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
So far we've built an app that renders correctly as a function of props and state flowing down the hierarchy. Now it's time to support data flowing the other way: the form components deep in the hierarchy need to update the state in `FilterableProductTable`.
React makes this data flow explicit to make it easy to understand how your program works, but it does require a little more typing than traditional two-way data binding. React provides an add-on called `ReactLink` to make this pattern as convenient as two-way binding, but for the purpose of this post we'll keep everything explicit.
If you try to type or check the box in the current version of the example you'll see that React ignores your input. This is intentional, as we've set the `value` prop of the `input` to always be equal to the `state` passed in from `FilterableProductTable`.
Let's think about what we want to happen. We want to make sure that whenever the user changes the form we update the state to reflect the user input. Since components should only update their own state, `FilterableProductTable` will pass a callback to `SearchBar` that will fire whenever the state should be updated. We can use the `onChange` event on the inputs to be notified of it. And the callback passed by `FilterableProductTable` will call `setState()` and the app will be updated.
Though this sounds like a lot it's really just a few lines of code. And it's really explicit how your data is flowing throughout the app.
## And that's it
Hopefully this gives you an idea of how to think about building components and applications with React. While it may be a little more typing than you're used to, remember that code is read far more than it's written, and it's extremely easy to read this modular, explicit code. As you start to build large libraries of components you'll appreciate this explicitness and modularity, and with code reuse your lines of code will start to shrink :)

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #10"
author: Vjeux
author: vjeux
---
This is the 10th round-up already and React has come quite far since it was open sourced. Almost all new web projects at Khan Academy, Facebook, and Instagram are being developed using React. React has been deployed in a variety of contexts: a Chrome extension, a Windows 8 application, mobile websites, and desktop websites supporting Internet Explorer 8! Language-wise, React is not only being used within JavaScript but also CoffeeScript and ClojureScript.
@@ -26,7 +26,7 @@ The best part is that no drastic changes have been required to support all those
[Pete Hunt](http://www.petehunt.net/)'s talk at JSConf EU 2013 is now available in video.
<figure><iframe width="600" height="370" src="//www.youtube.com/embed/x7cQ3mrcKaY" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="600" height="370" src="//www.youtube-nocookie.com/embed/x7cQ3mrcKaY" frameborder="0" allowfullscreen></iframe></figure>
## Server-side React with PHP

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #11"
author: Vjeux
author: vjeux
---
This round-up is the proof that React has taken off from its Facebook's root: it features three in-depth presentations of React done by external people. This is awesome, keep them coming!
@@ -9,25 +9,25 @@ This round-up is the proof that React has taken off from its Facebook's root: it
[Steve Luscher](https://github.com/steveluscher) working at [LeanPub](https://leanpub.com/) made a 30 min talk at [Super VanJS](https://twitter.com/vanjs). He does a remarkable job at explaining why React is so fast with very exciting demos using the HTML5 Audio API.
<figure><iframe width="600" height="338" src="//www.youtube.com/embed/1OeXsL5mr4g" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="600" height="338" src="//www.youtube-nocookie.com/embed/1OeXsL5mr4g" frameborder="0" allowfullscreen></iframe></figure>
## React Tips
[Connor McSheffrey](http://connormcsheffrey.com/) and [Cheng Lou](https://github.com/chenglou) added a new section to the documentation. It's a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we [encourage you to contribute](http://facebook.github.io/react/tips/introduction.html)!
[Connor McSheffrey](http://connormcsheffrey.com/) and [Cheng Lou](https://github.com/chenglou) added a new section to the documentation. It's a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we [encourage you to contribute](/react/tips/introduction.html)!
- [Inline Styles](http://facebook.github.io/react/tips/inline-styles.html)
- [If-Else in JSX](http://facebook.github.io/react/tips/if-else-in-JSX.html)
- [Self-Closing Tag](http://facebook.github.io/react/tips/self-closing-tag.html)
- [Maximum Number of JSX Root Nodes](http://facebook.github.io/react/tips/maximum-number-of-jsx-root-nodes.html)
- [Shorthand for Specifying Pixel Values in style props](http://facebook.github.io/react/tips/style-props-value-px.html)
- [Type of the Children props](http://facebook.github.io/react/tips/children-props-type.html)
- [Value of null for Controlled Input](http://facebook.github.io/react/tips/controlled-input-null-value.html)
- [`componentWillReceiveProps` Not Triggered After Mounting](http://facebook.github.io/react/tips/componentWillReceiveProps-not-triggered-after-mounting.html)
- [Props in getInitialState Is an Anti-Pattern](http://facebook.github.io/react/tips/props-in-getInitialState-as-anti-pattern.html)
- [DOM Event Listeners in a Component](http://facebook.github.io/react/tips/dom-event-listeners.html)
- [Load Initial Data via AJAX](http://facebook.github.io/react/tips/initial-ajax.html)
- [False in JSX](http://facebook.github.io/react/tips/false-in-jsx.html)
- [Inline Styles](/react/tips/inline-styles.html)
- [If-Else in JSX](/react/tips/if-else-in-JSX.html)
- [Self-Closing Tag](/react/tips/self-closing-tag.html)
- [Maximum Number of JSX Root Nodes](/react/tips/maximum-number-of-jsx-root-nodes.html)
- [Shorthand for Specifying Pixel Values in style props](/react/tips/style-props-value-px.html)
- [Type of the Children props](/react/tips/children-props-type.html)
- [Value of null for Controlled Input](/react/tips/controlled-input-null-value.html)
- [`componentWillReceiveProps` Not Triggered After Mounting](/react/tips/componentWillReceiveProps-not-triggered-after-mounting.html)
- [Props in getInitialState Is an Anti-Pattern](/react/tips/props-in-getInitialState-as-anti-pattern.html)
- [DOM Event Listeners in a Component](/react/tips/dom-event-listeners.html)
- [Load Initial Data via AJAX](/react/tips/initial-ajax.html)
- [False in JSX](/react/tips/false-in-jsx.html)
## Intro to the React Framework
@@ -50,7 +50,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it
## Genesis Skeleton
[Eric Clemmons](http://ericclemmons.github.io/) is working on a "Modern, opinionated, full-stack starter kit for rapid, streamlined application development". The version 0.4.0 has just been released and has first-class support for React.
[Eric Clemmons](https://ericclemmons.github.io/) is working on a "Modern, opinionated, full-stack starter kit for rapid, streamlined application development". The version 0.4.0 has just been released and has first-class support for React.
<figure>[![](/react/img/blog/genesis_skeleton.png)](http://genesis-skeleton.com/)</figure>

View File

@@ -1,6 +1,6 @@
---
title: "React v0.5.2, v0.4.2"
author: Paul O'Shannessy
author: zpao
---
Today we're releasing an update to address a potential XSS vulnerability that can arise when using user data as a `key`. Typically "safe" data is used for a `key`, for example, an id from your database, or a unique hash. However there are cases where it may be reasonable to use user generated content. A carefully crafted piece of content could result in arbitrary JS execution. While we make a very concerted effort to ensure all text is escaped before inserting it into the DOM, we missed one case. Immediately following the discovery of this vulnerability, we performed an audit to ensure we this was the only such vulnerability.
@@ -15,7 +15,7 @@ While we've encouraged responsible disclosure as part of [Facebook's whitehat bo
You can learn more about the vulnerability discussed here: [CVE-2013-7035][cve].
[download]: http://facebook.github.io/react/downloads.html
[download]: /react/downloads.html
[bounty]: https://www.facebook.com/whitehat/
[ember]: http://emberjs.com/security/
[cve]: https://groups.google.com/forum/#!topic/reactjs/OIqxlB2aGfU

View File

@@ -1,6 +1,6 @@
---
title: "React v0.8"
author: Paul O'Shannessy
author: zpao
---
I'll start by answering the obvious question:

View File

@@ -1,28 +1,28 @@
---
title: "Community Round-up #12"
author: Vjeux
author: vjeux
---
React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/react/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](http://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!
React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/react/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](https://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!
## The Future of Javascript MVC
[David Nolen](http://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.
[David Nolen](https://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](/react/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.
> We've known this for some time over here in the ClojureScript corner of the world - all of our collections are immutable and modeled directly on the original Clojure versions written in Java. Modern JavaScript engines have now been tuned to the point that it's no longer uncommon to see collection performance within 2.5X of the Java Virtual Machine.
>
> Wait, wait, wait. What does the performance of persistent data structures have to do with the future of JavaScript MVCs?
>
> A whole lot.
> <figure>[![](/react/img/blog/om-backbone.png)](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)</figure>
> <figure>[![](/react/img/blog/om-backbone.png)](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)</figure>
>
> [Read the full article...](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)
> [Read the full article...](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/)
## Scroll Position with React
Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.
Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](/react/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](/react/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.
> We can check the scroll position before the component has updated with componentWillUpdate and scroll if necessary at componentDidUpdate
>
@@ -45,10 +45,10 @@ componentDidUpdate: function() {
## Lights Out
React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](http://facebook.github.io/react/docs/animation.html) to implement animations.
<figure>[![](/react/img/blog/lights-out.png)](http://chenglou.github.io/react-lights-out/)</figure>
React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](/react/docs/animation.html) to implement animations.
<figure>[![](/react/img/blog/lights-out.png)](https://chenglou.github.io/react-lights-out/)</figure>
[Try it out!](http://chenglou.github.io/react-lights-out/)
[Try it out!](https://chenglou.github.io/react-lights-out/)
## Reactive Table Bookmarklet
@@ -63,9 +63,7 @@ React declarative approach is well suited to write games. [Cheng Lou](https://gi
[Ross Allen](https://twitter.com/ssorallen) implemented [MontageJS](http://montagejs.org/)'s [Reddit tutorial](http://montagejs.org/docs/tutorial-reddit-client-with-montagejs.html) in React. This is a good opportunity to compare the philosophies of the two libraries.
<iframe width="100%" height="300" src="http://jsfiddle.net/ssorallen/fEsYt/embedded/result,html,js" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
[View the source on JSFiddle...](http://jsfiddle.net/ssorallen/fEsYt/)
[View the source on JSFiddle...](https://jsfiddle.net/ssorallen/fEsYt/)
## Writing Good React Components
@@ -93,9 +91,9 @@ hoodie new todomvc -t "hoodiehq/hoodie-react-todomvc"
## JSX Compiler
Ever wanted to have a quick way to see what a JSX tag would be converted to? [Tim Yung](http://www.yungsters.com/) made a page for it.
<figure>[![](/react/img/blog/jsx-compiler.png)](http://facebook.github.io/react/jsx-compiler.html)</figure>
<figure>[![](/react/img/blog/jsx-compiler.png)](/react/jsx-compiler.html)</figure>
[Try it out!](http://facebook.github.io/react/jsx-compiler.html)
[Try it out!](/react/jsx-compiler.html)

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #13"
author: Vjeux
author: vjeux
---
Happy holidays! This blog post is a little-late Christmas present for all the React users. Hopefully it will inspire you to write awesome web apps in 2014!
@@ -12,14 +12,14 @@ Happy holidays! This blog post is a little-late Christmas present for all the Re
<figure><iframe src="//player.vimeo.com/video/79659941" width="220" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></figure>
[Try out the demos!](http://petehunt.github.io/react-touch/)
[Try out the demos!](https://petehunt.github.io/react-touch/)
## Introduction to React
[Stoyan Stefanov](http://www.phpied.com/) talked at Joe Dev On Tech about React. He goes over all the features of the library and ends with a concrete example.
<figure><iframe width="560" height="315" src="//www.youtube.com/embed/SMMRJif5QW0" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/SMMRJif5QW0" frameborder="0" allowfullscreen></iframe></figure>
## JSX: E4X The Good Parts

View File

@@ -1,11 +1,11 @@
---
title: "React Chrome Developer Tools"
author: Sebastian Markbåge
author: sebmarkbage
---
With the new year, we thought you'd enjoy some new tools for debugging React code. Today we're releasing the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), an extension to the Chrome Developer Tools. [Download them from the Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi).
<figure><iframe width="560" height="315" src="//www.youtube.com/embed/Cey7BS6dE0M" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/Cey7BS6dE0M" frameborder="0" allowfullscreen></iframe></figure>
You will get a new tab titled "React" in your Chrome DevTools. This tab shows you a list of the root React Components that are rendered on the page as well as the subcomponents that each root renders.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #14"
author: Vjeux
author: vjeux
---
The theme of this first round-up of 2014 is integration. I've tried to assemble a list of articles and projects that use React in various environments.
@@ -28,7 +28,7 @@ React is only one-piece of your web application stack. [Mark Lussier](https://gi
## React Rails Tutorial
[Selem Delul](http://selem.im) bundled the [React Tutorial](http://facebook.github.io/react/docs/tutorial.html) into a rails app. This is a good example on how to get started with a rails project.
[Selem Delul](http://selem.im) bundled the [React Tutorial](/react/docs/tutorial.html) into a rails app. This is a good example on how to get started with a rails project.
> ```
git clone https://github.com/necrodome/react-rails-tutorial
@@ -45,7 +45,7 @@ rails s
[Eldar Djafarov](http://eldar.djafarov.com/) implemented a mixin to link Backbone models to React state and a small abstraction to write two-way binding on-top.
<iframe width="100%" height="300" src="http://jsfiddle.net/djkojb/qZf48/13/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
[View code on JSFiddle](http://jsfiddle.net/djkojb/qZf48/13/)
[Check out the blog post...](http://eldar.djafarov.com/2013/11/reactjs-mixing-with-backbone/)
@@ -71,8 +71,7 @@ rails s
[Thomas Aylott](http://subtlegradient.com/) implemented an API that looks like Web Components but using React underneath.
<iframe width="100%" height="300" src="http://jsfiddle.net/SubtleGradient/ue2Aa/embedded/html,js,result" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
[View the source on JSFiddle...](http://jsfiddle.net/SubtleGradient/ue2Aa)
## React vs Angular

View File

@@ -1,9 +1,9 @@
---
title: "Community Round-up #15"
author: Jonas Gebhardt
author: jgebhardt
---
Interest in React seems to have surged ever since David Nolen ([@swannodette](https://twitter.com/swannodette))'s introduction of [Om](https://github.com/swannodette/om) in his post ["The Future of Javascript MVC Frameworks"](http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/).
Interest in React seems to have surged ever since David Nolen ([@swannodette](https://twitter.com/swannodette))'s introduction of [Om](https://github.com/swannodette/om) in his post ["The Future of Javascript MVC Frameworks"](https://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/).
In this React Community Round-up, we are taking a closer look at React from a functional programming perspective.
@@ -15,13 +15,13 @@ To start things off, Eric Normand ([@ericnormand](https://twitter.com/ericnorman
> [Read the full post...](http://www.lispcast.com/react-another-level-of-indirection)
## Reagent: Minimalistic React for ClojureScript
Dan Holmsand ([@holmsand](https://twitter.com/holmsand)) created [Reagent](http://holmsand.github.io/reagent/), a simplistic ClojureScript API to React.
Dan Holmsand ([@holmsand](https://twitter.com/holmsand)) created [Reagent](https://holmsand.github.io/reagent/), a simplistic ClojureScript API to React.
> It allows you to define efficient React components using nothing but plain ClojureScript functions and data, that describe your UI using a Hiccup-like syntax.
>
> The goal of Reagent is to make it possible to define arbitrarily complex UIs using just a couple of basic concepts, and to be fast enough by default that you rarely have to care about performance.
>
> [Check it out on Github...](http://holmsand.github.io/reagent/)
> [Check it out on Github...](https://holmsand.github.io/reagent/)
## Functional DOM programming
@@ -34,7 +34,7 @@ React's one-way data-binding naturally lends itself to a functional programming
Pete also explains this in detail at his #MeteorDevShop talk (about 30 Minutes):
<iframe width="560" height="315" src="//www.youtube.com/embed/Lqcs6hPOcFw?start=2963" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/Lqcs6hPOcFw?start=2963" frameborder="0" allowfullscreen></iframe>
@@ -106,7 +106,7 @@ In a separate post, Dyrkell breaks down [how to build a binary clock component](
[[Demo](http://www.lexicallyscoped.com/demo/binclock/)] [[Code](https://github.com/fredyr/binclock/blob/master/src/binclock/core.cljs)]
### Time Travel: Implementing undo in Om
David Nolen shows how to leverage immutable data structures to [add global undo](http://swannodette.github.io/2013/12/31/time-travel/) functionality to an app using just 13 lines of ClojureScript.
David Nolen shows how to leverage immutable data structures to [add global undo](https://swannodette.github.io/2013/12/31/time-travel/) functionality to an app using just 13 lines of ClojureScript.
### A Step-by-Step Om Walkthrough

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #16"
author: Jonas Gebhardt
author: jgebhardt
---
There have been many posts recently covering the <i>why</i> and <i>how</i> of React. This week's community round-up includes a collection of recent articles to help you get started with React, along with a few posts that explain some of the inner workings.
@@ -54,7 +54,7 @@ It's great to see the React community expand internationally. [This site](http:/
### Egghead.io video tutorials
Joe Maddalone ([@joemaddalone](https://twitter.com/joemaddalone)) of [egghead.io](https://egghead.io/) created a series of React video tutorials, such as [this](http://www.youtube.com/watch?v=rFvZydtmsxM&feature=youtu.be&a) introduction to React Components. [[part 1](http://www.youtube.com/watch?v=rFvZydtmsxM&feature=youtu.be&a)], [[part 2](http://www.youtube.com/watch?v=5yvFLrt7N8M)]
Joe Maddalone ([@joemaddalone](https://twitter.com/joemaddalone)) of [egghead.io](https://egghead.io/) created a series of React video tutorials, such as [this](http://www.youtube-nocookie.com/watch?v=rFvZydtmsxM&feature=youtu.be&a) introduction to React Components. [[part 1](http://www.youtube-nocookie.com/watch?v=rFvZydtmsxM&feature=youtu.be&a)], [[part 2](http://www.youtube-nocookie.com/watch?v=5yvFLrt7N8M)]
### "React: Finally, a great server/client web stack"

View File

@@ -1,6 +1,6 @@
---
title: React v0.9 RC
author: Ben Alpert
author: spicyj
---
We're almost ready to release React v0.9! We're posting a release candidate so that you can test your apps on it; we'd much prefer to find show-stopping bugs now rather than after we release.
@@ -8,13 +8,13 @@ We're almost ready to release React v0.9! We're posting a release candidate so t
The release candidate is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.9.0-rc1.js>
Minified build for production: <http://fb.me/react-0.9.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-0.9.0-rc1.js>
Minified build for production: <https://fb.me/react-0.9.0-rc1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.9.0-rc1.js>
Minified build for production: <http://fb.me/react-with-addons-0.9.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.9.0-rc1.js>
Minified build for production: <https://fb.me/react-with-addons-0.9.0-rc1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.9.0-rc1.js>
<https://fb.me/JSXTransformer-0.9.0-rc1.js>
We've also published version `0.9.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

View File

@@ -1,6 +1,6 @@
---
title: React v0.9
author: Ben Alpert
author: spicyj
---
I'm excited to announce that today we're releasing React v0.9, which incorporates many bug fixes and several new features since the last release. This release contains almost four months of work, including over 800 commits from over 70 committers!
@@ -10,13 +10,13 @@ Thanks to everyone who tested the release candidate; we were able to find and fi
As always, the release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.9.0.js>
Minified build for production: <http://fb.me/react-0.9.0.min.js>
Dev build with warnings: <https://fb.me/react-0.9.0.js>
Minified build for production: <https://fb.me/react-0.9.0.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.9.0.js>
Minified build for production: <http://fb.me/react-with-addons-0.9.0.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.9.0.js>
Minified build for production: <https://fb.me/react-with-addons-0.9.0.min.js>
* **In-Browser JSX Transformer**
<http://fb.me/JSXTransformer-0.9.0.js>
<https://fb.me/JSXTransformer-0.9.0.js>
We've also published version `0.9.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #17"
author: Jonas Gebhardt
author: jgebhardt
---
@@ -15,12 +15,12 @@ Large parts of Facebook's web frontend are already powered by React. The recentl
Sberbank, Russia's largest bank, recently switched large parts of their site to use React, as detailed in [this post by Vyacheslav Slinko](https://groups.google.com/forum/#!topic/reactjs/Kj6WATX0atg).
### Relato
[Relato](http://bripkens.github.io/relato/) by [Ben Ripkens](https://github.com/bripkens) shows Open Source Statistics based on npm data. It features a filterable and sortable table built in React. Check it out &ndash; it's super fast!
[Relato](https://bripkens.github.io/relato/) by [Ben Ripkens](https://github.com/bripkens) shows Open Source Statistics based on npm data. It features a filterable and sortable table built in React. Check it out &ndash; it's super fast!
### Makona Editor
John Lynch ([@johnrlynch](https://twitter.com/johnrlynch)) created Makona, a block-style document editor for the web. Blocks of different content types comprise documents, authored using plain markup. At the switch of a toggle, block contents are then rendered on the page. While not quite a WYSIWYG editor, Makona uses plain textareas for input. This makes it compatible with a wider range of platforms than traditional rich text editors.
<figure>[![](/react/img/blog/makona-editor.png)](http://johnthethird.github.io/makona-editor/)</figure>
<figure>[![](/react/img/blog/makona-editor.png)](https://johnthethird.github.io/makona-editor/)</figure>
### Create Chrome extensions using React
React is in no way limited to just web pages. Brandon Tilley ([@BinaryMuse](https://twitter.com/BinaryMuse)) just released a detailed walk-through of [how he built his Chrome extension "Fast Tab Switcher" using React](http://brandontilley.com/2014/02/24/creating-chrome-extensions-with-react.html).
@@ -40,12 +40,12 @@ Javier Aguirre ([@javaguirre](https://twitter.com/javaguirre)) put together a si
### SVG-based graphical node editor
[NoFlo](http://noflojs.org/) and [Meemoo](http://meemoo.org/) developer [Forresto Oliphant](http://www.forresto.com/) built an awesome SVG-based [node editor](http://forresto.github.io/prototyping/react/) in React.
<figure>[![](/react/img/blog/react-svg-fbp.png)](http://forresto.github.io/prototyping/react/)</figure>
[NoFlo](http://noflojs.org/) and [Meemoo](http://meemoo.org/) developer [Forresto Oliphant](http://www.forresto.com/) built an awesome SVG-based [node editor](https://forresto.github.io/prototyping/react/) in React.
<figure>[![](/react/img/blog/react-svg-fbp.png)](https://forresto.github.io/prototyping/react/)</figure>
### Ultimate Tic-Tac-Toe Game in React
Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React version](http://ravicious.github.io/ultimate-ttt/) of [Ultimate Tic Tac Toe](http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/). Find the source [here](https://github.com/ravicious/ultimate-ttt).
Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React version](https://ravicious.github.io/ultimate-ttt/) of [Ultimate Tic Tac Toe](http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/). Find the source [here](https://github.com/ravicious/ultimate-ttt).
@@ -55,7 +55,7 @@ Rafał Cieślak ([@Ravicious](https://twitter.com/Ravicious)) wrote a [React ver
Emanuele shared this awesome demo video with us:
<iframe width="560" height="315" src="//www.youtube.com/embed/jYcpaemt90M" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/jYcpaemt90M" frameborder="0" allowfullscreen></iframe>
@@ -63,7 +63,7 @@ Emanuele shared this awesome demo video with us:
### Table Sorter
[Table Sorter](http://bgerm.github.io/react-table-sorter-demo/) by [bgerm](https://github.com/bgerm) [[source](https://github.com/bgerm/react-table-sorter-demo)] is another helpful React component.
[Table Sorter](https://bgerm.github.io/react-table-sorter-demo/) by [bgerm](https://github.com/bgerm) [[source](https://github.com/bgerm/react-table-sorter-demo)] is another helpful React component.
### Static-search
@@ -83,7 +83,7 @@ Dmitry Chestnykh [@dchest](https://twitter.com/dchest) wrote a [static search in
## React server rendering
Ever wonder how to pre-render React components on the server? [react-server-example](https://github.com/mhart/react-server-example) by Michael Hart ([@hichaelmart](http://twitter.com/hichaelmart)) walks through the necessary steps.
Ever wonder how to pre-render React components on the server? [react-server-example](https://github.com/mhart/react-server-example) by Michael Hart ([@hichaelmart](https://twitter.com/hichaelmart)) walks through the necessary steps.
Similarly, Alan deLevie ([@adelevie](https://twitter.com/adelevie)) created [react-client-server-starter](https://github.com/adelevie/react-client-server-starter), another detailed walk-through of how to server-render your app.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #18"
author: Jonas Gebhardt
author: jgebhardt
---
In this Round-up, we are taking a few closer looks at React's interplay with different frameworks and architectures.
@@ -41,7 +41,7 @@ Thomas Boyt ([@thomasaboyt](https://twitter.com/thomasaboyt)) wrote [this detail
## React vs. Ember
Eric Berry ([@coderberry](https://twitter.com/coderberry)) developed Ember equivalents for some of the official React examples. Read his post for a side-by-side comparison of the respective implementations: ["Facebook React vs. Ember"](http://instructure.github.io/blog/2013/12/17/facebook-react-vs-ember/).
Eric Berry ([@coderberry](https://twitter.com/coderberry)) developed Ember equivalents for some of the official React examples. Read his post for a side-by-side comparison of the respective implementations: ["Facebook React vs. Ember"](https://instructure.github.io/blog/2013/12/17/facebook-react-vs-ember/).
## React and plain old HTML
@@ -75,7 +75,7 @@ Ian Bicking ([@ianbicking](https://twitter.com/ianbicking)) of Mozilla Labs [exp
React was also recently mentioned at ng-conf, where the Angular team commented on React's concept of the virtual DOM:
<iframe width="560" height="315" src="//www.youtube.com/embed/srt3OBP2kGc?start=113" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/srt3OBP2kGc?start=113" frameborder="0" allowfullscreen></iframe>
## React and Web Components

View File

@@ -1,20 +1,20 @@
---
title: React v0.10 RC
author: Paul OShannessy
author: zpao
---
[v0.9 has only been out for a month](http://facebook.github.io/react/blog/2014/02/20/react-v0.9.html), but were getting ready to push out v0.10 already. Unlike v0.9 which took a long time, we don't have a long list of changes to talk about.
[v0.9 has only been out for a month](/react/blog/2014/02/20/react-v0.9.html), but were getting ready to push out v0.10 already. Unlike v0.9 which took a long time, we don't have a long list of changes to talk about.
The release candidate is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.10.0-rc1.js>
Minified build for production: <http://fb.me/react-0.10.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-0.10.0-rc1.js>
Minified build for production: <https://fb.me/react-0.10.0-rc1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.10.0-rc1.js>
Minified build for production: <http://fb.me/react-with-addons-0.10.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.10.0-rc1.js>
Minified build for production: <https://fb.me/react-with-addons-0.10.0-rc1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.10.0-rc1.js>
<https://fb.me/JSXTransformer-0.10.0-rc1.js>
We've also published version `0.10.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.
@@ -24,7 +24,7 @@ Please try these builds out and [file an issue on GitHub](https://github.com/fac
The main purpose of this release is to provide a smooth upgrade path as we evolve some of the implementation of core. In v0.9 we started warning in cases where you called methods on unmounted components. This is part of an effort to enforce the idea that the return value of a component (`React.DOM.div()`, `MyComponent()`) is in fact not a reference to the component instance React uses in the virtual DOM. The return value is instead a light-weight object that React knows how to use. Since the return value currently is a reference to the same object React uses internally, we need to make this transition in stages as many people have come to depend on this implementation detail.
In 0.10, were adding more warnings to catch a similar set of patterns. When a component is mounted we clone it and use that object for our internal representation. This allows us to capture calls you think youre making to a mounted component. Well forward them on to the right object, but also warn you that this is breaking. See “Access to the Mounted Instance” on [this page](http://fb.me/react-warning-descriptors). Most of the time you can solve your pattern by using refs.
In 0.10, were adding more warnings to catch a similar set of patterns. When a component is mounted we clone it and use that object for our internal representation. This allows us to capture calls you think youre making to a mounted component. Well forward them on to the right object, but also warn you that this is breaking. See “Access to the Mounted Instance” on [this page](https://fb.me/react-warning-descriptors). Most of the time you can solve your pattern by using refs.
Storing a reference to your top level component is a pattern touched upon on that page, but another examples that demonstrates what we see a lot of:

View File

@@ -1,6 +1,6 @@
---
title: React v0.10
author: Paul OShannessy
author: zpao
---
Hot on the heels of the [release candidate earlier this week](/react/blog/2014/03/19/react-v0.10-rc1.html), we're ready to call v0.10 done. The only major issue we discovered had to do with the `react-tools` package, which has been updated. We've copied over the changelog from the RC with some small clarifying changes.
@@ -8,13 +8,13 @@ Hot on the heels of the [release candidate earlier this week](/react/blog/2014/0
The release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.10.0.js>
Minified build for production: <http://fb.me/react-0.10.0.min.js>
Dev build with warnings: <https://fb.me/react-0.10.0.js>
Minified build for production: <https://fb.me/react-0.10.0.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.10.0.js>
Minified build for production: <http://fb.me/react-with-addons-0.10.0.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.10.0.js>
Minified build for production: <https://fb.me/react-with-addons-0.10.0.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.10.0.js>
<https://fb.me/JSXTransformer-0.10.0.js>
We've also published version `0.10.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.
@@ -24,7 +24,7 @@ Please try these builds out and [file an issue on GitHub](https://github.com/fac
The main purpose of this release is to provide a smooth upgrade path as we evolve some of the implementation of core. In v0.9 we started warning in cases where you called methods on unmounted components. This is part of an effort to enforce the idea that the return value of a component (`React.DOM.div()`, `MyComponent()`) is in fact not a reference to the component instance React uses in the virtual DOM. The return value is instead a light-weight object that React knows how to use. Since the return value currently is a reference to the same object React uses internally, we need to make this transition in stages as many people have come to depend on this implementation detail.
In 0.10, were adding more warnings to catch a similar set of patterns. When a component is mounted we clone it and use that object for our internal representation. This allows us to capture calls you think youre making to a mounted component. Well forward them on to the right object, but also warn you that this is breaking. See “Access to the Mounted Instance” on [this page](http://fb.me/react-warning-descriptors). Most of the time you can solve your pattern by using refs.
In 0.10, were adding more warnings to catch a similar set of patterns. When a component is mounted we clone it and use that object for our internal representation. This allows us to capture calls you think youre making to a mounted component. Well forward them on to the right object, but also warn you that this is breaking. See “Access to the Mounted Instance” on [this page](https://fb.me/react-warning-descriptors). Most of the time you can solve your pattern by using refs.
Storing a reference to your top level component is a pattern touched upon on that page, but another examples that demonstrates what we see a lot of:

View File

@@ -1,6 +1,6 @@
---
title: The Road to 1.0
author: Paul O'Shannessy
author: zpao
---
When we launched React last spring, we purposefully decided not to call it 1.0. It was production ready, but we had plans to evolve APIs and behavior as we saw how people were using React, both internally and externally. We've learned a lot over the past 9 months and we've thought a lot about what 1.0 will mean for React. A couple weeks ago, I outlined [several projects][projects] that we have planned to take us to 1.0 and beyond. Today I'm writing a bit more about them to give our users a better insight into our plans.
@@ -51,6 +51,6 @@ Finding a way to define animations in a declarative way is a hard problem. We've
There are several other things I listed on [our projects page][projects] that we're tracking. Some of them are internals and have no obvious outward effect (improve tests, repo separation, updated test runner). I encourage you to take a look.
[v0.10]: http://facebook.github.io/react/blog/2014/03/21/react-v0.10.html
[v0.10]: /react/blog/2014/03/21/react-v0.10.html
[pitofsuccess]: http://blog.codinghorror.com/falling-into-the-pit-of-success/
[projects]: https://github.com/facebook/react/wiki/Projects

View File

@@ -1,6 +1,6 @@
---
title: "Use React and JSX in ASP.NET MVC"
author: Daniel Lo Nigro
author: Daniel15
---
Today we're happy to announce the initial release of

View File

@@ -1,11 +1,11 @@
---
title: "Flux: An Application Architecture for React"
author: Bill Fisher and Jing Chen
author: fisherwebdevandjing
---
We recently spoke at one of f8's breakout session about Flux, a data flow architecture that works well with React. Check out the video here:
<figure><iframe width="560" height="315" src="//www.youtube.com/embed/nYkdrAPrdcw?list=PLb0IAmt7-GS188xDYE-u1ShQmFFGbrk0v&start=621" frameborder="0" allowfullscreen></iframe></figure>
<figure><iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/nYkdrAPrdcw?list=PLb0IAmt7-GS188xDYE-u1ShQmFFGbrk0v&start=621" frameborder="0" allowfullscreen></iframe></figure>
To summarize, Flux works well for us because the single directional data flow makes it easy to understand and modify an application as it becomes more complicated. We found that two-way data bindings lead to cascading updates, where changing one data model led to another data model updating, making it very difficult to predict what would change as the result of a single user interaction.
@@ -13,4 +13,4 @@ In Flux, the Dispatcher is a singleton that directs the flow of data and ensures
When a user interacts with a React view, the view sends an action (usually represented as a JavaScript object with some fields) through the dispatcher, which notifies the various stores that hold the application's data and business logic. When the stores change state, they notify the views that something has updated. This works especially well with React's declarative model, which allows the stores to send updates without specifying how to transition views between states.
Flux is more of a pattern than a formal framework, so you can start using Flux immediately without a lot of new code. An [example of this architecture](https://github.com/facebook/flux/tree/master/examples/flux-todomvc) is available, along with more [detailed documentation](http://facebook.github.io/flux/docs/overview.html) and a [tutorial](http://facebook.github.io/flux/docs/todo-list.html). Look for more examples to come in the future.
Flux is more of a pattern than a formal framework, so you can start using Flux immediately without a lot of new code. An [example of this architecture](https://github.com/facebook/flux/tree/master/examples/flux-todomvc) is available, along with more [detailed documentation](https://facebook.github.io/flux/docs/overview.html) and a [tutorial](https://facebook.github.io/flux/docs/todo-list.html). Look for more examples to come in the future.

View File

@@ -1,13 +1,13 @@
---
title: "One Year of Open-Source React"
author: Cheng Lou
author: chenglou
---
Today marks the one-year open-source anniversary of React.
Its been a crazy ride. 2.3k commits and 1.5k issues and pull requests later, were approaching version 1.0 and nearing 7k Github stars, with big names such as Khan Academy, New York Times, and Airbnb (and naturally, Facebook and Instagram) using React in production, and many more developers blogging their success stories with it. The [roadmap](http://facebook.github.io/react/blog/2014/03/28/the-road-to-1.0.html) gives a glimpse into the future of the library; exciting stuff lies ahead!
Its been a crazy ride. 2.3k commits and 1.5k issues and pull requests later, were approaching version 1.0 and nearing 7k Github stars, with big names such as Khan Academy, New York Times, and Airbnb (and naturally, Facebook and Instagram) using React in production, and many more developers blogging their success stories with it. The [roadmap](/react/blog/2014/03/28/the-road-to-1.0.html) gives a glimpse into the future of the library; exciting stuff lies ahead!
Every success has its story. React was born out of our frustration at existing solutions for building UIs. When it was first suggested at Facebook, few people thought that functionally re-rendering everything and diffing the results could ever perform well. However, support grew after we built the first implementation and people wrote their first components. When we open-sourced React, the initial reception was [similarly skeptical](http://www.reddit.com/r/programming/comments/1fak87/react_facebooks_latest_javascript_client_library/). It challenges many pre-established conventions and received mostly disapproving first-impressions, intermingled with positive ones that often were votes of confidence in Facebooks engineering capabilities. On an open, competitive platform such as the web, it's been hard to convince people to try React. [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html), in particular, filtered out a huge chunk of potential early adopters.
Every success has its story. React was born out of our frustration at existing solutions for building UIs. When it was first suggested at Facebook, few people thought that functionally re-rendering everything and diffing the results could ever perform well. However, support grew after we built the first implementation and people wrote their first components. When we open-sourced React, the initial reception was [similarly skeptical](https://www.reddit.com/r/programming/comments/1fak87/react_facebooks_latest_javascript_client_library/). It challenges many pre-established conventions and received mostly disapproving first-impressions, intermingled with positive ones that often were votes of confidence in Facebooks engineering capabilities. On an open, competitive platform such as the web, it's been hard to convince people to try React. [JSX](/react/docs/jsx-in-depth.html), in particular, filtered out a huge chunk of potential early adopters.
Fast forward one year, React has strongly [grown in popularity](https://news.ycombinator.com/item?id=7489959). Special acknowledgments go to Khan Academy, the ClojureScript community, and established frameworks such as Ember and Angular for contributing to and debating on our work. We'd also like to thank all the [individual contributors](https://github.com/facebook/react/graphs/contributors) who have taken the time to help out over the past year. React, as a library and as a new paradigm on the web, wouldn't have gained as much traction without them. In the future, we will continue to try to set an example of what's possible to achieve when we rethink about current “best practices”.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #19"
author: Cheng Lou
author: chenglou
---
## React Meetups!
@@ -13,7 +13,7 @@ In case you haven't seen it, we've consolidated the tooling solution around Reac
- [Ryan Florence](https://github.com/rpflorence) and [Michael Jackson](https://github.com/mjackson)'s [react-nested-router](https://github.com/rpflorence/react-nested-router), which is a translation of the Ember router API to React.
- [Stephen J. Collings](https://github.com/stevoland)'s [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap), which wraps the popular framework with a bit of React goodness. The [website](http://react-bootstrap.github.io/components.html) features live-editable demos.
- [Stephen J. Collings](https://github.com/stevoland)'s [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap), which wraps the popular framework with a bit of React goodness. The [website](https://react-bootstrap.github.io/components.html) features live-editable demos.
- [Andrey Popp](https://github.com/andreypopp)'s [react-quickstart](https://github.com/andreypopp/react-quickstart), which gives you a quick template for server-side rendering and routing, among other features.
@@ -23,7 +23,7 @@ These are some of the links that often pop up on the #reactjs IRC channel. If yo
The core concepts React themselves is something very valuable that the community is exploring and pushing further. A year ago, we wouldn't have imagined something like [Bruce Hauman](http://rigsomelight.com)'s [Flappy Bird ClojureScript port](http://rigsomelight.com/2014/05/01/interactive-programming-flappy-bird-clojurescript.html), whose interactive programming has been made possible through React:
<iframe width="560" height="315" src="//www.youtube.com/embed/KZjFVdU8VLI" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/KZjFVdU8VLI" frameborder="0" allowfullscreen></iframe>
And don't forget [Pete Hunt](https://github.com/petehunt)'s Wolfenstein 3D rendering engine in React ([source code](https://github.com/petehunt/wolfenstein3D-react/blob/master/js/renderer.js#L183)). While it's nearly a year old, it's still a nice demo.

View File

@@ -1,6 +1,6 @@
---
title: React v0.11 RC
author: Paul OShannessy
author: zpao
---
It's that time again… we're just about ready to ship a new React release! v0.11 includes a wide array of bug fixes and features. We highlighted some of the most important changes below, along with the full changelog.
@@ -8,13 +8,13 @@ It's that time again… we're just about ready to ship a new React release! v0.1
The release candidate is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.11.0-rc1.js>
Minified build for production: <http://fb.me/react-0.11.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-0.11.0-rc1.js>
Minified build for production: <https://fb.me/react-0.11.0-rc1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.0-rc1.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.11.0-rc1.js>
Minified build for production: <https://fb.me/react-with-addons-0.11.0-rc1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.0-rc1.js>
<https://fb.me/JSXTransformer-0.11.0-rc1.js>
We've also published version `0.11.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

View File

@@ -1,6 +1,6 @@
---
title: React v0.11
author: Paul OShannessy
author: zpao
---
**Update:** We missed a few important changes in our initial post and changelog. We've updated this post with details about [Descriptors](#descriptors) and [Prop Type Validation](#prop-type-validation).
@@ -15,13 +15,13 @@ This version has been cooking for a couple months now and includes a wide array
The release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.11.0.js>
Minified build for production: <http://fb.me/react-0.11.0.min.js>
Dev build with warnings: <https://fb.me/react-0.11.0.js>
Minified build for production: <https://fb.me/react-0.11.0.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.0.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.0.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.11.0.js>
Minified build for production: <https://fb.me/react-with-addons-0.11.0.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.0.js>
<https://fb.me/JSXTransformer-0.11.0.js>
We've also published version `0.11.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.
@@ -100,7 +100,7 @@ Keyboard and mouse events also now include a normalized `e.getModifierState()` t
## Descriptors
In our [v0.10 release notes](http://facebook.github.io/react/blog/2014/03/21/react-v0.10.html#clone-on-mount), we called out that we were deprecating the existing behavior of the component function call (eg `component = MyComponent(props, ...children)` or `component = <MyComponent prop={...}/>`). Previously that would create an instance and React would modify that internally. You could store that reference and then call functions on it (eg `component.setProps(...)`). This no longer works. `component` in the above examples will be a descriptor and not an instance that can be operated on. The v0.10 release notes provide a complete example along with a migration path. The development builds also provided warnings if you called functions on descriptors.
In our [v0.10 release notes](/react/blog/2014/03/21/react-v0.10.html#clone-on-mount), we called out that we were deprecating the existing behavior of the component function call (eg `component = MyComponent(props, ...children)` or `component = <MyComponent prop={...}/>`). Previously that would create an instance and React would modify that internally. You could store that reference and then call functions on it (eg `component.setProps(...)`). This no longer works. `component` in the above examples will be a descriptor and not an instance that can be operated on. The v0.10 release notes provide a complete example along with a migration path. The development builds also provided warnings if you called functions on descriptors.
Along with this change to descriptors, `React.isValidComponent` and `React.PropTypes.component` now actually validate that the value is a descriptor. Overwhelmingly, these functions are used to validate the value of `MyComponent()`, which as mentioned is now a descriptor, not a component instance. We opted to reduce code churn and make the migration to 0.11 as easy as possible. However, we realize this is has caused some confusion and we're working to make sure we are consistent with our terminology.

View File

@@ -1,6 +1,6 @@
---
title: React v0.11.1
author: Paul OShannessy
author: zpao
---
Today we're releasing React v0.11.1 to address a few small issues. Thanks to everybody who has reported them as they've begun upgrading.
@@ -16,13 +16,13 @@ We'd also like to call out a couple additional breaking changes that we failed t
The release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.11.1.js>
Minified build for production: <http://fb.me/react-0.11.1.min.js>
Dev build with warnings: <https://fb.me/react-0.11.1.js>
Minified build for production: <https://fb.me/react-0.11.1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.1.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.1.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.11.1.js>
Minified build for production: <https://fb.me/react-with-addons-0.11.1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.1.js>
<https://fb.me/JSXTransformer-0.11.1.js>
We've also published version `0.11.1` of the `react` and `react-tools` packages on npm and the `react` package on bower.

View File

@@ -1,6 +1,6 @@
---
title: "Community Round-up #20"
author: Lou Husson
author: LoukaN
---
It's an exciting time for React as there are now more commits from open source contributors than from Facebook engineers! Keep up the good work :)
@@ -9,19 +9,19 @@ It's an exciting time for React as there are now more commits from open source c
[Atom, GitHub's code editor, is now using React](http://blog.atom.io/2014/07/02/moving-atom-to-react.html) to build the editing experience. They made the move in order to improve performance. By default, React helped them eliminate unnecessary reflows, enabling them to focus on architecting the rendering pipeline in order to minimize repaints by using hardware acceleration. This is a testament to the fact that React's architecture is perfect for high performant applications.
[<img src="http://blog.atom.io/img/posts/gpu-cursor-move.gif" style="width: 100%;" />](http://blog.atom.io/2014/07/02/moving-atom-to-react.html)
[<img src="/react/img/blog/gpu-cursor-move.gif" style="width: 100%;" />](http://blog.atom.io/2014/07/02/moving-atom-to-react.html)
## Why Does React Scale?
At the last [JSConf.us](http://2014.jsconf.us/), Vjeux talked about the design decisions made in the API that allows it to scale to a large number of developers. If you don't have 20 minutes, take a look at the [annotated slides](https://speakerdeck.com/vjeux/why-does-react-scale-jsconf-2014).
<iframe width="650" height="315" src="//www.youtube.com/embed/D-ioDiacTm8" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/D-ioDiacTm8" frameborder="0" allowfullscreen></iframe>
## Live Editing
One of the best features of React is that it provides the foundations to implement concepts that were otherwise extremely difficult, like server-side rendering, undo-redo, rendering to non-DOM environments like canvas... [Dan Abramov](https://twitter.com/dan_abramov) got hot code reloading working with webpack in order to [live edit a React project](http://gaearon.github.io/react-hot-loader/)!
One of the best features of React is that it provides the foundations to implement concepts that were otherwise extremely difficult, like server-side rendering, undo-redo, rendering to non-DOM environments like canvas... [Dan Abramov](https://twitter.com/dan_abramov) got hot code reloading working with webpack in order to [live edit a React project](https://gaearon.github.io/react-hot-loader/)!
<iframe src="//player.vimeo.com/video/100010922" width="650" height="315" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
@@ -63,7 +63,7 @@ If you missed the last [London React Meetup](http://www.meetup.com/London-React-
- React on Rails - How to use React with Ruby on Rails to build isomorphic apps
- Building an isomorphic, real-time to-do list with moped and node.js
<iframe width="650" height="315" src="//www.youtube.com/embed/CP3lvm5Ppqo" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/CP3lvm5Ppqo" frameborder="0" allowfullscreen></iframe>
In related news, the next [React SF Meetup](http://www.meetup.com/ReactJS-San-Francisco/events/195518392/) will be from Prezi: [“Immediate Mode on the Web: How We Implemented the Prezi Viewer in JavaScript”](https://medium.com/prezi-engineering/how-and-why-prezi-turned-to-javascript-56e0ca57d135). While not in React, their tech is really awesome and shares a lot of React's design principles and perf optimizations.
@@ -112,4 +112,3 @@ var Foo = React.createClass({
## Random Tweet
<blockquote class="twitter-tweet" data-conversation="none" lang="en"><p>“<a href="https://twitter.com/apphacker">@apphacker</a>: I take back the mean things I said about <a href="https://twitter.com/reactjs">@reactjs</a> I actually like it.” Summarizing the life of ReactJS in a single tweet.</p>&mdash; Jordan (@jordwalke) <a href="https://twitter.com/jordwalke/statuses/490747339607265280">July 20, 2014</a></blockquote>

View File

@@ -1,11 +1,11 @@
---
title: "Flux: Actions and the Dispatcher"
author: Bill Fisher
author: fisherwebdev
---
Flux is the application architecture Facebook uses to build JavaScript applications. It's based on a unidirectional data flow. We've built everything from small widgets to huge applications with Flux, and it's handled everything we've thrown at it. Because we've found it to be a great way to structure our code, we're excited to share it with the open source community. [Jing Chen presented Flux](http://youtu.be/nYkdrAPrdcw?t=10m20s) at the F8 conference, and since that time we've seen a lot of interest in it. We've also published an [overview of Flux](http://facebook.github.io/flux/docs/overview.html) and a [TodoMVC example](https://github.com/facebook/flux/tree/master/examples/flux-todomvc/), with an accompanying [tutorial](http://facebook.github.io/flux/docs/todo-list.html).
Flux is the application architecture Facebook uses to build JavaScript applications. It's based on a unidirectional data flow. We've built everything from small widgets to huge applications with Flux, and it's handled everything we've thrown at it. Because we've found it to be a great way to structure our code, we're excited to share it with the open source community. [Jing Chen presented Flux](http://youtu.be/nYkdrAPrdcw?t=10m20s) at the F8 conference, and since that time we've seen a lot of interest in it. We've also published an [overview of Flux](https://facebook.github.io/flux/docs/overview.html) and a [TodoMVC example](https://github.com/facebook/flux/tree/master/examples/flux-todomvc/), with an accompanying [tutorial](https://facebook.github.io/flux/docs/todo-list.html).
Flux is more of a pattern than a full-blown framework, and you can start using it without a lot of new code beyond React. Up until recently, however, we haven't released one crucial piece of our Flux software: the dispatcher. But along with the creation of the new [Flux code repository](https://github.com/facebook/flux) and [Flux website](http://facebook.github.io/flux/), we've now open sourced the same [dispatcher](http://facebook.github.io/flux/docs/dispatcher.html) we use in our production applications.
Flux is more of a pattern than a full-blown framework, and you can start using it without a lot of new code beyond React. Up until recently, however, we haven't released one crucial piece of our Flux software: the dispatcher. But along with the creation of the new [Flux code repository](https://github.com/facebook/flux) and [Flux website](https://facebook.github.io/flux/), we've now open sourced the same [dispatcher](https://facebook.github.io/flux/docs/dispatcher.html) we use in our production applications.
Where the Dispatcher Fits in the Flux Data Flow
@@ -21,7 +21,7 @@ When new data enters the system, whether through a person interacting with the a
Different actions are identified by a type attribute. When all of the stores receive the action, they typically use this attribute to determine if and how they should respond to it. In a Flux application, both stores and views control themselves; they are not acted upon by external objects. Actions flow into the stores through the callbacks they define and register, not through setter methods.
Letting the stores update themselves eliminates many entanglements typically found in MVC applications, where cascading updates between models can lead to unstable state and make accurate testing very difficult. The objects within a Flux application are highly decoupled, and adhere very strongly to the [Law of Demeter](http://en.wikipedia.org/wiki/Law_of_Demeter), the principle that each object within a system should know as little as possible about the other objects in the system. This results in software that is more maintainable, adaptable, testable, and easier for new engineering team members to understand.
Letting the stores update themselves eliminates many entanglements typically found in MVC applications, where cascading updates between models can lead to unstable state and make accurate testing very difficult. The objects within a Flux application are highly decoupled, and adhere very strongly to the [Law of Demeter](https://en.wikipedia.org/wiki/Law_of_Demeter), the principle that each object within a system should know as little as possible about the other objects in the system. This results in software that is more maintainable, adaptable, testable, and easier for new engineering team members to understand.
<img src="/react/img/blog/flux-diagram.png" style="width: 100%;" />

View File

@@ -1,10 +1,10 @@
---
title: "Community Round-up #21"
author: Lou Husson
author: LoukaN
---
## React Router
[Ryan Florence](http://ryanflorence.com/) and [Michael Jackson](http://twitter.com/mjackson) ported Ember's router to React in a project called [React Router](https://github.com/rackt/react-router). This is a very good example of both communities working together to make the web better!
[Ryan Florence](http://ryanflorence.com/) and [Michael Jackson](https://twitter.com/mjackson) ported Ember's router to React in a project called [React Router](https://github.com/rackt/react-router). This is a very good example of both communities working together to make the web better!
```javascript
React.renderComponent((
@@ -16,7 +16,7 @@ React.renderComponent((
</Route>
</Route>
</Routes>
), document.body);
), document.getElementById('example'));
```
## Going Big with React
@@ -49,7 +49,7 @@ Areeb Malik, from Facebook, talks about his experience using React. "On paper, a
## Referencing Dynamic Children
While Matt Zabriskie was working on [react-tabs](https://www.npmjs.org/package/react-tabs) he discovered how to use React.Children.map and React.addons.cloneWithProps in order to [reference dynamic children](http://www.mattzabriskie.com/blog/react-referencing-dynamic-children).
While Matt Zabriskie was working on [react-tabs](https://www.npmjs.com/package/react-tabs) he discovered how to use React.Children.map and React.addons.cloneWithProps in order to [reference dynamic children](http://www.mattzabriskie.com/blog/react-referencing-dynamic-children).
```javascript
var App = React.createClass({
@@ -83,12 +83,12 @@ Have you ever wondered how JSX was implemented? James Long wrote a very instruct
[Matt Zabriskie](https://github.com/mzabriskie) released a [project](https://github.com/mzabriskie/react-draggable) to make your react components draggable.
[![](/react/img/blog/react-draggable.png)](http://mzabriskie.github.io/react-draggable/example/)
[![](/react/img/blog/react-draggable.png)](https://mzabriskie.github.io/react-draggable/example/)
## HTML Parser2 React
[Jason Brown](http://browniefed.github.io/) adapted htmlparser2 to React: [htmlparser2-react](https://www.npmjs.org/package/htmlparser2-react). That allows you to convert raw HTML to the virtual DOM.
[Jason Brown](https://browniefed.github.io/) adapted htmlparser2 to React: [htmlparser2-react](https://www.npmjs.com/package/htmlparser2-react). That allows you to convert raw HTML to the virtual DOM.
This is not the intended way to use React but can be useful as last resort if you have an existing piece of HTML.
```javascript
@@ -104,7 +104,7 @@ var parsedComponent = reactParser(html, React);
If you haven't yet tried out React, Jacob Rios did a Hangout where he covers the most important aspects and thankfully he recorded it!
<iframe width="650" height="315" src="//www.youtube.com/embed/lAn7GVoGlKU" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/lAn7GVoGlKU" frameborder="0" allowfullscreen></iframe>
## Random Tweets

View File

@@ -1,13 +1,13 @@
---
title: "Introducing the JSX Specification"
author: Sebastian Markbåge
author: sebmarkbage
---
At Facebook we've been using JSX for a long time. We originally introduced it to the world last year alongside React, but we actually used it in another form before that to create native DOM nodes. We've also seen some similar efforts grow out of our work in order to be used with other libraries and in interesting ways. At this point React JSX is just one of many implementations.
In order to make it easier to implement new versions and to make sure that the syntax remains compatible, we're now formalizing the syntax of JSX in a stand-alone spec without any semantic meaning. It's completely stand-alone from React itself.
Read the spec now at <http://facebook.github.io/jsx/>.
Read the spec now at <https://facebook.github.io/jsx/>.
This is not a proposal to be standardized in ECMAScript. It's just a reference document that transpiler writers and syntax highlighters can agree on. It's currently in a draft stage and will probably continue to be a living document.

View File

@@ -1,7 +1,7 @@
---
title: "Community Round-up #22"
layout: post
author: Lou Husson
author: LoukaN
---
This has been an exciting summer as four big companies: Yahoo, Mozilla, Airbnb and Reddit announced that they were using React!
@@ -20,7 +20,7 @@ This has been an exciting summer as four big companies: Yahoo, Mozilla, Airbnb a
[Vjeux](http://blog.vjeux.com/), from the React team, gave a talk at OSCON on the history of React and the various optimizations strategies that are implemented. You can also check out the [annotated slides](https://speakerdeck.com/vjeux/oscon-react-architecture) or [Chris Dawson](http://thenewstack.io/author/chrisdawson/)'s notes titled [JavaScripts History and How it Led To React](http://thenewstack.io/javascripts-history-and-how-it-led-to-reactjs/).
<iframe width="650" height="315" src="//www.youtube.com/embed/eCf5CquV_Bw" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/eCf5CquV_Bw" frameborder="0" allowfullscreen></iframe>
## v8 optimizations
@@ -30,7 +30,7 @@ Jakob Kummerow landed [two optimizations to V8](http://www.chromium.org/develope
## Reusable Components by Khan Academy
[Khan Academy](https://www.khanacademy.org/) released [many high quality standalone components](http://khan.github.io/react-components/) they are using. This is a good opportunity to see what React code used in production look like.
[Khan Academy](https://www.khanacademy.org/) released [many high quality standalone components](https://khan.github.io/react-components/) they are using. This is a good opportunity to see what React code used in production look like.
```javascript
var TeX = require('react-components/js/tex.jsx');
@@ -89,7 +89,7 @@ var Button = React.createClass({
If you are getting started with React, [Joe Maddalone](http://www.joemaddalone.com/) made a good tutorial on how to build your first component.
<iframe width="650" height="200" src="//www.youtube.com/embed/rFvZydtmsxM" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="200" src="//www.youtube-nocookie.com/embed/rFvZydtmsxM" frameborder="0" allowfullscreen></iframe>
## Saving time & staying sane?

View File

@@ -1,6 +1,6 @@
---
title: React v0.11.2
author: Paul OShannessy
author: zpao
---
Today we're releasing React v0.11.2 to add a few small features.
@@ -14,13 +14,13 @@ And lastly, on the heels of announcing Flow at [@Scale](http://atscaleconference
The release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.11.2.js>
Minified build for production: <http://fb.me/react-0.11.2.min.js>
Dev build with warnings: <https://fb.me/react-0.11.2.js>
Minified build for production: <https://fb.me/react-0.11.2.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.2.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.2.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.11.2.js>
Minified build for production: <https://fb.me/react-with-addons-0.11.2.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.2.js>
<https://fb.me/JSXTransformer-0.11.2.js>
We've also published version `0.11.2` of the `react` and `react-tools` packages on npm and the `react` package on bower.

View File

@@ -1,9 +1,11 @@
---
title: "Testing Flux Applications"
author: Bill Fisher
author: fisherwebdev
---
[Flux](http://facebook.github.io/flux/) is the application architecture that Facebook uses to build web applications with [React](http://facebook.github.io/react/). It's based on a unidirectional data flow. In previous blog posts and documentation articles, we've shown the [basic structure and data flow](http://facebook.github.io/flux/docs/overview.html), more closely examined the [dispatcher and action creators](http://facebook.github.io/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html), and shown how to put it all together with a [tutorial](http://facebook.github.io/flux/docs/todo-list.html). Now let's look at how to do formal unit testing of Flux applications with [Jest](http://facebook.github.io/jest/), Facebook's auto-mocking testing framework.
**A more up-to-date version of this post is available as part of the [Flux documentation](https://facebook.github.io/flux/docs/testing-flux-applications.html).**
[Flux](https://facebook.github.io/flux/) is the application architecture that Facebook uses to build web applications with [React](/react/). It's based on a unidirectional data flow. In previous blog posts and documentation articles, we've shown the [basic structure and data flow](https://facebook.github.io/flux/docs/overview.html), more closely examined the [dispatcher and action creators](/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html), and shown how to put it all together with a [tutorial](https://facebook.github.io/flux/docs/todo-list.html). Now let's look at how to do formal unit testing of Flux applications with [Jest](https://facebook.github.io/jest/), Facebook's auto-mocking testing framework.
Testing with Jest
@@ -178,7 +180,7 @@ Now we have a collection of objects that will come back from MyOtherStore whenev
A brief example of this technique is up on GitHub within the Flux Chat example's [UnreadThreadStore-test.js](https://github.com/facebook/flux/tree/master/examples/flux-chat/js/stores/__tests__/UnreadThreadStore-test.js).
For more information about the `mock` property of mocked methods or Jest's ability to provide custom mock values, see Jest's documentation on [mock functions](http://facebook.github.io/jest/docs/mock-functions.html).
For more information about the `mock` property of mocked methods or Jest's ability to provide custom mock values, see Jest's documentation on [mock functions](https://facebook.github.io/jest/docs/mock-functions.html).
Moving Logic from React to Stores
@@ -313,11 +315,11 @@ render: function() {
},
```
To learn how to test React components themselves, check out the [Jest tutorial for React](http://facebook.github.io/jest/docs/tutorial-react.html) and the [ReactTestUtils documentation](http://facebook.github.io/react/docs/test-utils.html).
To learn how to test React components themselves, check out the [Jest tutorial for React](https://facebook.github.io/jest/docs/tutorial-react.html) and the [ReactTestUtils documentation](/react/docs/test-utils.html).
Further Reading
---------------
- [Mocks Aren't Stubs](http://martinfowler.com/articles/mocksArentStubs.html) by Martin Fowler
- [Jest API Reference](http://facebook.github.io/jest/docs/api.html)
- [Jest API Reference](https://facebook.github.io/jest/docs/api.html)

View File

@@ -1,10 +1,10 @@
---
title: "Introducing React Elements"
author: Sebastian Markbåge
author: sebmarkbage
redirect_from: "blog/2014/10/14/introducting-react-elements.html"
---
The upcoming React 0.12 tweaks some APIs to get us close to the final 1.0 API. This release is all about setting us up for making the `ReactElement` type really FAST, [jest unit testing](http://facebook.github.io/jest/) easier, making classes simpler (in preparation for ES6 classes) and better integration with third-party languages!
The upcoming React 0.12 tweaks some APIs to get us close to the final 1.0 API. This release is all about setting us up for making the `ReactElement` type really FAST, [jest unit testing](https://facebook.github.io/jest/) easier, making classes simpler (in preparation for ES6 classes) and better integration with third-party languages!
If you currently use JSX everywhere, you don't really have to do anything to get these benefits! The updated transformer will do it for you.
@@ -72,7 +72,7 @@ This is the biggest change to 0.12. Don't worry though. This functionality conti
### React With JSX
If you use the React specific [JSX](http://facebook.github.io/jsx/) transform, the upgrade path is simple. Just make sure you have React in scope.
If you use the React specific [JSX](https://facebook.github.io/jsx/) transform, the upgrade path is simple. Just make sure you have React in scope.
```javascript
// If you use node/browserify modules make sure
@@ -92,7 +92,7 @@ var MyOtherComponent = React.createClass({
});
```
*NOTE: React's JSX will not call arbitrary functions in future releases. This restriction is introduced so that it's easier to reason about the output of JSX by both the reader of your code and optimizing compilers. The JSX syntax is not tied to React. Just the transpiler. You can still use [the JSX spec](http://facebook.github.io/jsx/) with a different transpiler for custom purposes.*
*NOTE: React's JSX will not call arbitrary functions in future releases. This restriction is introduced so that it's easier to reason about the output of JSX by both the reader of your code and optimizing compilers. The JSX syntax is not tied to React. Just the transpiler. You can still use [the JSX spec](https://facebook.github.io/jsx/) with a different transpiler for custom purposes.*
### React Without JSX

View File

@@ -1,6 +1,6 @@
---
title: "React v0.12 RC"
author: Sebastian Markbåge
author: sebmarkbage
---
We are finally ready to share the work we've been doing over the past couple months. A lot has gone into this and we want to make sure we iron out any potential issues before we make this final. So, we're shipping a Release Candidate for React v0.12 today. If you get a chance, please give it a try and report any issues you find! A full changelog will accompany the final release but we've highlighted the interesting and breaking changes below.
@@ -9,13 +9,13 @@ We are finally ready to share the work we've been doing over the past couple mon
The release candidate is available for download:
* **React**
Dev build with warnings: <http://fb.me/react-0.12.0-rc1.js>
Minified build for production: <http://fb.me/react-0.12.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-0.12.0-rc1.js>
Minified build for production: <https://fb.me/react-0.12.0-rc1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.12.0-rc1.js>
Minified build for production: <http://fb.me/react-with-addons-0.12.0-rc1.min.js>
Dev build with warnings: <https://fb.me/react-with-addons-0.12.0-rc1.js>
Minified build for production: <https://fb.me/react-with-addons-0.12.0-rc1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.12.0-rc1.js>
<https://fb.me/JSXTransformer-0.12.0-rc1.js>
We've also published version `0.12.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.
@@ -27,7 +27,7 @@ The biggest conceptual change we made in v0.12 is the move to React Elements. [W
## JSX Changes
Earlier this year we decided to write [a specification for JSX](http://facebook.github.io/jsx/). This has allowed us to make some changes focused on the React specific JSX and still allow others to innovate in the same space.
Earlier this year we decided to write [a specification for JSX](https://facebook.github.io/jsx/). This has allowed us to make some changes focused on the React specific JSX and still allow others to innovate in the same space.
### The `@jsx` Pragma is Gone!
@@ -106,7 +106,7 @@ You do NOT need to change the way to define `key` and `ref`, only if you need to
## Breaking Change: Default Props Resolution
This is a subtle difference but `defaultProps` are now resolved at `ReactElement` creation time instead of when it's mounted. This is means that we can avoid allocating an extra object for the resolve props.
This is a subtle difference but `defaultProps` are now resolved at `ReactElement` creation time instead of when it's mounted. This is means that we can avoid allocating an extra object for the resolved props.
You will primarily see this breaking if you're also using `transferPropsTo`.

View File

@@ -1,16 +1,16 @@
---
title: "Community Round-up #23"
layout: post
author: Lou Husson
author: LoukaN
---
This round-up is a special edition on [Flux](http://facebook.github.io/flux/). If you expect to see diagrams showing arrows that all point in the same direction, you won't be disappointed!
This round-up is a special edition on [Flux](https://facebook.github.io/flux/). If you expect to see diagrams showing arrows that all point in the same direction, you won't be disappointed!
## React And Flux at ForwardJS
Facebook engineers [Jing Chen](https://github.com/jingc) and [Bill Fisher](https://github.com/fisherwebdev) gave a talk about Flux and React at [ForwardJS](http://forwardjs.com/), and how using an application architecture with a unidirectional data flow helped solve recurring bugs.
<iframe width="650" height="315" src="//www.youtube.com/embed/i__969noyAM" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/i__969noyAM" frameborder="0" allowfullscreen></iframe>
# Yahoo
@@ -24,10 +24,10 @@ Yahoo is converting Yahoo Mail to React and Flux and in the process, they open s
## Reflux
[Mikael Brassman](http://spoike.ghost.io/) wrote [Reflux](https://github.com/spoike/refluxjs), a library that implements Flux concepts. Note that it diverges significantly from the way we use Flux at Facebook. He explains [the reasons why in a blog post](http://spoike.ghost.io/deconstructing-reactjss-flux/).
[Mikael Brassman](https://spoike.ghost.io/) wrote [Reflux](https://github.com/spoike/refluxjs), a library that implements Flux concepts. Note that it diverges significantly from the way we use Flux at Facebook. He explains [the reasons why in a blog post](https://spoike.ghost.io/deconstructing-reactjss-flux/).
<center>
<a href="http://spoike.ghost.io/deconstructing-reactjss-flux/"><img src="/react/img/blog/reflux-flux.png" width="400" /></a>
<a href="https://spoike.ghost.io/deconstructing-reactjss-flux/"><img src="/react/img/blog/reflux-flux.png" width="400" /></a>
</center>
@@ -61,7 +61,7 @@ Yahoo is converting Yahoo Mail to React and Flux and in the process, they open s
>
> - There should be only one channel for all state changes: The Dispatcher. This makes debugging easy because it just requires a single console.log in the dispatcher to observe every single state change trigger.
>
> - Asynchronously executed callbacks should not leak into Stores. The consequences of it are just to hard to fully foresee. This leads to elusive bugs. Stores should only execute synchronous code. Otherwise they are too hard to understand.
> - Asynchronously executed callbacks should not leak into Stores. The consequences of it are just too hard to fully foresee. This leads to elusive bugs. Stores should only execute synchronous code. Otherwise they are too hard to understand.
>
> - Avoiding actions firing other actions makes your app simple. We use the newest Dispatcher implementation from Facebook that does not allow a new dispatch while dispatching. It forces you to do things right.
>
@@ -107,22 +107,22 @@ undo: function() {
## React and Flux
[Christian Alfoni](https://github.com/christianalfoni) wrote an article where [he compares Backbone, Angular and Flux](http://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html) on a simple example that's representative of a real project he worked on.
[Christian Alfoni](https://github.com/christianalfoni) wrote an article where [he compares Backbone, Angular and Flux](https://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html) on a simple example that's representative of a real project he worked on.
> Wow, that was a bit more code! Well, try to think of it like this. In the above examples, if we were to do any changes to the application we would probably have to move things around. In the FLUX example we have considered that from the start.
>
> Any changes to the application is adding, not moving things around. If you need a new store, just add it and make components dependant of it. If you need more views, create a component and use it inside any other component without affecting their current "parent controller or models".
>
> [Read the full article...](http://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html)
> [Read the full article...](https://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html)
## Flux: Step by Step approach
[Nicola Paolucci](https://github.com/durdn) from Atlassian wrote a great guide to help your getting understand [Flux step by step](http://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/).
[Nicola Paolucci](https://github.com/durdn) from Atlassian wrote a great guide to help your getting understand [Flux step by step](https://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/).
<center>
<a href="http://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/"><img src="/react/img/blog/flux-chart.png" width="400" /></a>
<a href="https://blogs.atlassian.com/2014/08/flux-architecture-step-by-step/"><img src="/react/img/blog/flux-chart.png" width="400" /></a>
</center>
@@ -144,7 +144,7 @@ undo: function() {
Last but not least, Flux and React ideas are not limited to JavaScript inside of the browser. The iOS team at Facebook re-implemented Newsfeed using very similar patterns.
<iframe width="650" height="315" src="//www.youtube.com/embed/XhXC4SKOGfQ" frameborder="0" allowfullscreen></iframe>
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/XhXC4SKOGfQ" frameborder="0" allowfullscreen></iframe>
## Random Tweet

View File

@@ -1,6 +1,6 @@
---
title: React.js Conf
author: Vjeux
author: vjeux
---
Every few weeks someone asks us when we are going to organize a conference for React. Our answer has always been "some day". In the mean time, people have been talking about React at other JavaScript conferences around the world. But now the time has finally come for us to have a conference of our own.

View File

@@ -0,0 +1,127 @@
---
title: React v0.12
author: zpao
---
We're happy to announce the availability of React v0.12! After over a week of baking as the release candidate, we uncovered and fixed a few small issues. Thanks to all of you who upgraded and gave us feedback!
We have talked a lot about some of the bigger changes in this release. [We introduced new terminology](/react/blog/2014/10/14/introducing-react-elements.html) and changed APIs to clean up and simplify some of the concepts of React. [We also made several changes to JSX](/react/blog/2014/10/16/react-v0.12-rc1.html) and deprecated a few functions. We won't go into depth about these changes again but we encourage you to read up on these changes in the linked posts. We'll summarize these changes and discuss some of the other changes and how they may impact you below. As always, a full changelog is also included below.
The release is available for download:
* **React**
Dev build with warnings: <https://fb.me/react-0.12.0.js>
Minified build for production: <https://fb.me/react-0.12.0.min.js>
* **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.12.0.js>
Minified build for production: <https://fb.me/react-with-addons-0.12.0.min.js>
* **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.12.0.js>
We've also published version `0.12.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.
## New Terminology & Updated APIs
v0.12 is bringing about some new terminology. [We introduced](/react/blog/2014/10/14/introducing-react-elements.html) this 2 weeks ago and we've also documented it in [a new section of the documentation](/react/docs/glossary.html). As a part of this, we also corrected many of our top-level APIs to align with the terminology. `Component` has been removed from all of our `React.render*` methods. While at one point the argument you passed to these functions was called a Component, it no longer is. You are passing ReactElements. To align with `render` methods in your component classes, we decided to keep the top-level functions short and sweet. `React.renderComponent` is now `React.render`.
We also corrected some other misnomers. `React.isValidComponent` actually determines if the argument is a ReactElement, so it has been renamed to `React.isValidElement`. In the same vein, `React.PropTypes.component` is now `React.PropTypes.element` and `React.PropTypes.renderable` is now `React.PropTypes.node`.
The old methods will still work but will warn upon first use. They will be removed in v0.13.
## JSX Changes
[We talked more in depth about these before](/react/blog/2014/10/16/react-v0.12-rc1.html#jsx-changes), so here are the highlights.
* No more `/** @jsx React.DOM */`!
* We no longer transform to a straight function call. `<Component/>` now becomes `React.createElement(Component)`
* DOM components don't make use of `React.DOM`, instead we pass the tag name directly. `<div/>` becomes `React.createElement('div')`
* We introduced spread attributes as a quick way to transfer props.
## DevTools Improvements, No More `__internals`
For months we've gotten complaints about the React DevTools message. It shouldn't have logged the up-sell message when you were already using the DevTools. Unfortunately this was because the way we implemented these tools resulted in the DevTools knowing about React, but not the reverse. We finally gave this some attention and enabled React to know if the DevTools are installed. We released an update to the devtools several weeks ago making this possible. Extensions in Chrome should auto-update so you probably already have the update installed!
As a result of this update, we no longer need to expose several internal modules to the world. If you were taking advantage of this implementation detail, your code will break. `React.__internals` is no more.
## License Change - BSD
We updated the license on React to the BSD 3-Clause license with an explicit patent grant. Previously we used the Apache 2 license. These licenses are very similar and our extra patent grant is equivalent to the grant provided in the Apache license. You can still use React with the confidence that we have granted the use of any patents covering it. This brings us in line with the same licensing we use across the majority of our open source projects at Facebook.
You can read the full text of the [LICENSE](https://github.com/facebook/react/blob/master/LICENSE) and [`PATENTS`](https://github.com/facebook/react/blob/master/PATENTS) files on GitHub.
- - -
## Changelog
### React Core
#### Breaking Changes
* `key` and `ref` moved off props object, now accessible on the element directly
* React is now BSD licensed with accompanying Patents grant
* Default prop resolution has moved to Element creation time instead of mount time, making them effectively static
* `React.__internals` is removed - it was exposed for DevTools which no longer needs access
* Composite Component functions can no longer be called directly - they must be wrapped with `React.createFactory` first. This is handled for you when using JSX.
#### New Features
* Spread operator (`{...}`) introduced to deprecate `this.transferPropsTo`
* Added support for more HTML attributes: `acceptCharset`, `classID`, `manifest`
#### Deprecations
* `React.renderComponent` --> `React.render`
* `React.renderComponentToString` --> `React.renderToString`
* `React.renderComponentToStaticMarkup` --> `React.renderToStaticMarkup`
* `React.isValidComponent` --> `React.isValidElement`
* `React.PropTypes.component` --> `React.PropTypes.element`
* `React.PropTypes.renderable` --> `React.PropTypes.node`
* **DEPRECATED** `React.isValidClass`
* **DEPRECATED** `instance.transferPropsTo`
* **DEPRECATED** Returning `false` from event handlers to preventDefault
* **DEPRECATED** Convenience Constructor usage as function, instead wrap with `React.createFactory`
* **DEPRECATED** use of `key={null}` to assign implicit keys
#### Bug Fixes
* Better handling of events and updates in nested results, fixing value restoration in "layered" controlled components
* Correctly treat `event.getModifierState` as case sensitive
* Improved normalization of `event.charCode`
* Better error stacks when involving autobound methods
* Removed DevTools message when the DevTools are installed
* Correctly detect required language features across browsers
* Fixed support for some HTML attributes:
* `list` updates correctly now
* `scrollLeft`, `scrollTop` removed, these should not be specified as props
* Improved error messages
### React With Addons
#### New Features
* `React.addons.batchedUpdates` added to API for hooking into update cycle
#### Breaking Changes
* `React.addons.update` uses `assign` instead of `copyProperties` which does `hasOwnProperty` checks. Properties on prototypes will no longer be updated correctly.
#### Bug Fixes
* Fixed some issues with CSS Transitions
### JSX
#### Breaking Changes
* Enforced convention: lower case tag names are always treated as HTML tags, upper case tag names are always treated as composite components
* JSX no longer transforms to simple function calls
#### New Features
* `@jsx React.DOM` no longer required
* spread (`{...}`) operator introduced to allow easier use of props
#### Bug Fixes
* JSXTransformer: Make sourcemaps an option when using APIs directly (eg, for react-rails)

View File

@@ -0,0 +1,39 @@
---
title: React.js Conf Updates
author: vjeux
---
Yesterday was the [React.js Conf](http://conf.reactjs.com/index.html) call for presenters submission deadline. We were
surprised to have received a total of **one hundred talk proposals** and were
amazed that 600 people requested to be notified when ticket go on sale. This is incredible!
When we organized the conference, we decided to start small since this is the
first React.js conference. Also, we weren't sure what level of demand to expect,
so we planned for a single-track, two-day conference on Facebook's campus. The
largest room available would accomodate 18 speaking slots and 200 attendees.
The spacial configuration makes it difficult to add a second track and changing
venues only two months in advance would be too difficult, so we are deciding to
stick with the originally planned format and venue on Facebook's campus.
Unfortunately, this means that we can only accept a small number of the awesome
conference talk proposals. In order to make sure attendees get a fair shot at
registering, we're going to to sell tickets in three separate first-come,
first-serve phases. **Tickets will cost $200 regardless of which phase they are
purchased from and all proceeds will go to charity**.
- Friday November 28th 2014 — Noon PST: First wave of tickets
- Friday December 5th 2014 — Noon PST: Second wave of tickets
- Friday December 12th 2014 — Noon PST: Third and last wave of tickets
We really do wish that everyone could attend React.js Conf, but in order to
ensure a quality experience for those who attend, we feel it will be best to
limit the size of the conference to what was originally planned for. This means
that not everyone who wants to attend will be able to, and many talks that
would be excellent contributions to the conference will have to be postponed
until the next conference. All the talks will be recorded and put online shortly after.
We hope to see many of you at React.js Conf this January.
Sincerely,
React Core Team

View File

@@ -0,0 +1,99 @@
---
title: "Community Round-up #24"
layout: post
author: steveluscher
---
## Keep it Simple
Pedro Nauck ([pedronauck](https://github.com/pedronauck)) delivered an impeccably illustrated deck at Brazil's _Front in Floripa_ conference. Watch him talk about how to keep delivering value as your app scales, by keeping your development process simple.
<script async class="speakerdeck-embed" data-id="44129b9054c901328b89221e99b278fe" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
Murilo Pereira ([mpereira](https://github.com/mpereira)) tussles with the topic of complexity in this blog post about [coping with scaling up](http://www.techsonian.net/2014/09/from-backbone-to-react-our-experience-scaling-a-web-application/), where he describes how his team used React to make possible the “nearly impossible.”
I ([steveluscher](https://github.com/steveluscher)) spoke at Manning Publications' “Powered By JavaScript” Strangeloop pre-conf in St. Louis. There, I proposed a new notation to talk about development complexity Big-Coffee Notation ☕(n) and spoke about the features of React that help keep our Big-Coffee from going quadratic, as our user interfaces get more complex.
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/rI0GQc__0SM" frameborder="0" allowfullscreen></iframe>
James Pearce ([jamesgpearce](https://github.com/jamesgpearce)) carried Big-Coffee all the way to Raleigh, NC. At the _All Things Open_ conference, he spoke about some of the design decisions that went into React, particularly those that lend themselves to simpler, more reliable code.
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/m2fuO2wl_3c" frameborder="0" allowfullscreen></iframe>
## All About Isomorphism
Michael Ridgway ([mridgway](https://github.com/mridgway)) shows us how Yahoo! (who recently [moved Yahoo! Mail to React](http://www.slideshare.net/rmsguhan/react-meetup-mailonreact)) renders their React+Flux application, server-side.
<script async class="speakerdeck-embed" data-id="87ecaa3048750132f42542ffc18c6fcf" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>
Péter Márton ([hekike](https://github.com/hekike)) helps us brew a cold one (literally) using an application that's server-client [isomorphic and indexable](http://blog.risingstack.com/from-angularjs-to-react-the-isomorphic-way/). Demo and sample code included cold ones sold separately.
And, lest you think that client-server isomorphism exists in pursuit of crawalable, indexable HTML alone, watch as Nate Hunzaker ([nhunzaker](https://github.com/nhunzaker)) [server renders data visualizations as SVG](http://viget.com/extend/visualization-is-for-sharing-using-react-for-portable-data-visualization) with React.
## React Router Mows the Lawn
Ryan Florence ([rpflorence](https://github.com/rpflorence])) and Michael Jackson ([mjackson](https://github.com/mjackson)) unveiled a new API for [React Router](https://github.com/rackt/react-router) that solves some of its user's problems by eliminating the problems themselves. Read all about what React Router learned from its community of users, and how they've [rolled your ideas into their latest release](https://github.com/rackt/react-router/wiki/Announcements).
## React in Practice
Jonathan Beebe ([somethingkindawierd](https://github.com/somethingkindawierd)) spoke about how he uses React to build tools that deliver hope to those trying to make the best of a bad situation. Watch his talk from this year's _Nodevember_ conference in Nashville
<iframe width="420" height="315" src="//www.youtube-nocookie.com/embed/uZgAq1CZ1N8" frameborder="0" allowfullscreen></iframe>
If you take a peek under the covers, you'll find that React powers [Carousel](https://blog.carousel.com/2014/11/introducing-carousel-for-web-ipad-and-android-tablet/), Dropbox's new photo and video gallery app.
We enjoyed a cinematic/narrative experience with this React-powered, interactive story by British author William Boyd. Dive into “[The Vanishing Game](https://thevanishinggame.wellstoried.com)” and see for yourself.
## Be Kind, Rewind
Spend the next 60 seconds watching Daniel Woelfel ([dwwoelfel](https://github.com/dwwoelfel)) serialize a React app's state as a string, then deserialize it to produce a working UI. Read about how he uses this technique to [reproduce bugs](http://blog.circleci.com/local-state-global-concerns/) reported to him by his users.
<iframe width="420" height="315" src="//www.youtube-nocookie.com/embed/5yHFTN-_mOo" frameborder="0" allowfullscreen></iframe>
## Community Components
Tom Chen ([tomchentw](https://github.com/tomchentw)) brings us a [react-google-maps](https://tomchentw.github.io/react-google-maps/) component, and a way to syntax highlight source code using Prism and the [react-prism](https://tomchentw.github.io/react-prism/) component, for good measure.
Jed Watson ([jedwatson](https://github.com/JedWatson)) helps you manage touch, tap, and press events using the [react-tappable](https://github.com/JedWatson/react-tappable) component.
To find these, and more community-built components, consult the [React Components](http://react-components.com/) and [React Rocks](http://react.rocks) component directories. React Rocks recently exceeded one-hundred listed components and counting. See one missing? Add the keyword `react-component` to your `package.json` to get listed on React Components, and [submit a link to React Rocks](https://docs.google.com/forms/d/1TpnwJmLcmmGj-_TI68upu_bKBViYeiKx7Aj9uKmV6wY/viewform).
## Waiter, There's a CSS In My JavaScript
The internet is abuzz with talk of styling React components using JavaScript instead of CSS. Christopher Chedeau ([vjeux](https://github.com/vjeux)) talks about some of the [fundamental style management challenges](https://speakerdeck.com/vjeux/react-css-in-js) we grapple with, at Facebook scale. A number of implementations of JavaScript centric style management solutions have appeared in the wild, including the React-focused [react-style](https://github.com/js-next/react-style).
## Test Isolation
Yahoo! shows us how they make use of `iframe` elements to [unit test React components in isolation](http://yahooeng.tumblr.com/post/102274727496/to-testutil-or-not-to-testutil).
## You've Got The Hang of Flux, Now Let's Flow
Facebook Open Source released [Flow](https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/) this month a static type checker for JavaScript. Naturally, Flow supports JSX, and you can use it to [type check React applications](https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/#compatibility). There's never been a better reason to start making use of `propTypes` in your component specifications!
## Countdown to React.js Conf 2014
We're counting down the days until [React.js Conf](http://conf.reactjs.com) at Facebook's headquarters in Menlo Park, California, on January 28th & 29th, 2015. Thank you, to everyone who responded to the Call for Presenters. Mark the dates; tickets go on sale in three waves: at noon PST on November 28th, December 5th, and December 12th, 2014.
## React Meetups Around the World
<blockquote class="twitter-tweet" lang="en"><p>React JS meetup having pretty good turn up rate today <a href="https://twitter.com/hashtag/londonreact?src=hash">#londonreact</a> <a href="http://t.co/c360dlVVAe">pic.twitter.com/c360dlVVAe</a></p>&mdash; Alexander Savin (@karismafilms) <a href="https://twitter.com/karismafilms/status/535152580377468928">November 19, 2014</a></blockquote>
<div class="skinny-row">
<div class="skinny-col">
<blockquote class="twitter-tweet" lang="en"><p>60+ attendees at the second React.js Utah meetup. <a href="https://twitter.com/ryanflorence">@ryanflorence</a> doing a great job, even without the internet. <a href="http://t.co/fV59AQTOyu">pic.twitter.com/fV59AQTOyu</a></p>&mdash; ReactJS Utah (@reactjsutah) <a href="https://twitter.com/reactjsutah/status/527259410020573184">October 29, 2014</a></blockquote>
</div>
<div class="skinny-col">
<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/hashtag/ReactJS?src=hash">#ReactJS</a> meetup at <a href="https://twitter.com/Yahoo">@Yahoo</a> ! History of <a href="https://twitter.com/yahoomail">@yahoomail</a> and why we chose react and NodeJS <a href="http://t.co/Nm4EdTv45G">pic.twitter.com/Nm4EdTv45G</a></p>&mdash; rmsguhan (@rmsguhan) <a href="https://twitter.com/rmsguhan/status/515370950427029504">September 26, 2014</a></blockquote>
</div>
</div>
<div class="skinny-row">
<div class="skinny-col">
<blockquote class="twitter-tweet" data-cards="hidden" lang="en"><p>The very first ReactJS meetup in NYC tonight, I&#39;ll be speaking about the big ideas behind Om <a href="http://t.co/dvPrFqE9eP">http://t.co/dvPrFqE9eP</a></p>&mdash; David Nolen (@swannodette) <a href="https://twitter.com/swannodette/status/532190993463128064">November 11, 2014</a></blockquote>
</div>
<div class="skinny-col">
<blockquote class="twitter-tweet" lang="en"><p>If anyone in Sydney is curious about <a href="https://twitter.com/reactjs">@reactjs</a>, I&#39;m presenting at <a href="https://twitter.com/sydjs">@sydjs</a> tonight on how to use it and why it is the future. <a href="https://twitter.com/hashtag/javascript?src=hash">#javascript</a></p>&mdash; Jed Watson (@JedWatson) <a href="https://twitter.com/JedWatson/status/534943557568565248">November 19, 2014</a></blockquote>
</div>
</div>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

View File

@@ -0,0 +1,37 @@
---
title: React v0.12.2
author: zpao
---
We just shipped React v0.12.2, bringing the 0.12 branch up to date with a few small fixes that landed in master over the past 2 months.
You may have noticed that we did not do an announcement for v0.12.1. That release was snuck out in anticipation of [Flow](http://flowtype.org/), with only transform-related changes. Namely we added a flag to the `jsx` executable which allowed you to safely transform Flow-based code to vanilla JS. If you didn't update for that release, you can safely skip it and move directly to v0.12.2.
The release is available for download from the CDN:
* **React**
Dev build with warnings: <https://fb.me/react-0.12.2.js>
Minified build for production: <https://fb.me/react-0.12.2.min.js>
* **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-0.12.2.js>
Minified build for production: <https://fb.me/react-with-addons-0.12.2.min.js>
* **In-Browser JSX transformer**
<https://fb.me/JSXTransformer-0.12.2.js>
We've also published version `0.12.2` of the `react` and `react-tools` packages on npm and the `react` package on bower. `0.12.1` is also available in the same locations if need those.
Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.
## Changelog
### React Core
* Added support for more HTML attributes: `formAction`, `formEncType`, `formMethod`, `formTarget`, `marginHeight`, `marginWidth`
* Added `strokeOpacity` to the list of unitless CSS properties
* Removed trailing commas (allows npm module to be bundled and used in IE8)
* Fixed bug resulting in error when passing `undefined` to `React.createElement` - now there is a useful warning
### React Tools
* JSX-related transforms now always use double quotes for props and `displayName`

View File

@@ -0,0 +1,37 @@
---
title: React.js Conf Diversity Scholarship
author: zpao
---
Today I'm really happy to announce the React.js Conf Diversity Scholarship! We believe that a diverse set of viewpoints and opinions is really important to build a thriving community. In an ideal world, every part of the tech community would be made up of people from all walks of life. However the reality is that we must be proactive and make an effort to make sure everybody has a voice. As conference organizers we worked closely with the Diversity Team here at Facebook to set aside 10 tickets and provide a scholarship. 10 tickets may not be many in the grand scheme but we really believe that this will have a positive impact on the discussions we have at the conference.
I'm really excited about this and I hope you are too! The full announcement is below:
- - -
The Diversity Team at Facebook is excited to announce that we are now accepting applications for the React.js Conf scholarship!
Beginning today, those studying or working in computer science or a related field can apply for an all-expense paid scholarship to attend the React.js Conf at Facebooks Headquarters in Menlo Park, CA on January 28 & 29, 2015. React opens a world of new possibilities such as server-side rendering, real-time updates, different rendering targets like SVG and canvas. Join us at React.js Conf to shape the future of client-side applications! For more information about the React.js conference, please see the [website](http://conf.reactjs.com/) and [previous](/react/blog/2014/10/27/react-js-conf.html) [updates](/react/blog/2014/11/24/react-js-conf-updates.html) on our blog.
At Facebook, we believe that anyone anywhere can make a positive impact by developing products to make the world more open and connected to the people and things they care about. Given the current realities of the tech industry and the lack of representation of communities we seek to serve, applicants currently under-represented in Computer Science and related fields are strongly encouraged to apply.
Facebook will make determinations on scholarship recipients in its sole discretion. Facebook complies with all equal opportunity laws.
To apply for the scholarship, please visit the Application Page: <https://www.surveymonkey.com/s/XVJGK6R>
## Award Includes
* Paid registration fee for the React.js Conf January 28 & 29th at Facebooks Headquarters in Menlo Park, CA
* Paid travel and lodging expenses
* Additional $200 meal stipend
## Important Dates
* Monday, January 5, 2015: Applications for the React.js Conf Scholarship must be submitted in full
* Friday, January 9, 2015: Award recipients will be notified by email of their acceptance
* Wednesday & Thursday, January 28 & 29, 2015: React.js Conf
## Eligibility
* Must currently be studying or working in Computer Science or a related field
* International applicants are welcome, but you will be responsible for securing your own visa to attend the conference
* You must be available to attend the full duration of React.js conf on January 28 and 29 at Facebook Headquarters in Menlo Park

Some files were not shown because too many files have changed in this diff Show More