Bernard Lin
fe46def5e2
Updated Chain React ( #9067 )
...
Changed conference date from "Summer 2017" to given date on website
2017-02-27 09:53:47 -06:00
Andrew Clark
07dc04d9f4
Merge pull request #8961 from acdlite/fiberbreakonuncaught
...
[Fiber] Preserve "Break on all/uncaught exceptions" behavior in DEV mode
2017-02-24 16:21:35 -08:00
Andrew Clark
2c59713f71
Remove invokeGuardedCallbackProd
...
We weren't using it anywhere except for the test suite. Instead, we can
change the environment flag and run the tests in both environments.
2017-02-24 16:19:29 -08:00
Andrew Clark
7e348acab7
Use invokeGuardedCallback in place of Fiber try-catch blocks
...
Only in DEV. In production, continue using a local try-catch.
2017-02-24 15:49:33 -08:00
Andrew Clark
13d4574228
invokeGuardedCallback should work when nested
...
Added a guard in the global error event listener to prevent nested
errors from being captured higher up the stack.
Also found a bug where the DEV version of invokeGuardedCallback would
infinite loop if there were nested invocations with the same name. Fixed
by appending the depth to the fake event name. (I'm actually not sure
why this is necessary.)
2017-02-24 15:49:33 -08:00
Andrew Clark
0304008a65
invokeGuardedCallback returns a thrown error
...
We can use this more flexible version for error handling in Fiber.
The DEV mode version uses same fake event trick as before to preserve
"break on uncaught exception" behavior when debugging.
2017-02-24 15:49:33 -08:00
Ben Alpert
0934ab948d
Flatten Text children before rendering ( #9063 )
...
From FB-internal D4613844.
2017-02-24 13:40:08 -08:00
Andrew Clark
bc86ac4380
Merge pull request #8950 from acdlite/fibercompositecomponenttests
...
[Fiber] ReactCompositeComponent-test.js
2017-02-24 11:17:19 -08:00
Andrew Clark
393cdbc745
Consolidate ReactCurrentFiber and ReactDebugLifeCycle
2017-02-24 11:16:58 -08:00
Andrew Clark
d2c28be69b
Use ReactDebugLifeCycle to track if we're inside getChildContext
2017-02-24 11:02:21 -08:00
Andrew Clark
309dea5b4c
Track which lifecycle method we're in during DEV
...
Use this to detect setState inside of render instead of relying on
the owner.
2017-02-24 11:02:21 -08:00
Andrew Clark
ebfde985d9
Warn about nested renders
2017-02-24 11:02:21 -08:00
Andrew Clark
75ee3c1424
Warn about setState inside getChildContext
...
Stack uses a module called ReactInvalidSetStateWarningHook, but all it
does is warn about setState inside getChildContext. Doesn't seem worth
keeping around, so I didn't use it for Fiber, but if I'm mistaken I'll
change it.
2017-02-24 11:02:21 -08:00
Andrew Clark
2f3df5f0b3
Warn about setState in render
2017-02-24 11:02:21 -08:00
Andrew Clark
769c6e0ebe
Merge pull request #9060 from acdlite/fixrecordtestsscript
...
Fix record-tests script
2017-02-24 10:59:44 -08:00
Andrew Clark
3bdc6d0c8e
Fix record-tests script
...
Result of readConfig changed slightly in Jest 0.19.
2017-02-24 10:46:49 -08:00
Andrew Clark
1ae7436d01
Merge pull request #9058 from nihgwu/patch-1
...
fix version
2017-02-24 10:10:11 -08:00
Neo
18229fdeda
fix version
...
per https://github.com/facebook/react/commit/ca4325e3eff16b86879188eb996ebcc9a933336a#commitcomment-21033948
2017-02-24 17:35:27 +08:00
Andrew Clark
ca4325e3ef
16.0.0-alpha.3
v16.0.0-alpha.3
2017-02-23 15:36:08 -08:00
Andrew Clark
18217cfede
Merge pull request #9054 from acdlite/fiberpreventextensions
...
[Fiber] Prevent extensions to fiber in DEV
2017-02-23 14:42:16 -08:00
Andrew Clark
f3c2d9f308
Merge pull request #9004 from acdlite/proptypescheck
...
API for checking external objects against React prop types
2017-02-23 14:37:19 -08:00
Maxwel D'souza
b81175d37a
Removed unnecessary if ( #9031 )
2017-02-23 15:14:21 -06:00
mdogadailo
49840f2e6b
Missing onLoad and onError events on image tag ( #9042 )
2017-02-23 15:05:38 -06:00
Dai Nguyen
d724aed404
Update tutorial.md ( #9051 )
2017-02-23 14:54:03 -06:00
Andrew Clark
ddf59c403a
Prevent extensions to fiber in DEV
...
Helps us avoid accidentally adding fields to the fiber class
2017-02-23 11:23:44 -08:00
Andrew Clark
03ed3437c9
Fix build config
...
ReactDebugCurrentFrame is shared state.
checkPropTypes should be imported via the main React export,
not imported directly.
2017-02-23 11:14:15 -08:00
Andrew Clark
0320b8ecb4
Wrap checkPropTypes in DEV conditional so it's stripped out in prod
2017-02-23 11:14:15 -08:00
Andrew Clark
e6d6ad3e88
Remove closure in checkReactTypeSpec by tracking stack info globally
...
There's a lot of overlap between ReactCurrentOwner,
ReactDebugCurrentFrame, and ReactDebugCurrentFiber that should
be consolidated.
2017-02-23 11:14:14 -08:00
Andrew Clark
9993fdd957
Change formatMessage parameter to getStack
...
Gives us flexibility in the future to deal with the stack and the
message separately.
2017-02-23 11:14:14 -08:00
Andrew Clark
6ff5211dee
Remove warnOnRepeat option
...
Don't need this internally; doubt external users will need it either
2017-02-23 11:14:14 -08:00
Andrew Clark
3746a9dafb
Invert dependency between checkPropTypes and checkReactTypeSpec
...
Expressing checkReactTypeSpec using the public API frees us to move it
to a separate module in the future.
2017-02-23 11:14:14 -08:00
Andrew Clark
e4acd12a9b
Test that checkPropTypes does not throw or return a value
2017-02-23 11:14:14 -08:00
Andrew Clark
600685bdef
Add PropTypes.checkPropTypes API
...
Allows users to check arbitrary objects against React prop types without
relying on the implementation details of the prop validators themselves.
An example of why this is important: some prop validators may throw,
while others return an error object. Calling a prop validator manually
requires handling both cases. `checkPropTypes` does this for you.
2017-02-23 11:14:14 -08:00
Andrew Clark
bef723e47f
Remove ReactPropTypeLocationNames module
...
ReactPropTypeLocationNames was a map of location identifiers to location
display names, for use in warnings. But in practice, this did nothing
except rename "childContext" to "child context." Not worth it, IMO.
Since we are going to add an API for running prop type checks manually,
we need the ability to support arbitrary prop type locations. So
each place that used to accept a ReactPropTypeLocation now just accepts
a string.
2017-02-23 11:14:14 -08:00
Dominic Gannaway
91e8081cf0
Merge pull request #9045 from trueadm/emptyObject-reference-mismatch-due-to-mocking
...
[Fiber] fix ensure class components refs get re-assigned to emptyObject on mount
2017-02-23 15:38:10 +00:00
Dominic Gannaway
23f245173a
Merge pull request #9043 from trueadm/fix-fiber-functional-componment-childcontext
...
[Fiber] adds `childContextTypes` warnings for functional components
2017-02-23 15:37:48 +00:00
Dominic Gannaway
bde5df1d76
addressed code in feedback
2017-02-23 15:37:19 +00:00
Dominic Gannaway
a99d77e073
added a regression test for factory components
2017-02-23 14:00:02 +00:00
Dominic Gannaway
925743bfc9
reverted ReactDOMFeatureFlags
2017-02-23 13:40:16 +00:00
Dominic Gannaway
e7d7809eb1
reverted the getChildContext warning from showing on functional components in Fiber
2017-02-23 13:39:08 +00:00
Dominic Gannaway
25f4abc9d5
mountClassInstance() now re-assigns instance.refs to emptyObject
2017-02-23 12:58:37 +00:00
Dominic Gannaway
a749083b85
fixed comment that was incorrect
2017-02-23 12:42:21 +00:00
Dominic Gannaway
724ae9b35a
reverts previous changes to inlining requires and fixes test suite instead
2017-02-23 12:31:58 +00:00
Ben Alpert
5f6f3277f5
Add test for hack to stop bubbling ( #8922 )
2017-02-22 14:02:10 -08:00
Ben Alpert
9503abe5c7
Pass errorBoundary to logCapturedError ( #9050 )
2017-02-22 13:06:49 -08:00
Andrew Clark
2081a0053a
Merge pull request #8949 from acdlite/fibercomponentlifecycletests
...
[Fiber] Component lifecycle tests
2017-02-22 12:54:42 -08:00
Brian Vaughn
a44a5d68d8
Fix bugs that occur when event responder unmounts during a touch event sequence
...
> This PR adds a test (initially failing) for this case along with a fix for stack and fiber. The stack fix was copied from a Diff submitted by @sema. The fiber fix just required us to stop leaking properties for unmounted views.
> Longer term we may want to explicitly invoke a release event listener for a responder just before unmounting it. This PR does not do that.
2017-02-22 12:47:34 -08:00
Andrew Clark
42c375b136
Merge pull request #9040 from acdlite/assignstateincwrp
...
Support for assigning to this.state inside componentWillReceiveProps
2017-02-22 12:45:58 -08:00
Stephie
5cc2a4fe3e
Fixed typo: "Calcutor" to "Calculator" ( #9047 )
2017-02-22 17:37:55 +00:00
Dan Abramov
55f18f20ea
Update Fiber debugger deps
2017-02-22 17:20:53 +00:00