Giter Site home page Giter Site logo

coc_diwali's Introduction

COC Diwali Single Page Application

Made on React JS

WISH YOU ALL A VERY HAPPY DIWALI

# To run the Repo on localhost
npm run start

# To build repo files
npm run build

# Deploys directly to github pages (Redundant)
npm run deploy

NOTE: In webpack.config.js, change mode to development for faster changes in code, and change mode to production to build minified and optimized JS code

(P.S. Deployment is a pain in the butt, period. -_-)

What are Single Page Applications? (SPAs)

SPAs, to put it simply, are websites that can be loaded in a single go on your browser. It is like using an App on your mobile, where you need not download a new Acitivy/Page every time you click something. The app has already been loaded once. When you loaded this site, behind the scenes, both the Home page and the About page loaded together. So the browser does not need to load the pages again. Heck, you can now view this site offline as well!!!(as long as you keep the tab open ;p)

How does React work?

The React project consists of various 'Components'. Each component has it's own states and properties. The way React works is that based on these properties(props) and states, it renders a virtual DOM (Document Objec Model) which in term determines what should be shown on the real DOM.

What are these components?

Components can be anything from HTML elements like divs, headers, etc.. to custom wrapper components that control other components. For example, the website has 2 components, and are the two components. The component has another component called within it. There are a tonne of possibilities of components here. You can create components for individual tag if you want ;p

How does the routing work?

The History API enables Javscript to consider routes or pages as states, and you can change from one state to another. Basically it means I can manipulate the browser history to put in pages using Javscript rather than actually loading pages from the server. So I need not connect to the internet to open About page or Home page again since Javascript is loading those pages.

I still didn't get it. I want to know more. Where should I look?

You should definitely check out the React Tutorial. It has a great starter code and an amazing step by step tutorial to give you a clear understanding of the basic concepts.

Once you are comfortable with React, you can move onto React Routing. This is bit tricky to understand at first especially with JS examples rather than JSX on the site. Check out Advance JS Tutorial in case you don't understand stuff like arrow functions, or 'let', etc. Additional Resources if you feel quite confident, and want to explore more: Building React Project from Scratch(no create-react-app) Redux : State Management Libarary that goes hand in hand with React

coc_diwali's People

Contributors

ameyadaddikar 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.