Code Monkey home page Code Monkey logo

react-admin-dashboard's Introduction

Getting Started with Create React App and SASS

This project was bootstrapped with Create React App and I have used SASS for styling.

Description and Instruction of this project

Here, I will write how I have completed this project:

npx create-react-app react-admin-dashboard

First of all, I need to set up my development environment with Create React App.

npm install sass

In this project I have used SASS for styling.

Deploy React App on Github Pages

It was an important part. I didn't know about React App Deployment on Github Pages. Now, I can deploy. For this I have just followed the instructions from this documentation. The steps are given below:

Step-1: open package.json file and add this:

         "homepage": "https://myusername.github.io/my-app",

Step-2: install github pages form your terminal:

         npm install -save gh-pages      

Step-3: add the following scripts in- scripts field in- package.json:

	     "predeploy": "npm run build", 
	     "deploy": "gh-pages -d build",   

Step-4: push all changes to git:

	    git add
	    git commit -m "your commit"
        git push 

Step-5: Now final command:

        npm run deploy

Notes: From my Grepper Account.

Then I used react router dom

npm install react-router-dom@6

After the installation of React Router as a dependency open the src/index.js. Then import BrowserRouter from react-router-dom and wrap the app in <BrowserRouter></BrowserRouter>. Then use this website to understanding routing React Router.

Routing Problem with Github Pages

Actually react router doesn't work in Github Pages. Then I found that if I want to make the routing work properly there are two way. The way one is, using hashRouter and the way two is to redirection with 404.html (this way is difficult than the first way). So, I used the hashRouter.

Just use <HashRouter> instead of <BrowserRouter> for wrapping the app.

Notes: Learn more about....

react-admin-dashboard's People

Contributors

ashiikkhan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.