React Web App to React Native - reactjs

I currently have a web app/api built using React, Node, Mongo & Express. I would also like to develop a react native clien that shares an API. Does having an existing react web client make the react-native mobile development any easier? My biggest concern is authentication & authorization. Can you recommend any tutorials, frameworks, packages that could make it easier? As you can tell.. I am very new to development.

You can utilize the same backend that you use for your Web app, in React-Native.
You can even use the same packages like Axios or superagent.
React-Native's built in one is called Fetch().
You are simply pinging your RESTful backend from a different device.
React-Native code is not at all a one for one with React Code. They are very different and only follow the same architecture Design Principals.
This question has been asked many times.

Related

Building a desktop admin panel for react native app

I am building a react native app with firebase auth and cloud storage, and I was just wondering if it is possible to make a dashboard for desktops to administrate the users/app? And if it does, how do I do this? Is it in the same build, or do I have to build a new "app" for adminpanel/dashboard?
This is my first time building the adminpanel/backend xD
While it's possible to build web apps with React Native, I wouldn't recommend it. The Layout of a desktop is just way too different from phones to build React Native Apps including web without constantly using Platform.OS. In your question, you even mention that you wan't the dashboard to just be available on the desktop but not on the Phone (which makes sense in my opinion). Since you seem to know a bit about React Native, it should be an easy thing for you to build the Dashboard as a different Application with React for the web only.

The best way to connect Next.js CSR React app, Django and PostgreSQL

My question concerns programming a full-stack app.
On the frontend, I have a Next.js React app. I want to render it on the client-side and probably use SWR. On the backend, I have a Django app with a PostgreSQL database.
I have seen two approaches to make all of these work together.
The first one is to use Django to serve Next.js React app with django-webpack-loader and then to load React app within Django template.
The second one is to build two separate apps - frontend (Next.js) and backend (Django + PostgreSQL) and deploying them on two servers (e.g. Docker container).
I have read this article and it makes me lean towards the second option. However, it is a pretty old solution and maybe some things have changed since then.
What is the most optimal solution when it comes to connecting Next.js React Client-side rendered, Django and PostgreSQL?
Opinions may differ, but based on reading and personal experience, I consider using separate Next.js and Django apps to be preferable. This (1) helps with separation of concerns, (2) helps avoid making Django or Next.js do anything that their designers did not anticipate, and (3) is simple with Docker.
Here's an example project that uses docker-compose to manage services including a Next.js frontend, Django backend, and Postgres database: https://github.com/ModularHistory/modularhistory

Need to Deploy Laravel + Reactjs (SEO friendly ) application

I have to create an application where users will have their unique usernames and profiles like "website.com/JohnDoe". for that the client asked me to develop it in any good PHP framework and client also need an android/ios app (which he disclosed after 2nd meeting) . so I was(before 2nd meeting) going to use Laravel totally. but since he said he wanted a mobile app too, so I decided to use Laravel as backend API, for Web frontend I will use Reactjs and for Mobile I would use ReactNative ( I've done same before). since Laravel provides react support so my I was planning to use React within the laravel.
Then client said he is more concern about SEO of his website. so I had two options
Use laravel as API provider only. and create ReactJS app totally separate from Laravel.
In this case I will need Nodejs server. Then I thought If I have a nodejs server than why would I go for laravel, I could use Express.
Use ReactJS within laravel and use any SSR package to cope with ssr.
If I am going for second option, can anyone point me to already live website which uses React Helmet SSR or Laravel-react-ssr?
Laravel react-ssr: https://github.com/spatie/laravel-server-side-rendering
React Helmet-ssr: https://github.com/nfl/react-helmet#server-usage
I have read both, and I am too confused. I am beginner in both Laravel and React(node) so I am unable to understand what both are proposing.
i deployed your 2 option mentioned let me give you the site https://v3.topviewnyc.com/, i created a microservice which would take care of SSR besides my hooks and components are build on react so am totally able of enjoy the SPA frontend side with react using components and get data via laravels API

How do you add server side functionality to an already created react app?

I've already built a create react app. I'm currently learning back-end development, and I was wondering how do I separated the scripts that are to run from the server from the scripts that run from the client? My app is currently deployed on heroku.
React js is a UI toolkit and does not have the ability to do server-side processing. If you want to add back-end functionality to your react app, you can build it separately in form of a REST API. (You can use nodejs, python, java etc. whichever suits your application)
You have to make API calls from your react app to receive and send data from front-end to back-end and vice versa.

Migrate React web app to Electron

We are considering development of a web app using ReactJS (probably, we will use npm's create-react-app feature). Also, we are thinking if it will be possible in future to easily transform the web app to a desktop application using Electron. Since we have no experience with both technologies, we like to ask about this combination, whether it is a good option, and if it is possible to turn a React web app into a desktop Electron-powered app.
I was googling any working tutorial how to build an app using both technologies but no one worked for me.
So, to sum up, is it good choice to start developing a web app with React when we would like to have the opportunity to transform it into a desktop application built with Electron? If not, are there any better technologies?
You should look into how exactly your solutions are built, instead of focusing on the technology itself. If your team builds your backend with this in mind, you can create APIs that your clients(React Web App, Electron Desktop App) can connect to.
To answer the question: No, it is not a good choice to begin development of your web app project without considering future implications of your design. Focus your time on how your backend talks to your front end.
Moreover, ReactJS is only a front end library, you can use it with Electron, Check out some GitHub Hug Repos like: Re-Electron , React-Electron-Starter, Electron-React

Resources