how to deploy a site if you have a domain - reactjs

I have a portfolio website built using React .I already know what to do if I want to deploy using github pages or other sites like Netlify I am wondering what I am supposed to do if I have my own domain so I can deploy to Netlify

This is a complex issue. Try digging into git based deployments. I can see that Netlify supports this but maybe their docs ain't the best explanation for starters.
Maybe this YouTube video explains it better but that's just my random find.

Yes you can you just have to add your own custom domain while you deploying your app using Netlify
I have find this website to explain how you can:
https://levelup.gitconnected.com/how-to-host-domain-to-netlify-site-for-free-step-by-step-guide-45d0c2102db3?gi=bacd2d1b29c3

Related

how to connect react project to wordpress? to edit pages and collect data forms from website on wordpress

got my react website ready to deploy, decided to choose wordpress as backend supporter and can't find any proper tutorials or documentations how to connect frameworks between each other.
is there any tutors or maybe solution how to connect this thing with each other?
you should use a Headless CMS instead. I use SRAPI, it's a good one and you can easily find a lot of tutorials about it

Is it safe and optimized to use static pre-rendered react app in production

I know you may find this question idea based, but as I'm newbie to react, I haven't had other places to ask.
I have created a single page react app using create-react-app and exported production version into build directory using the command npm run build.
Due to SEO friendly problems that react apps have, I decided to go with react-snapshot and react-snap but the first one is too old and deprecated and the second one has too many issues in its GitHub repo.
I should mention that I know about NextJs, Gatsby, Cloud pre-rendering and other ways. But I want to deploy my app to a serverless cloud like Vercel.
I wonder what happens if I render the production version in my browser (Lets say Chrome) and export rendered html, js and css into a single static HTML file? Remember that my app is made of several components, but the URL won't change because the whole app is in a single path/route.
I guess there would be some problems in different browsers!
I have found that it is possible to host a NextJs application on vercel. Besides, I went for vps.
Anyway, for future readers, I guess the best decision in my case was NextJs, which is very fast and light in production.
Note: If you find this Q&A useless, just let me know in the comments so I'll delete it.

How to add a Docusaurus website within Next.js Website as a route

Does anyone have any pointers on how to go about adding a /docs page for website documentation to a next.js app? I've looked up Docusaurus but it seems like it's already a react app itself. Is there a way to integrate it inside an existing next.js app or are there other solutions?
Many Thanks
One idea might be to intercept the request and send the html file that docusaurus builds out, and putting all other files in the public folder.
https://medium.com/wesionary-team/render-html-file-in-pages-of-next-js-59281c46c05
Also checkout this discussion about it.
https://github.com/vercel/next.js/discussions/12373
I have done this with React apps using express. But never with Next. At first it looks like it would be possible with multi-zone in Next but that doesn't seem to do the job. So my other recommendation would be to try to use a docs.domain.com instead and host it separately. Then you have a /docs url or a button that redirects to the doc domain instead.
Firebase has free hosting and allows you to setup multiple sites. So it should be fast to test this setup there
I'm going to actively try to get this to work with Next myself but I do not think it will work because of how they are developed. So I would do the above recommendation and if I find a workaround, I'll post an update.

Can I use React for my UI on a Wordpress project?

I have been playing with wordpress lately and I managed to deploy a simple page via a web hosting company (whc) with a domain name and everything. I love working with React and I am looking to understand how it would work in order to use WordPress with React. I played a bit with the ReactPress plugin and went through some ressources online but I am still unsuccesfull. From my understanding they are two main ways to do such a thing and I think I am mixing them up. I was wondering if there is a clear way to do so. Any info will be very welcome
There's a React framework for WordPress. You may check that.
https://frontity.org/ have a look

Integrating Angular CLI with Squarespace

I am interested to know if anyone has been able to successfully use Angular CLI in a Squarespace site.
I have been searching for answers to this problem but can't find a solution. I know that you can add custom scripts to a Squarespace site and/or add scripts via CDN but Angular CLI apps are usually deployed using a different method.
Any help is appreciated. Thanks!
NOTE: I know that this is not a best practice and devs should deploy their Angular CLI app via AWS or with a similar platform.
I'm surprised no one has answered this. Yes, there's no reason why you couldn't use AngularJS or any other Javascript library with Squarespace. You'll need a 'Business' level account, however, and you'll want to check out the developer portal here:
https://developers.squarespace.com
Squarespace provides you with a Git repository and a CLI that you can download via NPM that will let you run a local squarespace server and develop your site from scratch or with a base template.
You can check out their docs on 3rd party avascript (e.g. Angular) here:
https://developers.squarespace.com/custom-javascript/
Since your question is specifically about using the CLI, I would just note whatever your final 'production' bundle looks like and include that in your git repository, so that you can reference it in your main html page.

Resources