Code Monkey home page Code Monkey logo

course-registration's Introduction

### **3 Project Features:** I have implemented three key features in my project: 1. **Viewing Course Overviews:** Users can view course details such as course name, credit hour, and price. 2. **Adding Courses to Bookmarks:** Users have the ability to select and add courses to their bookmarks based on their preferences. 3. **Reading Time Constraint:** An implemented constraint ensures that users cannot add more courses to their bookmarks if the total reading time exceeds 20 hours. ### **State Management in My Assignment Project:** In my project, I utilized the `useState` hook to manage two important pieces of state: 1. **`bookmarks` State:** - This state variable is responsible for tracking the courses that users have bookmarked. - It is initially set as an empty array `[]` using the `useState` hook: `const [bookmarks, setBookmarks] = useState([]);`. - When a user selects a course and adds it to their bookmarks, this state is updated by including the selected course in the `bookmarks` array. 2. **`readingTime` State:** - This state variable is used to calculate and display the total reading time of the selected courses. - It starts with an initial value of 0 using the `useState` hook: `const [readingTime, setReadingTime] = useState(0);`. - Whenever a user selects a course with a specific credit hour, this state is updated by adding the credit hour to the current `readingTime`. **State Management and User Interaction:** - State management plays a crucial role in my project, allowing for the maintenance and dynamic updating of data in response to user interactions. - Users can add courses from their bookmarks, and the reading time is updated accordingly, all driven by changes in the state variables. # course-registration

course-registration's People

Contributors

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