Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is a React Platform? #10

Open
macintoshhelper opened this issue May 18, 2020 · 0 comments
Open

What is a React Platform? #10

macintoshhelper opened this issue May 18, 2020 · 0 comments

Comments

@macintoshhelper
Copy link
Member

macintoshhelper commented May 18, 2020

[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?

  • Some runtime environments may be in sandboxes where running bundlers like Metro aren't appropriate, such as in design software plugins, where file extensions are nice as a universally accepted standard across bundlers, especially with Babel extension preferences.
  • Should file extensions remain a stable/supported default for out-of-tree platforms?

How should imports work?

  • Is import { ... } from 'react-native'; a safe pattern for out-of-tree platforms?
  • How can we make sure that props are types without tsconfig hacks?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant