Skip to content

alexw005/simple-react-tsx-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Create React App

If you're looking for a powerful and flexible platform to host your static website, you might want to consider combining React, TypeScript, and Firebase. With these tools, you can create a dynamic and responsive website, while still enjoying the benefits of free static web hosting.

React is a popular JavaScript library that is widely used for building dynamic user interfaces. It is highly modular and allows you to easily create reusable components. TypeScript is a superset of JavaScript that adds type checking and other features to help you write more robust code. Firebase is a cloud-based platform that provides a range of services, including free static web hosting.

Here are the steps to get started with React, TypeScript, and Firebase for free static web hosting:

Install Node.js and create a new React project. First, you'll need to install Node.js on your machine if you haven't already. Then, you can create a new React project by running the following command:

npx create-react-app my-app --template typescript

This will create a new React project with TypeScript support.

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Add Firebase to your project.

Next, you'll need to create a Firebase account and add Firebase to your project. You can follow the official Firebase documentation for instructions on how to do this.

Once you've added Firebase to your project, you'll need to configure your Firebase app to use free static web hosting. This can be done by following the instructions in the Firebase documentation.

How to upload to Firebase static web hosting

You may follow these steps for hosting your own static web, however, the website URL is not pretty.

1. go to Firebase console to create a new project

2. npm i -g firebase-tools

3. firebase login

4. firebase init

5. Configure with firebase init, you may follow the Medium.com

6. firebase deploy

And that's it! You now have a powerful and flexible platform for hosting your static website, all for free. With React, TypeScript, and Firebase, you can create a dynamic and responsive website that is easy to maintain and update.

About

Privacy policy simple react typescript boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published