How do I know if my code is running as React Native

前端 未结 3 401
余生分开走
余生分开走 2021-01-02 01:10

I want to be able to export a package for all platforms, but I am using some native bindings with a plain JS fallback. Normally I would notice the difference checking if obj

3条回答
  •  伪装坚强ぢ
    2021-01-02 01:27

    crete two files: one called file.web.js, and other file.native.js, and import only the first name segment'./yourdirectories/file'

提交回复
热议问题