I have a react native app in which i am using react-native-maps.I want to send the current location to firebase like it’s been done on this article using socketIO https://medium.com/#joycecyoj01/how-to-build-a-location-sharing-feature-using-react-native-and-socket-io-496413ee8065. Also i want to alert all users when one user has passed 100 meter from the current location. How can i do that?
I’d like to know if anyone have come across an article that describes something similar in the article using firebase
Related
Ok... I am so confused. I am new to React Native and I have created a simple mobile app that shows a list of news (containing a specific image, title, and description). I have a lot of experience with programming most of which comes from game development. I have created many games and I am familiar to cloud storage systems that you update and retrieve data.
Right now I just have a local json file with an array of 'news' Objects and then I loop through this array to show the news posts. Basically, I want to move this json file to somewhere online where the app just retrieves it. This would make it so that the News json file could be edited in order to change, add or remove new news. So, I don't need account or anything. I don't even need to be able to set/update data from the app. I just need a place to store images and files that can be retrieved from the app.
I have tried using the common react native data base systems like sqlite, realm, mongodb, and firebase, but must not understand how they work because they make no sense. Also, it seems like when making a mobile app all of these services require you to setup a backend and start a server, which from what I can tell doesn't work on mobile... It seems logical that there would be a global data base that I could store storage on and just receive it by a simple fetch or network call. Am I totally crazy here ?:) Any help or guidance is super appreciated. Thanks.
I have a Django Rest Framework application that is fed in data from a csv. I then use React to create dashboards and Widgets from that data. I want to be able to generate a link to share a read-only version of any dashboard, much like in Google docs etc. Anyone clicking on that link will be able to see the dashboard with all the charts and analytics etc. The link can be shared much like how you share a Google Forms link. I'm not sure how to go about doing that. Any help / pointers would be appreciated. Thank you!
I think theoretically you need to use a router on your react app (e.g. https://reactrouter.com/ ).
If you're using create-react-app, you can also refer to https://create-react-app.dev/docs/adding-a-router/#:~:text=Create%20React%20App%20doesn't,is%20the%20most%20popular%20one.) .
With this you can directly read parameters on a certain page within your react app, that you can then use to build a concrete call to the backend, to retrieve the necessary data to build your dashboard.
The 'link builder' functionality most likely needs to be implemented on the backend, so you can have the necessary parameters you need to gather the necessary data, maybe by using query strings.
If you want to make it more complex, you would need to implement on the backend a kind of tokenized access, that could store the full call parameters on the backend side, and associate them with a token of some kind, that you could then provide to your clients.
e.g. : http://djangoappxpto.com/link/12345abcd points to a react page component that then executes a fetch to http://djangoappxpto.com/api/getStats/12345abcd which once received by python would internally mean something like http://djangoappxpto.com/api/generateStatsReport/?param1=a¶m2=b¶m3=w¶m4=aa .
I have an app idea which I want to create a working product of. I do have a working demo with React Native and I'm using Firebase for storing documents and images. Creating documents and uploading images to Firebase Storage is all done in the app, but this is just for demo purposes. In reality you would of course want to use an API for storing all that data. At least, I thought so. All I see on the internet is people using Firebase directly in their app. Is this the correct way of doing it? I always learned you should use a backend, for example a REST API for safely handling data.
Is it safe and secure to 'just' use React Native? I want to handle payments in my app, so I really want it to be done securely.
So what's an example of a stack I could use?
Currently using React Native and Firebase. But for safety I'd imagine something like
React Native - frontend
Node Express Server - backend
Firebase - database
I hope someone can give me a little push in the right direction.
I want to create a marketplace app which displays a different user flow (UI UX) when a customer or seller logs in. How can i achieve this with React Native?
Is this classed as a multi tenant app?
As an absolute beginner, i would appreciate some advice and possibly links to documentation on how to set up the structure using Visual Studio Code. Thanks.
Create a different set of routes for both seller and customer via route authorization.
You can use state management such as mobx or redux,set seller or customer on launch,so every screen or component can request at any time if wether a seller or customer then render the right things
As someone mentioned, redux or different routes after authorization might be what you want. But it sounds like you may have bigger picture issues/questions. The front end could certainly be written in react native, but you need a back-end where the data will live and users will be authorized. If you don't want to write that yourself, you might consider Firebase, as its easy to use and free up to a certain usage level.
Firebase handles authorization easily; then when people are creating accounts, have them specify if they're sellers, etc, and save that to user profiles. When they log in, use the data in their user profile to direct them to different react navigation stacks or just different themes or whatever your needs are.
I'm pretty new to react and building out a little prototype using Firebase as a backend. One of the primary functionalities involves a user writing a post in an editor, which is saved to firebase. On submit in the editor, I am trying to create a new standalone page for the post with the firebase uid as the ending part of the new unique URL.
The problem I'm having is figuring out a way to create the new page on submit. I haven't been able to find any documentation for a similar problem like this specific to react or firebase, and was just wondering on a high-level what a good approach to executing this might be? Thanks
The newly launched Firebase Hosting + Cloud Functions integration can help here. The first bullet point in the documentation looks like it describes your use case exactly.
You also mentioned React. There is a handy sample project showing how to implement an isomorphic React app with Firebase.