Modify warning message (#28514)
Summary:
Modify deprecation warning message for `AccessibilityInfo.fetch`
- https://reactnative.dev/docs/accessibilityinfo#isscreenreaderenabled
- 523ab83338
## Changelog
[Internal] [Changed] - Modify deprecation warning message for `AccessibilityInfo.fetch`
Pull Request resolved: https://github.com/facebook/react-native/pull/28514
Test Plan: Try using `AccessibilityInfo.fetch` and check log
Reviewed By: cpojer
Differential Revision: D20850223
Pulled By: TheSavior
fbshipit-source-id: e21bb20b7a02d9f2ed6e27e2bfecbac0aebf9e09
This commit is contained in:
Родитель
e2c417f7cf
Коммит
caa7829aac
|
@ -93,7 +93,7 @@ const AccessibilityInfo = {
|
|||
*/
|
||||
get fetch(): () => Promise<boolean> {
|
||||
console.warn(
|
||||
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
|
||||
'AccessibilityInfo.fetch is deprecated, call AccessibilityInfo.isScreenReaderEnabled instead',
|
||||
);
|
||||
return this.isScreenReaderEnabled;
|
||||
},
|
||||
|
|
|
@ -167,7 +167,7 @@ const AccessibilityInfo = {
|
|||
*/
|
||||
get fetch(): $FlowFixMe {
|
||||
console.warn(
|
||||
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
|
||||
'AccessibilityInfo.fetch is deprecated, call AccessibilityInfo.isScreenReaderEnabled instead',
|
||||
);
|
||||
return this.isScreenReaderEnabled;
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче