Skip to content

Commit

Permalink
fix flow, fix creteReactClassIntegration test
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlemen committed Dec 3, 2024
1 parent 7879dbc commit 25b3193
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react/index.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export {useMemoCache as unstable_useMemoCache} from './src/ReactHooks';
export {useMemoCache as c} from './src/ReactHooks';

// Only export captureOwnerStack if the flag is on, to support feature detection.
let captureOwnerStack;
let captureOwnerStack: ?() => null | string;
if (enableOwnerStacks) {
captureOwnerStack = captureOwnerStackImpl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,14 @@ describe('create-react-class-integration', () => {
root.render(<Outer />);
});
assertConsoleErrorDev([
'Component uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead.',
gate(flags =>
flags.enableOwnerStacks
? [
'Component uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead.',
{withoutStack: true},
]
: 'Component uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead.',
),
'Component uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead.',
]);
expect(container.firstChild.className).toBe('foo');
Expand Down

0 comments on commit 25b3193

Please sign in to comment.