Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Add global variable to help these components detect native app or web #13

Open
hieuhani opened this issue Jan 30, 2019 · 2 comments
Open
Labels
question Further information is requested

Comments

@hieuhani
Copy link
Contributor

Should we use (typeof window) ? 'web' : 'native'?

@hieuhani hieuhani changed the title Add global variable to detech native app or web Add global variable to help these components detect native app or web Jan 30, 2019
@dacsang97 dacsang97 added the question Further information is requested label Jan 30, 2019
@lednhatkhanh
Copy link
Contributor

We can try this API.

@hieuhani
Copy link
Contributor Author

https://github.com/necolas/react-native-web/blob/8ce5750d3437d1caa3d74a74a3625c70c54b66ab/packages/react-native-web/src/exports/Platform/index.js#L12

They just set the OS to 'web'.
Our main purpose is creating a UI kit that works on both web and native app without configuration

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants