Is it possible to dynamically create components in React Native?

后端 未结 5 478
萌比男神i
萌比男神i 2021-02-04 06:40

Is it possible to dynamically create and add view components in React Native? For example, firstly I have only empty screen and information of all views come from server in JSO

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 07:19

    One of the benefits of using react native (vs webview) is that your users won't be staring at empty screens when the app is loading data. If you return all views from server, then it works like web page. I have done something like that before. Believe me that's not the best UX. Ideally json response should only return data. Then client can be built with any framework (react native, iOS or Android native) and they share the same API endpoints.

提交回复
热议问题