Giter Site home page Giter Site logo

frontend-workshop's Introduction

React + Vite Project

Clone this repo and run the following commands in your terminal:

  1. cd Frontend -> To reach into the destination folder where our frontend code is.
  2. npm install -> This will install all the necessary dependencies for running a react project using npm (Node Package Manager).
  3. npm run dev -> To run the project you can use this.

There are several things that are in this repo (for educational purpose only) :

  1. Components: We can call these components in any page where we want to apply that particular element. There are several components in this project. navbar.jsx // Navigation Bar footer.jsx // Footer button.jsx // Button

  2. Hooks:

a) UseState -> to store data from our webpage, which returns array , one saves the data and other one is used to display data

          const [data, setData] = usestate({
           name: "",
           email: "",
          });
            Here setdata will set the data into the state and data will return the data that is stored into that objects.

b) UseEffect -> action which connects the component to the outside world. Mostly used to fetch data when the page is loading.

     useEffect(() => {
  const fetchData = async () => {
    try {
      const response = await axios.get("https://jsonplaceholder.typicode.com/users");
      console.log(response.data);
      setUserData(response.data);
    } catch (error) {
      console.error("Error fetching data:", error);
    }
  };

  fetchData();
}, []);

frontend-workshop's People

Contributors

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