An open API service indexing awesome lists of open source software.

https://github.com/pranabdas/planets

A React application for learning purpose.
https://github.com/pranabdas/planets

beginner learning learning-react react react-router reactjs tutorial

Last synced: 15 days ago
JSON representation

A React application for learning purpose.

Awesome Lists containing this project

README

          

# Planets
Explore the planets in our solar system. Visit the app at

### Initialize the project
```console
npx create-react-app planets
```

Remove all unnecessary files to begin with empty project.

### Add bootstrap
```console
npm install --save bootstrap reactstrap react-popper @popperjs/core
```

Add bootstrap css to `index.js`.

### Implement Navbar

Learn about reactstrap components here

### React component
Add planet images inside `public/assets/images` folder. Build `Planets`
component.

### React router

```console
npm i react-router-dom
```

### Deploy via GitHub Pages

```console
npm install --save-dev gh-pages
```

Add `"homepage": "."` and `"predeploy": "npm run build"` and
`"deploy": "gh-pages -d build"` script in `package.json`. Include a 404 redirect
to homepage because react router won't work for the static site. Currently
GitHub deploy is broken due to use of react-router (alternative would be to use
hash-router), however Netlify deploy working.

### Resources
-