Skip to content

Creation of components for reuse and modularization of web pages using react library with typescript.

Notifications You must be signed in to change notification settings

armandomzn/react_components

Repository files navigation

React Components Showcase

Creation of reusable React components for the modularization of web pages using React and TypeScript. This repository features a collection of reusable web development components that demonstrate various techniques and concepts in React, providing modular solutions for common UI elements and interactions.

Projects

cards A project to display cards with dynamic content, utilizing the useEffect and useState hooks.

reviews A project to display random reviews, including images, names, and text, with navigation functionality using useState.

navbar A responsive navigation bar that adjusts dynamically based on screen size, implemented with useState, useEffect, and useRef.

sidebar-modal-1 An interactive sidebar with modal functionality for displaying additional content, using Context API for state management.

modal A simple modal project that opens and displays content dynamically, built using useState hook.

accordion An accordion project that opens only one element at a time, demonstrating state management with React.

7. Menu

menu A menu project that filters and displays items from a dataset, utilizing the useState hook for state management.

8. Tabs

tabs A dynamic tab project that updates the displayed content based on the selected tab index, using useState.

slider A sliding project that dynamically updates the content, powered by useState and useEffect hooks.

lorem-ipsum A dynamic Lorem Ipsum text generator using useState for input states and text generation.

color-generator A color generator that outputs random colors in RGB and HEX formats, implemented with useState and useEffect.

task-manager A simple task manager that stores tasks in the browser's localStorage, utilizing useState.

cart A cart example using Context API and a reducer to manage state for adding and removing items.

pexels A gallery project fetching images from the Pexels API, utilizing React Query for data fetching and caching.

cocktail-api An app that fetches cocktail recipes from an API, using React Router Dom for navigation and React Query for data fetching.

tailwind-portfolio A portfolio project showcasing Tailwind CSS and React for styling and layout.

strapi_menu-1 A dynamic menu fetching data from Strapi, using useState, useRef, and Context API for state management.

cart_redux_toolkit_1 cart_redux_toolkit_2 A cart management system using Redux Toolkit, allowing users to add, remove, and update cart items with a global state.


Installation and Setup

Each project in this repository has its own README.md file with specific installation and usage instructions. However, below are the general steps to clone, install, and run any of the projects local.

Clone the Repository

git clone https://github.com/armandomzn/react_components.git

Install Dependencies

Navigate to the specific project folder and install dependencies:

cd project-folder-name
npm install 

Run the Project

Start the development server:

npm run dev 

This will launch the project on http://localhost:5173/ or the designated port.

Build the Project

To create an optimized production build:

npm run build

The build files will be available in the build directory.


Key Concepts Across Projects

  • Redux Toolkit: The Redux Toolkit Cart project demonstrates efficient global state management in React using Redux Toolkit.
  • Component Reusability: The main focus is to create modular components that can be reused across different projects.
  • State Management: Components use React's useState, useEffect, useContext, useReducer, and Redux Toolkit for managing state.
  • API Integration: Several components fetch data from external APIs, such as the Cocktails API, Pexels API, and Strapi.
  • Responsive Design: Many components are responsive, utilizing Tailwind CSS for styling and layout.
  • React Query: Used for data fetching and caching, such as in the Pexels API component.
  • React Router Dom: For navigation within the app, demonstrated in the Cocktails API project.
  • TypeScript: Each component is developed with TypeScript for enhanced developer experience and type safety. Each project includes its own detailed installation and usage instructions in its respective README.md file.

About

Creation of components for reuse and modularization of web pages using react library with typescript.

Topics

Resources

Stars

Watchers

Forks