elemental-design / react-platform

Experimental cross-platform React Native interoperability APIs, component wrappers and polyfills.
MIT License
17 stars 0 forks source link

What is a React Platform? #10

Open macintoshhelper opened 4 years ago

macintoshhelper commented 4 years ago

[WIP umbrella issue for discussion/ideas, to help surface proposals]

What counts as a React platform?

Is using react-reconciler enough to count as a platform? Or does react-test-renderer count, for the case of react-sketchapp?

Will Metro be an explicit requirement, or will Webpack/ be supported as entrypoint bundlers?

How should imports work?

Proposal

Standardise platform-specific imports around react-native-ios, react-native-windows, or @react-native/ios.

Support react-native as a common API surface across platforms, or have react-platform/react-primitives as a common API layer that maps to react-native-windows, etc. Or have react-primitives for react-reconciler platforms that don't have the full Metro/Fabric setup (e.g. react-primitives View import aliases to react-native-<platform> <View>, and react-native for those that do.