Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
677 commits
Select commit Hold shift + click to select a range
6ff2158
Make react-debug-tools a private package
acdlite Nov 7, 2018
485e128
Show deprecated context object warnings usage in ReactDOM server (#14…
trueadm Nov 7, 2018
163c350
[Synchronous Suspense] Reuse deletions from primary tree (#14133)
acdlite Nov 7, 2018
1812743
Release script supports interleaved stable and alpha releases (#14138)
bvaughn Nov 7, 2018
ab3c5e2
Tag MemoComponent with PerformedWork effectTag for DevTools Profiler …
bvaughn Nov 7, 2018
0100643
Invalid actualDuration+treeBaseDuration for hidden+suspended trees (#…
bvaughn Nov 7, 2018
80b2764
Use Entry in `yarn build ...` Instead of Label (#14148)
sebmarkbage Nov 8, 2018
97a3391
Refactor ESLint configuration to enable better IDE integration (#13914)
NMinhNguyen Nov 8, 2018
898cc78
Adding logger pri (#14155)
n8schloss Nov 8, 2018
967f617
[Synchronous Suspense] Don't delete children of suspended component (…
acdlite Nov 8, 2018
a159048
Don't warn if an unmounted component is pinged (#14158)
acdlite Nov 9, 2018
35b34fc
Suspense fuzz tester (#14147)
acdlite Nov 9, 2018
5e49863
Remove errant return assignment (#14164)
acdlite Nov 9, 2018
1aebcdd
Improved suspense support in ReactDOMServer (#14161)
alexmckenley Nov 9, 2018
ca2c7a5
Add fb build of ESLint plugin (#14165)
acdlite Nov 9, 2018
72fb46a
Add global to ESLint plugin bundle config
acdlite Nov 9, 2018
91fd80e
Fix comment typo (#14156)
bgord Nov 9, 2018
a7582a0
Fix typos (#14124)
NE-SmallTown Nov 9, 2018
f637309
Don't run danger on bad build (#14143)
sophiebits Nov 9, 2018
4369bbe
ESlint -> ESLint
acdlite Nov 9, 2018
209fc97
Renamed outdated schedule/tracing referecnes (#14177)
bvaughn Nov 9, 2018
736c5b6
Warn about conflicting style values during updates (#14181)
sophiebits Nov 9, 2018
29116bf
SimpleMemoComponent should warn if a ref is given (#14178)
sophiebits Nov 9, 2018
8394f5b
Use unique thread ID for each partial render to access Context (#14182)
sebmarkbage Nov 9, 2018
712b915
fix typo
sebmarkbage Nov 10, 2018
36970ae
Simplify CSS shorthand property warning (#14183)
sophiebits Nov 10, 2018
6d6d031
Update Readme (#14176)
mmarkelov Nov 12, 2018
0d2323e
Add regression test for #14188 (#14197)
gaearon Nov 13, 2018
6719d68
Save CI-built node_modules as build artifacts (#14205)
bvaughn Nov 13, 2018
34225b2
Update error codes
acdlite Nov 13, 2018
61398c3
Add 16.6.3 Changelog (#14223)
gaearon Nov 13, 2018
ff32b55
[scheduler] Post to MessageChannel instead of window (#14234)
acdlite Nov 14, 2018
b01cc89
[scheduler] Remove window.postMessage fallback
acdlite Nov 14, 2018
d9d479e
Add a checkbox to fixtures UI to choose React production build (#13786)
poeschko Nov 14, 2018
cc3244e
Wrap shorthand CSS property collision warning in feature flag (#14245)
acdlite Nov 15, 2018
492e06f
Reduce scheduler serialization overhead (#14249)
developit Nov 16, 2018
fe7fafb
Clear memoizedState on unmount of fiber to avoid memory leak (#14218)
trueadm Nov 19, 2018
7399e8e
Revert "Clear memoizedState on unmount of fiber to avoid memory leak …
trueadm Nov 19, 2018
a9ee587
Clear fields on unmount of fiber to avoid memory leak (#14276)
trueadm Nov 19, 2018
c627bf1
Fix SSR useCallback in render phase (#14279)
gaearon Nov 19, 2018
e814b6d
Remove `import * as` pattern from the codebase (#14282)
sebmarkbage Nov 19, 2018
3dd68b0
Fix support for mixing react-dom/server@16.6 and react@<16.6 (#14291)
gaearon Nov 20, 2018
a0635f3
Warn about reassigning this.props (#14277)
gaearon Nov 20, 2018
f195668
fix spelling error: Here's -> Here (#14307)
Nov 22, 2018
795aa2b
List ignored types instead of included types in the stack (#14308)
gaearon Nov 22, 2018
df3608c
Use |0 to coerce to number (#14297)
gaearon Nov 22, 2018
26ac3f7
Add more test coverage for nested memo() (#14311)
gaearon Nov 22, 2018
6b40841
Fix resolution of outer props with React.memo() (#14312)
gaearon Nov 22, 2018
0b1b118
Prevent deopts from modifying exports object in stable builds (#14309)
gaearon Nov 23, 2018
d975b10
Publish a local release (canary or stable) to NPM (#14260)
bvaughn Nov 23, 2018
d4e9478
Add basic release script snapshot test (#14280)
bvaughn Nov 23, 2018
e5a700f
update fixtures/packaging/README.md (#14320)
Nov 24, 2018
384c6a6
Add progress bars to longer running async release tasks (#14322)
bvaughn Nov 26, 2018
ff8fa01
Remove usage of `fbjs/lib/invariant` in ReactNativeViewConfigRegistry…
cpojer Nov 26, 2018
c4e38b8
Fix regression: Errors not emitted in streams (#14314)
voxpelli Nov 27, 2018
41d5938
Make useEffect(async) warning more verbose (#14327)
gaearon Nov 27, 2018
603fb4b
Add a null type test for memo (#14325)
springuper Nov 27, 2018
f2ec385
Remove useMutationEffect (#14336)
sophiebits Nov 27, 2018
0097986
Adding isMemo check to react-is package (#14313)
jintoppy Nov 28, 2018
9defea2
Release script auto-determine the latest Canary build if none specifi…
bvaughn Nov 28, 2018
ac99032
Validate propTypes for lazy() and memo() and warn about invalid patte…
gaearon Nov 29, 2018
645bdd8
[Fire] Add initial build infrastructure (#14359)
gaearon Nov 30, 2018
efbd112
Fix bug in cloneHook (#14364)
ioss Nov 30, 2018
f5c4c2a
[Fizz] New Server Rendering Infra (#14144)
sebmarkbage Nov 30, 2018
c3b9b0b
Fixed scheduler setTimeout fallback (#14358)
bvaughn Dec 1, 2018
2149b14
Removed unnecessary externals from Jest bundles (#14372)
bvaughn Dec 2, 2018
bcff4bb
Automated fixture tests (#14370)
bvaughn Dec 2, 2018
4eff64e
Don't prompt to tag or create GitHub release for canary releases (#14…
bvaughn Dec 3, 2018
31de13f
Prevent a v8 deopt when profiling (#14383)
bvaughn Dec 3, 2018
1c4755b
Fix scheduler setTimeout() re-entrancy check (#14384)
bvaughn Dec 3, 2018
ffa8176
fix spelling error: differen -> different (#14378)
AGCB Dec 4, 2018
9352d5f
Tweaked wording for v8 "performance cliff" issue
Dec 4, 2018
63f959f
Enable hooks in fabric (#14301)
sahrens Dec 5, 2018
c70f950
TestRenderer toJSON should not expose the Array wrapper Suspense uses…
bvaughn Dec 5, 2018
86f8e43
Added ErrorBoundary tests for useEffect and useLayoutEffect (#14401)
bvaughn Dec 6, 2018
ca0df75
Implement pauseExecution, continueExecution, dumpQueue for Scheduler …
mrkev Dec 6, 2018
48c6c0a
Dangerfile exits early if build failed (#14400)
bvaughn Dec 7, 2018
1896ce7
Updated version incrementing suggestion in release script based on te…
bvaughn Dec 7, 2018
0941f3f
Remove redundant argument of getPlugins function (#14419)
NE-SmallTown Dec 12, 2018
42a4c19
Add support for Suspense & lazy() to the react-is package (#14423)
pleunv Dec 12, 2018
c7ce148
Inject overrideProps() fn to DevTools (#14427)
bvaughn Dec 13, 2018
7133a1b
Enable hooks by default for FB React Native renderer (#14435)
bvaughn Dec 13, 2018
f51f7e1
Removed Fabric-specific feature flag files and updated Rollup to use …
bvaughn Dec 14, 2018
22582ef
Memoize promise listeners to prevent exponential growth (#14429)
acdlite Dec 14, 2018
f3b38fd
Make scheduler debugging feature flag static
acdlite Dec 18, 2018
8ac72dd
Create separate SchedulerFeatureFlags instead of using ReactFeatureFl…
acdlite Dec 18, 2018
b8b1602
Move SchedulerFeatureFlags fork to src directory to fix lint
acdlite Dec 18, 2018
1cfc65d
React v16.7.0
acdlite Dec 20, 2018
57c5280
Update CHANGELOG for 16.7
acdlite Dec 20, 2018
1c82379
Update ReactFiberScheduler.js (#14477)
CarlMungazi Dec 20, 2018
13ade94
Allow node 11 as devEngine (#14450)
iljadaderko Dec 25, 2018
310eea4
Update ReactUpdateQueue.js (#14521)
CarlMungazi Jan 2, 2019
05d3368
Simplify wording of key warning (#14503)
sophiebits Jan 7, 2019
8df4626
Separate Object.is polyfill (#14334)
mmarkelov Jan 8, 2019
0d72349
Separate current owner and dispatcher (#14548)
bvaughn Jan 8, 2019
e1f368f
Inject ReactCurrentDispatcher ref to DevTools (#14550)
bvaughn Jan 9, 2019
b80a8be
rename useImperativeMethods -> useImperativeHandle (#14565)
Jan 10, 2019
5f129a1
react-debug-tools accepts currentDispatcher ref as param (#14556)
bvaughn Jan 10, 2019
a3b74ba
Fix typo (#14576)
CarlMungazi Jan 12, 2019
5b51f02
make a fork for ReactCurrentDispatcher (#14588)
Jan 14, 2019
443509f
Support configurable labels for custom hooks (#14559)
bvaughn Jan 14, 2019
07455e0
Avoid new Set([iterable]) for thenables (#14592)
aweary Jan 15, 2019
e6dc2e0
Tweak to avoid property read (#14593)
aweary Jan 15, 2019
90223cb
Rename release script fixture test scheduler->tracing (#14590)
bvaughn Jan 15, 2019
c707b28
Add noop useDebugValue hook to partial/server renderer (#14597)
bvaughn Jan 15, 2019
336d6ce
useDebugValue should throw if used in a class component (#14601)
bvaughn Jan 15, 2019
76b8fcc
Added Flow type to keep hooks dispatchers in-sync (#14599)
bvaughn Jan 16, 2019
4ff03b7
Add ESLint rule playground (#14609)
gaearon Jan 16, 2019
efd6c09
Allow useReducer to bail out of rendering by returning previous state…
acdlite Jan 17, 2019
6b9a58d
Warn if number of hooks increases (#14591)
acdlite Jan 17, 2019
dc6c1af
Don't bother comparing constructor when deps are not provided (#14594)
acdlite Jan 17, 2019
382fda8
Add hooks support to ReactShallowRenderer (#14567)
trueadm Jan 17, 2019
f00c0d8
Prune NPM metadata fields from packages before re-publishing (#14617)
bvaughn Jan 17, 2019
4fa1542
Warn when mixing createRoot() and old APIs (#14615)
gaearon Jan 18, 2019
6b0f7b2
Small tweaks to SSR to match #14594 (#14618)
gaearon Jan 18, 2019
3b92bae
Throw an error when using hooks inside useMemo/useState/useReducer, o…
Jan 18, 2019
6b6ac1b
Fix shallow renderer set instance state after gDSFP before calling sC…
chenesan Jan 18, 2019
ef1f413
Use public context.report interface in eslint rules (#14623)
eps1lon Jan 18, 2019
5e96fa5
Warn when second callback is passed to setState/dispatch in Hooks (#1…
gaearon Jan 18, 2019
b39073f
Tidy up NPM checkout process (#14631)
bvaughn Jan 18, 2019
a2e249b
Add directory details to the package.json of all packages (#14628)
greysteil Jan 18, 2019
b3a5edc
Support sync thenables for lazy() (#14626)
gaearon Jan 18, 2019
71bdd8e
Move lazy._result assignment (#14632)
gaearon Jan 18, 2019
1d77e4b
Fix synchronous thenable rejection (#14633)
gaearon Jan 19, 2019
64725e8
Double-render function components with Hooks in DEV in StrictMode (#1…
gaearon Jan 21, 2019
b983a39
Mention forwardRef() in <Fn ref={...} /> errors and warnings (#14644)
gaearon Jan 21, 2019
e6b99d9
fix typo (#14316)
liunian Jan 21, 2019
c3a5792
Fix typo (#14560)
ZZITE Jan 21, 2019
3c65549
Warn about refs on lazy function components (#14645)
gaearon Jan 21, 2019
43322e1
Disallow reading context during useMemo etc (#14648)
gaearon Jan 21, 2019
d2cbe86
Warn about incorrect use of useImperativeHandle() (#14647)
gaearon Jan 21, 2019
224423d
Add test coverage for readContext() on the server (#14649)
gaearon Jan 21, 2019
b2c151e
Revert "Disallow reading context during useMemo etc" (#14651)
gaearon Jan 21, 2019
199de41
Revert "Double-render function components with Hooks in DEV in Strict…
gaearon Jan 21, 2019
8b4b681
RFC: warn when returning different hooks on subsequent renders (#14585)
Jan 22, 2019
fe8cbcc
Importing React for the first example. (#14346)
devrchancay Jan 23, 2019
0a32eec
--save is no longer needed (#14302)
SamCortopassi Jan 23, 2019
5d06ca8
Bump GCC (#14657)
gaearon Jan 23, 2019
c44ad43
Add unit tests for concurrent mode event dispatching (#14415)
sebmarkbage Jan 23, 2019
a94030c
Disallow reading context during useMemo etc (#14653)
gaearon Jan 23, 2019
f21b263
Tweak context invariant message (#14671)
gaearon Jan 23, 2019
e8d8554
Put DEV-only code into DEV blocks (#14673)
gaearon Jan 23, 2019
b4b350d
Revert "Revert "Double-render function components with Hooks in DEV i…
gaearon Jan 23, 2019
7752646
Enable hooks! (#14679)
bvaughn Jan 23, 2019
225a2ec
Make all readContext() and Hook-in-a-Hook checks DEV-only (#14677)
gaearon Jan 24, 2019
9a001a3
Fix typo in code comment (#14696)
wincent Jan 24, 2019
2150d59
State update bug in concurrent mode (#14698)
bvaughn Jan 25, 2019
c2e7361
Fix issue with multiple code branches in hooks linter (#14661)
Yurickh Jan 25, 2019
c2c4cbc
change codeofconduct link (#14711)
deepcoldy Jan 27, 2019
7cee5fb
Spelling abitrarily -> arbitrarily (#14710)
realityforge Jan 27, 2019
dcc7534
Phased dispatcher (#14701)
acdlite Jan 30, 2019
00d5387
Improve Reducer Hook's lazy init API (#14723)
acdlite Jan 30, 2019
3ad80de
Move Hook mismatch warning to first mismatch site (#14720)
acdlite Jan 30, 2019
f242ff4
Warn when second argument is passed to useCallback (#14729)
gaearon Jan 31, 2019
23b5e3b
Restrict effect return type to a function or nothing (#14119)
acdlite Jan 31, 2019
eee0876
Typo in comment (#14739)
DenrizSusam Feb 1, 2019
5361899
Tweak invalid Hook warning and error (#14747)
gaearon Feb 1, 2019
5a80c7a
Update the version with Hooks proposal in README (#14751)
stonexer Feb 4, 2019
815fa9b
Use SameValue instead of === to check for dispatchAction equivalence …
Jessidhia Feb 4, 2019
ae2d80d
Add missing 16.6.1 changelog entry
gaearon Feb 4, 2019
e6e312a
Avoid importing Scheduler directly (#14757)
acdlite Feb 5, 2019
6524147
expose `TestUtils.act()` for batching actions in tests (#14744)
Feb 5, 2019
4b7fa47
[TestUtils.act] fix return result checking (#14758)
Feb 5, 2019
834b632
16.8.0
Feb 6, 2019
4892827
Add 16.8.0 changelog and update some READMEs (#14692)
gaearon Feb 6, 2019
f65ac21
Scheduler.unstable_next (#14756)
acdlite Feb 6, 2019
93d7675
eslint-plugin-react-hooks v1.0.0
Feb 6, 2019
3f59dc7
[TestUtils.act] warn when using TestUtils.act in node (#14768)
Feb 6, 2019
1fd5fa0
Backwards compat fix for ReactCurrentDispatcher on older react versio…
bvaughn Feb 6, 2019
4915896
Add 16.8.1 changelog
gaearon Feb 6, 2019
0dc452e
16.8.1 packages
Feb 6, 2019
2bd96ad
Tweaked publish canary message to show newly published version
Feb 6, 2019
2b565ad
Fix hydration with createRoot warning (#14808)
sebmarkbage Feb 9, 2019
8688fe0
Typo fix in comment (#14787)
DenrizSusam Feb 10, 2019
4bd137b
fix spelling mistakes (#14805)
alicialics Feb 10, 2019
72ba194
use functional component as a first example in readme (#14819)
alexeyraspopov Feb 11, 2019
2b08514
Fix crash unmounting an empty Portal (#14820)
gaearon Feb 11, 2019
220ac92
Fix useImperativeHandle to have no deps by default (#14801)
gaearon Feb 11, 2019
2907c3e
Partial Hydration (#14717)
sebmarkbage Feb 12, 2019
639d318
Fix ignored sync work in passive effects (#14799)
gaearon Feb 12, 2019
c102257
Remove false positive warning and add TODOs about `current` being non…
gaearon Feb 13, 2019
c34da74
Special case crossOrigin for SVG image elements (#14832)
aweary Feb 13, 2019
b7f4fa8
[ShallowRenderer] Queue/rerender on dispatched action after render co…
rodrigopr Feb 13, 2019
2c4f821
Revert "[ShallowRenderer] Queue/rerender on dispatched action after r…
gaearon Feb 13, 2019
b60ba93
Statically enable suspense/partial hydration flag in www (#14842)
sebmarkbage Feb 13, 2019
262755b
Fix typo in code comment (#14836)
DenrizSusam Feb 14, 2019
69386e4
Add React 16.8.2 changelog (#14851)
gaearon Feb 14, 2019
3d143e1
Include component stack in 'act(...)' warning (#14855)
Feb 14, 2019
1f48130
Include another change in 16.8.2
gaearon Feb 14, 2019
3a20cd8
Release 16.8.2
gaearon Feb 14, 2019
7cbb7bf
Fix react-dom/server context leaks when render stream destroyed early…
Feb 14, 2019
ce0e8c4
Release scripts documentation (#14863)
bvaughn Feb 15, 2019
46dc473
Prompt to include UMD build artifact links in GitHub release (#14864)
bvaughn Feb 15, 2019
548992f
Don't discard render phase state updates with the eager reducer optim…
gaearon Feb 19, 2019
08df3e4
Deal with fallback content in Partial Hydration (#14884)
sebmarkbage Feb 19, 2019
6e227d9
Deleted empty App.css (#14149)
JoshuaRabiu Feb 19, 2019
69b3245
Add eslint-plugin-react-hooks/exhaustive-deps rule to check stale clo…
gaearon Feb 20, 2019
51ab6df
Use the canonical nativeTag for Fabric's setNativeProps (#14900)
elicwhite Feb 20, 2019
1bf6ad0
Adding setNativeProps tests for NativeMethodsMixin (#14901)
elicwhite Feb 20, 2019
f2a52ea
Adding ReactNative.setNativeProps that takes a ref (#14907)
elicwhite Feb 21, 2019
5d1e065
Fix warning message for new setNativeProps method. on -> with (#14909)
elicwhite Feb 21, 2019
0452fd1
Updating copyright headers, dropping the year (#14893)
nhunzaker Feb 21, 2019
022ff6c
Fix UMD builds by re-exporting the scheduler priorities (#14914)
gaearon Feb 21, 2019
f64109f
Release 16.8.3
gaearon Feb 21, 2019
fc6c8f0
Fix tracing fixture (#14917)
gaearon Feb 21, 2019
2e89296
[ESLint] Warn against assignments from inside Hooks (#14916)
gaearon Feb 21, 2019
88ffc3b
Release eslint-plugin-react-hooks@1.2.0
gaearon Feb 21, 2019
c46b919
Fix sample ESLint configuration (#14926)
matt-thomson Feb 22, 2019
809350d
Improve pactch release process docs (#14923)
bvaughn Feb 22, 2019
e371687
Release script clarifies which test fixture failed (#14922)
bvaughn Feb 22, 2019
31a901a
[scheduler] Pass didTimeout argument to callbacks (#14931)
acdlite Feb 23, 2019
5c558ca
Remove ReactNoop.flushDeferredPri and flushUnitsOfWork (#14934)
acdlite Feb 23, 2019
c32d4fc
Fixed typo (#14943)
thtg88 Feb 24, 2019
e0eef91
fix(eslint-plugin-react-hooks): node engine updated to version 7 beca…
nutboltu Feb 25, 2019
b0e1ab9
[ESLint] Add more cases to exhaustive-deps rule (#14930)
gaearon Feb 25, 2019
d720c4b
eslint-plugin-react-hooks@1.3.0
gaearon Feb 25, 2019
c46e208
Deprecate ref.setNativeProps in favor of ReactNative.setNativeProps (…
elicwhite Feb 25, 2019
1b23dfb
Unify noop and test renderer assertion APIs (#14952)
acdlite Feb 26, 2019
321e76d
Allow omitting constant primitive deps (#14959)
gaearon Feb 26, 2019
3220b30
Fixed incompatibility between react-debug-tools and useContext() (#14…
bvaughn Feb 26, 2019
f5261b7
Add new mock build of Scheduler with flush, yield API (#14964)
acdlite Feb 27, 2019
929104a
Allow extraneous effect dependencies (#14967)
gaearon Feb 27, 2019
1428041
Replace noop's fake Scheduler implementation with mock Scheduler buil…
acdlite Feb 28, 2019
3970f68
Replace test renderer's fake Scheduler implementation with mock build…
acdlite Feb 28, 2019
8b4dc6f
Swap expect(ReactNoop) for expect(Scheduler) (#14971)
acdlite Feb 28, 2019
72f659d
Support editable useState hooks in DevTools (#14906)
bvaughn Feb 28, 2019
76c6103
Avoid dynamic dispatch for scheduler calls (#14968)
gaearon Mar 1, 2019
f82143d
[ESLint] Deduplicate suggested dependencies (#14982)
gaearon Mar 1, 2019
69f069c
Warn about dependencies outside of render scope (#14990)
gaearon Mar 1, 2019
2e985da
[ESLint] Suggest to destructure props when they are only used as memb…
gaearon Mar 1, 2019
e44c1b3
eslint-plugin-react-hooks@1.4.0
gaearon Mar 1, 2019
e0340ee
Revert #14756 changes to ReactFiberScheduler (#14992)
acdlite Mar 1, 2019
61fe8a3
ReactNoop.yield -> Scheduler.yieldValue (#15008)
acdlite Mar 4, 2019
35cf1b4
Prettier
acdlite Mar 4, 2019
8705200
fix(auto-version-update): update root package version while publishin…
nutboltu Mar 4, 2019
6a27c0b
Warn on mount when deps are not an array (#15018)
gaearon Mar 5, 2019
210ae10
[ESLint] Treat functions that don't capture anything as static (#14996)
gaearon Mar 5, 2019
374db2d
Fix heading in changelog
gaearon Mar 5, 2019
81d9b9a
16.8.4 and changelog
Mar 5, 2019
55a8b1f
Enforce deps array in useMemo and useCallback (#15025)
gaearon Mar 6, 2019
1c33b4e
Import Scheduler directly, not via host config (#14984)
acdlite Mar 6, 2019
d084ec0
[ESLint] Suggest moving inside a Hook or useCallback when bare functi…
gaearon Mar 6, 2019
4acee0b
Fix ESLint rule crash (#15044)
gaearon Mar 7, 2019
087f543
[ESLint] Add more hints to lint messages (#15046)
gaearon Mar 7, 2019
395f028
More concise messages (#15053)
gaearon Mar 7, 2019
3f7379a
[ESLint] Tweak setState updater message and add useEffect(async) warn…
gaearon Mar 7, 2019
bbd671c
eslint-plugin-react-hooks@1.5.0
gaearon Mar 7, 2019
154705e
Run Placeholder tests in persistent mode, too (#15013)
acdlite Mar 9, 2019
f022842
fixed ReactSuspensePlaceholder test
iyegoroff Mar 9, 2019
c2488b3
Merge branch 'master' into react-native-can-render-string
iyegoroff Mar 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/react-dom/src/client/ReactDOMHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
* @flow
*/

import * as Scheduler from 'scheduler';
import type {Fiber} from 'react-reconciler/src/ReactFiber';

import * as Scheduler from 'scheduler';
import {precacheFiberNode, updateFiberProps} from './ReactDOMComponentTree';
import {
createElement,
Expand Down Expand Up @@ -148,9 +149,10 @@ export function getRootHostContext(

export function getChildHostContext(
parentHostContext: HostContext,
type: string,
fiber: Fiber,
rootContainerInstance: Container,
): HostContext {
const type = fiber.type;
if (__DEV__) {
const parentHostContextDev = ((parentHostContext: any): HostContextDev);
const namespace = getChildNamespace(parentHostContextDev.namespace, type);
Expand Down
8 changes: 6 additions & 2 deletions packages/react-native-renderer/src/ReactFabricHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import type {
ReactNativeBaseComponentViewConfig,
} from './ReactNativeTypes';

import type {Fiber} from 'react-reconciler/src/ReactFiber';

import {
mountSafeCallback_NOT_REALLY_SAFE,
warnForStyleProps,
Expand Down Expand Up @@ -264,16 +266,18 @@ export function getRootHostContext(

export function getChildHostContext(
parentHostContext: HostContext,
type: string,
fiber: Fiber,
rootContainerInstance: Container,
): HostContext {
const type = fiber.type;
const prevIsInAParentText = parentHostContext.isInAParentText;
const isInAParentText =
type === 'AndroidTextInput' || // Android
type === 'RCTMultilineTextInputView' || // iOS
type === 'RCTSinglelineTextInputView' || // iOS
type === 'RCTText' ||
type === 'RCTVirtualText';
type === 'RCTVirtualText' ||
!!(fiber.return && fiber.return.type && fiber.return.type.canRenderString);

if (prevIsInAParentText !== isInAParentText) {
return {isInAParentText};
Expand Down
7 changes: 5 additions & 2 deletions packages/react-native-renderer/src/ReactNativeHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import type {ReactNativeBaseComponentViewConfig} from './ReactNativeTypes';
import type {Fiber} from 'react-reconciler/src/ReactFiber';

import invariant from 'shared/invariant';

Expand Down Expand Up @@ -187,16 +188,18 @@ export function getRootHostContext(

export function getChildHostContext(
parentHostContext: HostContext,
type: string,
fiber: Fiber,
rootContainerInstance: Container,
): HostContext {
const type = fiber.type;
const prevIsInAParentText = parentHostContext.isInAParentText;
const isInAParentText =
type === 'AndroidTextInput' || // Android
type === 'RCTMultilineTextInputView' || // iOS
type === 'RCTSinglelineTextInputView' || // iOS
type === 'RCTText' ||
type === 'RCTVirtualText';
type === 'RCTVirtualText' ||
!!(fiber.return && fiber.return.type && fiber.return.type.canRenderString);

if (prevIsInAParentText !== isInAParentText) {
return {isInAParentText};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,33 @@ describe('ReactFabric', () => {
);
});

it('should not throw for text inside of a component that has static property "canRenderString" set', () => {
const ICanRenderString = createReactNativeComponentClass(
'ICanRenderString',
() => ({
validAttributes: {},
uiViewClassName: 'ICanRenderString',
}),
);

class Text extends React.Component {
static canRenderString = true;

render() {
return <ICanRenderString {...this.props} />;
}
}

const Indirection = () => 'Hi';

ReactFabric.render(
<Text>
<Indirection />
</Text>,
11,
);
});

it('dispatches events to the last committed props', () => {
const View = createReactNativeComponentClass('RCTView', () => ({
validAttributes: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,33 @@ describe('ReactNative', () => {
);
});

it('should not throw for text inside of a component that has static property "canRenderString" set', () => {
const ICanRenderString = createReactNativeComponentClass(
'ICanRenderString',
() => ({
validAttributes: {},
uiViewClassName: 'ICanRenderString',
}),
);

class Text extends React.Component {
static canRenderString = true;

render() {
return <ICanRenderString {...this.props} />;
}
}

const Indirection = () => 'Hi';

ReactNative.render(
<Text>
<Indirection />
</Text>,
11,
);
});

it('findNodeHandle should warn if used to find a host component inside StrictMode', () => {
const View = createReactNativeComponentClass('RCTView', () => ({
validAttributes: {foo: true},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-noop-renderer/src/createReactNoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {

getChildHostContext(
parentHostContext: HostContext,
type: string,
fiber: Fiber,
rootcontainerInstance: Container,
) {
if (type === 'uppercase') {
if (fiber.type === 'uppercase') {
return UPPERCASE_CONTEXT;
}
return NO_CONTEXT;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHostContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function pushHostContext(fiber: Fiber): void {
rootInstanceStackCursor.current,
);
const context: HostContext = requiredContext(contextStackCursor.current);
const nextContext = getChildHostContext(context, fiber.type, rootInstance);
const nextContext = getChildHostContext(context, fiber, rootInstance);

// Don't push this Fiber's context unless it's unique.
if (context === nextContext) {
Expand Down
4 changes: 3 additions & 1 deletion packages/react-test-renderer/src/ReactTestHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';

import warning from 'shared/warning';

export type Type = string;
Expand Down Expand Up @@ -109,7 +111,7 @@ export function getRootHostContext(

export function getChildHostContext(
parentHostContext: HostContext,
type: string,
fiber: Fiber,
rootContainerInstance: Container,
): HostContext {
return NO_CONTEXT;
Expand Down