Skip to content

Commit

Permalink
Add basic JS implementation support for react-native-windows πŸŽ‰ (#4917)
Browse files Browse the repository at this point in the history
## Summary

This pull request introduces support for react-native-windows! πŸŽ‰
However, please note that it does not include native support. Instead,
it enables the web implementation of Reanimated for the Windows
platform.

Kudos to [@hsjoberg](https://github.com/hsjoberg) because his PR
[#4669](#4669)
was an inspiration for this one! πŸ™Œ

## Test plan

```
npx react-native init reanimatedWindows --version "latest"
cd reanimatedWindows
npx react-native-windows-init --overwrite
yarn add react-native-reanimated
npx react-native run-windows
```
  • Loading branch information
piaskowyk committed Aug 11, 2023
1 parent 9c7e7ae commit f55e831
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/reanimated2/PlatformChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ export function isAndroid(): boolean {
return Platform.OS === 'android';
}

function isWindows(): boolean {
return Platform.OS === 'windows';
}

export function shouldBeUseWeb() {
return isJest() || isChromeDebugger() || isWeb();
return isJest() || isChromeDebugger() || isWeb() || isWindows();
}

export function nativeShouldBeMock() {
return isJest() || isChromeDebugger();
return isJest() || isChromeDebugger() || isWindows();
}

0 comments on commit f55e831

Please sign in to comment.