Commit Graph
6863 Commits
Author SHA1 Message Date
Paul O’ShannessyandGitHub 4886e028bf Specify possible need for C++ compiler (#7064) 2016-06-17 11:34:04 -07:00
Nik NybyandJim a8d8210222 update babel-core to 5.8.34 in tutorial docs (#7059) 2016-06-16 20:50:14 -07:00
Claudio BrandolinoandPaul O’Shannessy 5bca3773ab Standardise format of the three "state" questions. (#7046)
* Standardise format of the three "state" questions.

The original format follows the template:

 > 1. x? if `x` then probably isn't state
 > 2. y? if `!y` then probably isn't state
 > 3. z? if `z` then it's not state

This caused both me and a hallway tester to do a double take.

The proposed reformulation allows the answers to follow the same template.

In the same spirit, it uses the same contraction pattern in the last answer (`it's not state`-> `it isn't state`). This has the welcome side effect to make the lack of "probably" stand out more.

* Update phrasing in thinking in reacr
2016-06-16 10:35:18 -07:00
JimandGitHub 49238b9440 Warn if people mutate children. (#7001) 2016-06-15 22:22:31 -07:00
Toru KobayashiandPaul O’Shannessy 718c07c915 Remove setProps and replaceProps from docs (#7044) 2016-06-14 22:13:26 -07:00
Toru KobayashiandPaul O’Shannessy e8fa464d6f Remove setProps and replaceProps from src (#7045) 2016-06-14 22:11:37 -07:00
JimandGitHub 97d89fa5bf Move null-input-value-prop warning into devtool, add stack trace (#7040) 2016-06-14 16:34:38 -07:00
Paul O’ShannessyandGitHub 6e8c2fb828 Revert "Remove setProps and replaceProps completely" (#7039) 2016-06-14 15:02:01 -07:00
JuanandJim b618b786a9 Update readme to latest React description (#7014)
* Update readme to latest React description

* Update readme to latest wordsmithing
2016-06-14 12:46:21 -07:00
Qin JunwenandPaul O’Shannessy a394ed6a6c Update 10.4-test-utils.md (#6971)
The find/scry methods which returns DOM component in react@0.13 now returns DOMElement in react@0.14 and later.
2016-06-14 14:09:20 -04:00
Robert HaritonovandJim 4577db6d3c Add React Amsterdam conference to the list (#7028) 2016-06-14 11:02:13 -07:00
nhducitandPaul O’Shannessy eda159cd28 Update 03-interactivity-and-dynamic-uis.md (#7015) 2016-06-14 13:55:38 -04:00
Christoph PojerandBen Alpert 6b8db0e111 Add symbol to identify a ReactTestComponent instance. (#7035) 2016-06-13 22:50:28 -07:00
Ben AlpertandGitHub 96d2a30c25 Wordsmith the homepage (#7022) 2016-06-13 12:40:18 -07:00
Ryo ShibayamaandKeyan Zhang e487c36ec0 Fix Japanese/Italian/Korean tutorials (#7020)
* Fix japanese tutorial

* Fix Italian tutorial as same as e4fe662

* Fix Korean tutorial as same as e4fe662
2016-06-12 00:03:13 -07:00
Ben AlpertandGitHub c7868cc741 New marketing copy on homepage (#7012) 2016-06-10 19:47:23 -07:00
inkinworldandJim 665633a1b7 Update 12-context.md (#6973)
Modify a clerical error
2016-06-10 11:52:10 -07:00
Dominic GannawayandBen Alpert 40f6d3eaca Performance: setTextContent should attempt to set TextNode nodeValue where possible (#7005) 2016-06-10 09:57:31 -07:00
Keyan ZhangandGitHub 46cd6a0b62 pinned babylon version for eslint to work (#7008) 2016-06-09 16:14:44 -07:00
Jim 2282894d52 Remove console.log from test (#7006) 2016-06-09 09:24:03 -07:00
Jim 0bb0fe8d00 Fix controlled/uncontrolled validation for radio+checkbox inputs (#7003) 2016-06-09 07:58:42 -07:00
Toru KobayashiandJim 731e42998a Remove setProps and replaceProps completely (#6921) 2016-06-09 03:53:52 -07:00
ogomandJim 9c7f895783 Updte tutorial to ja-JP (#6967) 2016-06-08 19:20:20 -07:00
Jim f0b140d726 Fix IE11 placeholder textContent value bug. (#7002) 2016-06-08 18:58:37 -07:00
Brandon DailandJim c47830d12c Warn if childContextType is defined on SFC (#6933)
Add console.error message content check

Use appropriate name in warning/test
2016-06-08 13:32:43 -07:00
Hiroyuki WadaandJim 518336e2fb Fix #5839 Add error event to source element (#6941)
* Fix #5839 Add error event to source element

* Add test case for <source onError={callback}>
2016-06-08 13:30:27 -07:00
Josh HuntandBen Alpert 99d8524d23 Fix #6950, work around IE missing innerHTML on SVG nodes (#6982)
* Workaround IE lacking innerHTML on SVG elements

* Add tests for setInnerHTML

* Correctly check if node has innerHTML property

* Ensure tests for setInnerHTML actually tests both codepaths

* Provide mock element for setInnerHTML tests

* Only use SVG setInnerHTML workaround for SVG elements
2016-06-08 10:00:03 -07:00
Yusong LiuandJim 5331323cd2 Fix the typo in the documentaion pages for shallowCompare (#6980)
* fix the typo for the docs of shallowCompare at:
https://facebook.github.io/react/docs/shallow-compare.html

* change "value" to "values" to match the two objects.
2016-06-07 23:09:50 -07:00
Sebastian Markbåge 0cafd83834 Merge pull request #6988 from sebmarkbage/newreconciler
[Fiber] Minimize abuse of .alternate
2016-06-07 18:42:18 -07:00
Timothy Yung 7988acaa95 Improve error message for components in bad states (missing instance) (#6990) 2016-06-07 17:23:40 -07:00
Keyan Zhang 1abce1630c Add reactProdInvariant and corresponding babel rewrite pass (#6948) 2016-06-07 17:11:04 -07:00
Sebastian Markbage 40180c4b26 Get rid of ugly and difficult to follow breaks in switch
Because pattern matching or something.
2016-06-07 17:05:25 -07:00
Sebastian Markbage c83a0428f1 Minimize abuse of .alternate
This avoids using .alternate as much as possible and isolates it
to the root. For anything that is "work in progress" this happens
to be the same as the alternate field. To avoid an extra "current"
field on work in progress fibers, we can just use the alternate.

The timing for when this is true might be a bit tricky to reason
about so I explicitly pass the current value everywhere from the
top. That way we can always change this in the future to use an
explicit field or we can try to maintain a parallel data
structure that remembers which was the "current" fiber for each
wip child.
2016-06-07 15:03:32 -07:00
Sebastian Markbåge ccd26ee020 Merge pull request #6981 from sebmarkbage/newreconciler
[Fiber] Add support for simple updates and fiber pooling
2016-06-07 14:30:07 -07:00
Sebastian Markbage 3a32d2642f Rename unitOfWork -> workInProgress
These values represent fibers that are incomplete. In the current
model they're mutated in place. In a completely immutable model
they would need to be cloned for every step they make progress.
I.e. one where the child is still in this WIP state and one when
it is complete.

To clarify this I'll name them workInProgress while they're in
that state, which is also what Jordan did in his prototype.
2016-06-07 13:49:12 -07:00
Sebastian Markbage cce58ffd62 Simple updates using alternate fibers
This splits the Fiber type into Fiber and Instance. This could be
two different object instances to save memory. However, to avoid
GC thrash I merge them into one.

When ReactChildFiber reconciles children, it clones the previous
fiber. This creates a new tree for work-in-progress. The idea is
that once flushed, this new tree will be used at the root.

However, we know that we'll never need more than two trees
at a time. Therefore my clone function stores the clone on the
original. Effectively this creates a fiber pool.

Ideally, the .alternate field shouldn't be used outside of clone
so that everything can work with pure immutability. I cheat a bit
for now so I don't have to pass both trees everywhere.

ReactChildFiber is a bit hacky for reuse and doesn't solve all
cases. Will fix that once I try to get parity.
2016-06-07 13:49:11 -07:00
Jim eb705d1448 Fix autofocus for input and textarea (#6986) 2016-06-07 12:50:37 -07:00
Dan Abramov d101f68bce Tweak ReactPerf warning message and code style (#6977) 2016-06-06 20:59:28 +02:00
Ben Alpert 8c60aaf430 Revert "Fallback to legacy set/get in old versions of FF" (#6976) 2016-06-06 11:49:43 -07:00
AlexanderandDan Abramov 2a46103ac8 Warn that ReactPerf does not work in the production build (#6884)
Fixes #6871
2016-06-06 20:46:57 +02:00
Dan Abramov afe483790b Revert "Warn that ReactPerf does not work in the production build (#6884, #6975)"
This reverts commit f71dfbcbf0.

Reverting because GitHub stripped the original PR author.
2016-06-06 19:44:40 +01:00
Dan Abramov f71dfbcbf0 Warn that ReactPerf does not work in the production build (#6884, #6975)
Fixes #6871
2016-06-06 20:37:46 +02:00
Keyan Zhang cf73de9459 [Docs] Error Decoder Page (#6946) 2016-06-04 14:43:56 -07:00
Ben Alpert 3c3c30a19a Fix function declaration in if statement (#6963)
Firefox doesn't like these and throws.
2016-06-04 13:37:57 -07:00
Keyan Zhang 96994c20b8 added instruction for downloading babel-browser (#6960) 2016-06-03 15:43:32 -07:00
Ben Alpert 1801d56500 Use remarkable instead of marked (#6961)
https://github.com/reactjs/react-tutorial/issues/139
2016-06-03 14:41:38 -07:00
Keyan Zhang c9eb572a6f Fix null node issue in ReactCSSTransitionGroup (#6958) 2016-06-03 13:42:45 -07:00
Paul O’Shannessy d3b36d5524 Merge pull request #6957 from zpao/flow026
Upgrade Flow
2016-06-03 13:17:15 -07:00
Paul O’Shannessy dd093faadf Add <any> type args for ReactElement,Class,Component 2016-06-03 13:13:20 -07:00
Paul O’Shannessy 2efc7186fe Fix $FlowFixMe broken by comment spanning multiple lines 2016-06-03 13:13:19 -07:00