Skip to content

Commit 2b12718

Browse files
TMisiukiewiczokwasniewski
authored andcommitted
use warnOnce and add mark comments as TODOs
1 parent b235c18 commit 2b12718

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/react-native/Libraries/Components/TextInput/InputAccessoryView.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import StyleSheet, {
1313
type ViewStyleProp,
1414
} from '../../StyleSheet/StyleSheet';
1515
import Platform from '../../Utilities/Platform';
16+
import warnOnce from '../../Utilities/warnOnce';
1617
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
1718
import * as React from 'react';
1819

@@ -86,15 +87,18 @@ type Props = $ReadOnly<{|
8687
|}>;
8788

8889
class InputAccessoryView extends React.Component<Props> {
89-
// once the 'visionos' is implemented as a platform, we can remove this
90+
// TODO: once the 'visionos' is implemented as a platform, we can remove this
9091
componentDidMount() {
9192
if (Platform.isVisionOS) {
92-
console.warn('InputAccessoryView is not available on visionOS platform.');
93+
warnOnce(
94+
'component-unavailable',
95+
'InputAccessoryView is not available on visionOS platform.',
96+
);
9397
}
9498
}
9599

96100
render(): React.Node {
97-
// once the 'visionos' is implemented as a platform, we can remove this
101+
// TODO: once the 'visionos' is implemented as a platform, we can remove this
98102
if (Platform.isVisionOS) {
99103
return null;
100104
}

0 commit comments

Comments
 (0)