Can react js web code be used for building mobile apps using react native?

后端 未结 2 760
情歌与酒
情歌与酒 2021-02-04 12:05

I am working on a pet project ( web application ) and I was wondering if I should use react because it would be easy to create native apps from this code (in future if I need to

2条回答
  •  清酒与你
    2021-02-04 12:43

    It's possible and viable. You must have a view for each platform (web/android/ios), because each one have your components..

    The business logic must be out of the view. Use flux can easy your project with native, because the it move the api interaction to a data layer, letting the view be just a view.

提交回复
热议问题