如何在 react native app 中使用 react j 的组件? [英] How to use react j s components in react native app?

查看:45
本文介绍了如何在 react native app 中使用 react j 的组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 react native app 中使用所有 reactjs 组件?如果没有,在 react js 和 react native 之间切换的最佳方法是什么?

Is it possible to use all the reactjs components in react native app?If no,what is the best way to switch between react js and react native?

如果应用程序是使用 react js 完成的,是否有必要(强制)在其中使用 redux?

If an app is done using react js is it necessary(Compulsory) to use redux in that?

推荐答案

主要有两点:

1.React (DOM) 和 React Native 中的基础 UI 组件不同.

1.The base UI components in React (DOM) and React Native are different.

2.React 和 React Native 中的‘React’对象是不同的(React Native 去掉了 DOM-specific 的东西,增加了很多 native-specific 的代码).

2.The ‘React’ objects in React and React Native are different (React Native removes the DOM-specific stuff adds a lot of native-specific code).

请查看此链接了解更多详情:

please check this link for more details:

https://medium.com/@aakashns/sharing-components-between-react-and-react-native-f6ce3713658a#.oa4my8p36

这篇关于如何在 react native app 中使用 react j 的组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆