Standardize platform specific code #1523
karol-bisztyga
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hello. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For now, we have some platform-specific code in our codebase. The problem is it occurs wherever it's needed in different places. Some examples:
Checks in files:
https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/core.js#L97
https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/Colors.js#L578
https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/Hooks.js#L45
Platform specific files:
https://github.com/software-mansion/react-native-reanimated/tree/master/src/reanimated2/platform-specific
https://github.com/software-mansion/react-native-reanimated/tree/master/src/reanimated2 - NativeReanimated
I think it would be good to put all of those in one file/directory plus explicitly and clearly distinguish certain versions of code for every platform.
If we want to support more platforms in the future it will be also easier to implement.
Beta Was this translation helpful? Give feedback.
All reactions