Skip to content

Commit

Permalink
Remove need for platform overrides to Settings (#38607)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #38607

Today, any host platform implementation of React Native must add Settings.platform.js.

- https://github.com/microsoft/react-native-windows/blob/0.71-stable/vnext/src/Libraries/Settings/Settings.windows.js

Now they don't have to do it anymore.

For this case, macOS actually wants to share the iOS specific logic > https://github.com/microsoft/react-native-macos/blob/main/Libraries/Settings/Settings.macos.js

Changelog:
[General] [Fixed] - [Settings] Remove need for platform overrides to Settings

Reviewed By: rozele

Differential Revision: D47747018

fbshipit-source-id: 8e4e8d318b3285a9a64e0b4f052f721f6242f871
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Jul 25, 2023
1 parent 800ea60 commit 3c15b68
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@

const Settings = {
get(key: string): mixed {
console.warn('Settings is not yet supported on Android');
console.warn('Settings is not yet supported on this platform.');
return null;
},

set(settings: Object) {
console.warn('Settings is not yet supported on Android');
console.warn('Settings is not yet supported on this platform.');
},

watchKeys(keys: string | Array<string>, callback: Function): number {
console.warn('Settings is not yet supported on Android');
console.warn('Settings is not yet supported on this platform.');
return -1;
},

clearWatch(watchId: number) {
console.warn('Settings is not yet supported on Android');
console.warn('Settings is not yet supported on this platform.');
},
};

Expand Down

0 comments on commit 3c15b68

Please sign in to comment.