Toru Kobayashi
be0551d01e
Release syntheticEvent.target on the destructor
2016-01-14 15:09:56 +09:00
Ben Alpert
0ebc7b60e1
Revert "Merge pull request #5689 from jimfb/cleanup-5151"
...
This reverts commit 067547c1d1 , reversing
changes made to 102cd29189 .
2016-01-05 15:08:15 -08:00
Jim
067547c1d1
Merge pull request #5689 from jimfb/cleanup-5151
...
Get rid of getNativeNode()
2016-01-05 14:42:05 -08:00
Rick Beerendonk
bef45b0b1a
Year-agnostic copyright message, like React Native uses, to prevent the need for yearly changes.
2015-12-29 20:20:32 +01:00
jim
8eabf84204
Get rid of getNativeNode()
2015-12-17 19:04:27 -08:00
Justas Brazauskas
0886273438
Fix few typos in React docs and comments
2015-12-13 16:39:07 +02:00
Ben Alpert
46f5251c66
Remove @typechecks
...
These don't really do anything.
```
codemod.py -d src --extensions js -m '\s* \* @typechecks.*?\n' '\n'
```
with "yes to all".
2015-12-10 11:26:45 -08:00
Scott Feeney
9c21e2f3c4
shallow render: fix setState in componentWillMount
2015-12-01 19:43:52 -08:00
Ben Alpert
418ba27485
Kill global queue in ReactMultiChild
...
As we move away from using HTML for updates, this becomes less useful.
2015-11-25 12:59:02 -08:00
Ben Alpert
812e1a877f
Merge pull request #5500 from hejld/master
...
Update DOM_OPERATION_TYPES mappings for ReactDefaultPerfAnalysis
2015-11-20 11:21:06 -08:00
Sebastian Markbåge
64f795e5ef
Merge pull request #5411 from simonewebdesign/master
...
ReactShallowRenderer.render returns the rendered output
2015-11-20 11:20:37 -08:00
hejld
a3779421a1
Update DOM_OPERATION_TYPES mappings for ReactDefaultPerfAnalysis
2015-11-18 20:58:32 +01:00
Ben Alpert
1a6d1e74e0
Merge pull request #5330 from laskos/fix-shallow-rendering-function-refs
...
Fix shallow renderer with ref as function
2015-11-17 23:53:00 -08:00
Simone Vittori
c8b8c818b5
ReactShallowRenderer.render returns the rendered output
2015-11-08 13:07:07 +00:00
Tay Yang Shun
d16754125f
More consistent error message for findRenderedDOMComponentWithX
2015-11-06 03:05:08 +08:00
Ben Alpert
9419976e51
Revert #4993 with an added test for refs
...
We were shallow-rendering a component that used refs at FB so this can't go in as-is. It's a little unclear what we _should_ do though, since there is nothing to hold a ref to (since we're shallowly rendering) and we generally promise that child refs are resolved before a parent's componentDidMount. Also, changing shallow rendering to use the original `_renderValidatedComponent` (instead of `_renderValidatedComponentWithoutOwnerOrContext`) breaks tests because now the `_owner` field doesn't match up for `toEqual` (non-null in `getRenderOutput` but null if constructed in a test).
2015-11-04 17:53:40 -08:00
Ben Alpert
3cebadaa6b
Remove now-unused _rootNodeID from composites
2015-11-04 11:39:44 -08:00
Ben Alpert
663c4b7d2e
Stop relying on hierarchical IDs in ReactDefaultPerf
2015-11-04 11:39:43 -08:00
Ben Alpert
5d94d7d43c
Perf: Static children count for wasted time
2015-11-04 11:39:43 -08:00
Ben Alpert
4ba0e95a96
Kill ReactMount.getNode/getID/purgeID with fire
2015-11-04 11:39:43 -08:00
Ben Alpert
796f8c353c
put/deleteListener take an instance, not an ID
...
This removes SimpleEventPlugin's dependency on ReactMount.getID.
2015-11-04 11:39:43 -08:00
Ben Alpert
f470cb88f8
Events: Pass native instances up until propagation
...
Next step: take advantage of having the native instances in EventPropagators instead of converting right back to IDs.
2015-11-04 11:39:43 -08:00
Ben Alpert
ce528457a4
ReactDOMComponentTree
...
New module! With this, we have a new module that uses the component tree to store DOM nodes. Most of the logic in this file relates to markup adoption -- if we were to drop that (along with server rendering) this file could just be a `return inst._nativeNode;`.
This works with useCreateElement only because we need to reference each node as it's created.
Events is now the only thing using ReactMount.getNode -- I'll introduce pointers back from the DOM nodes (and a `ReactDOMComponentTree.getInstanceFromNode`) and make that work.
2015-11-03 17:03:40 -08:00
Ben Alpert
5a7c273a1b
Always do useCreateElement for updates
...
Initial render can still be a markup string.
2015-11-03 17:03:40 -08:00
Ben Alpert
c802e9ede9
Test fixups after #4993
2015-11-02 18:26:52 -08:00
Ben Alpert
d2888798f0
Merge pull request #4993 from jsdf/shallow-render-lifecycle
...
Run all component lifecycle methods when shallow rendering
2015-11-02 18:16:55 -08:00
conorhastings
fbb8d2fe2d
Show a friendly error when using TestUtils.Simulate with shallow rendering
2015-11-02 20:14:26 -05:00
Sławomir Laskowski
f00d45d65f
Fix shallow renderer with ref as function
2015-10-30 00:23:24 +01:00
cpojer
ac17bdaaba
Remove generateFromMetadata and getMetadata usage.
2015-10-29 15:45:30 -07:00
cpojer
2ecfc4f8fb
Codemod old APIs away.
2015-10-29 12:40:52 -07:00
Ben Alpert
65b9ceb4f8
Merge pull request #5209 from antoaravinth/5189
...
Don't instrument listeners for ReactDefaultPerf
2015-10-27 11:59:02 -07:00
Ants
59db07c4f9
Fix for the issue #5189
...
Fix for lint issues
Added the test cases for the issue 5189
Removing empty space
Removing the Eventplugin instrumentation code
Removing unwanted white space
2015-10-27 16:33:22 +05:30
Paul O’Shannessy
fc96f31fad
Merge pull request #5185 from yungsters/invariant
...
Remove "Invariant Violation: " from Invariant Error Messages
2015-10-19 12:07:59 -07:00
Ben Alpert
617f03518a
Merge pull request #5192 from spicyj/ev-ind
...
Remove unnecessary indirection in events
2015-10-16 21:43:09 -07:00
Timothy Yung
cdaea311a3
Remove "Invariant Violation: " from Invariant Error Messages
2015-10-16 16:09:28 -07:00
Jim
e0904a0a90
Print number of matches (previously unclear if zero or multiple)
2015-10-16 13:00:10 -07:00
Ben Alpert
ef95128ae2
Remove unnecessary indirection in events
2015-10-15 20:13:14 -07:00
Ben Alpert
622db4ee4f
Fetch node to unmount separately from unmounting
...
My last strategy of getting each node recursively while unmounting was a pain to make work properly with ReactMount's confusing cache. Now, we get the node before unmounting anything in the subtree (and we don't try to find the nodes of descendants).
This is a temporary solution and can go away when we get rid of the giant ReactMount node hash map.
Fixes #5151 .
2015-10-13 12:07:57 -07:00
Ben Alpert
1dca72ebfa
Thread native-parent pointers through everything
...
Now we don't repurpose context for our own secret needs (hi Dan). In this diff I avoid storing the native parent on native (DOM) components and store it only on composites, but we'll probably want to store it on native components too soon for event bubbling.
2015-10-09 14:56:08 -07:00
Ben Alpert
4bb83d237e
Don't break on SVG tags in scryRenderedDOMComponentsWithClass
...
Fixes #5076 .
2015-10-08 08:29:53 -07:00
Ben Alpert
60491d89f8
Use returned native node for composite type-change
...
With this change, all unmounted components should be properly purged from ReactMount's cache.
2015-10-07 12:57:34 -07:00
Ben Alpert
8ebbb7802c
Merge pull request #4918 from glenjamin/shallow-getinstance
...
Expose component instance in shallow rendering
2015-10-07 12:52:09 -07:00
Ben Alpert
501a2765ac
Merge pull request #4947 from fabiomcosta/server_render_index
...
[react] making sure ReactDOMServer always uses ServerReactRootIndex, …
2015-10-07 12:51:59 -07:00
Jim
5a9dea00b9
React->ReactDOM in src/
2015-10-05 16:29:33 -07:00
Ben Alpert
7bd51659d6
Make scry* look through stateless components
...
Fixes #4882 .
2015-09-30 16:00:21 -07:00
Ben Alpert
c512603a8c
Merge pull request #4987 from spicyj/perf
...
Add unit test to ensure DOM mutations are instrumented
2015-09-28 11:48:18 -07:00
Paul O’Shannessy
e9c571acc6
Make ReactTestUtils.scryRenderedComponentWithClass find multiple classes
2015-09-28 10:06:54 -07:00
James Friend
107e3014ef
Perform transaction around shallow render to run lifecycle methods
2015-09-28 22:48:15 +10:00
Ben Alpert
7938650ca9
Make new perf unit test pass
2015-09-27 14:26:26 -07:00
Ben Alpert
47de0a8ce6
Add unit test to ensure DOM mutations are instrumented
2015-09-27 14:26:01 -07:00