简体   繁体   中英

React Native and Spring Boot

I am working on an application that has a desktop view and a mobile view for the front end to my Spring Boot application. The desktop view is a react app and the mobile version is a react native app.

I embedded the desktop app into Thymeleaf to load the application. I understand how that works. I'm now having issues on how that relates to the React Native application. So the plan is to load the application onto some select Android devices. I am not familiar with how this would work.

My question is, when the React Native app is loaded on the phones, do they need to be connected to the server or does it just make calls to the Spring Boot app. If it's the former, would I have to embed it similarly to the React desktop view in my Spring Boot application. If it's the latter does it just get loaded to the phone, and when each button is hit or when it's loaded initially does it just make it's normal calls to my APIs in the server?

Any help or links to helpful information would be greatly appreciated. Let me know if you need anymore information.

Well, about your question, react and react native are client applications, both work on the navigator or cellphone and can work without any internet connection, it depends on the implementation that the web or mobile application have.

Server call is needed in the case of React first time, after that the resources are cached in the navigator and will be used by the navigator to render the web page.

You only need calls to the Rest API about your business logic.

Read more about this:

https://reactjs.org/tutorial/tutorial.html

https://facebook.github.io/react-native/docs/tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM