Skip to content

Latest commit

 

History

History
81 lines (52 loc) · 9.79 KB

README.md

File metadata and controls

81 lines (52 loc) · 9.79 KB

image

Onix React

Welcome to Onix React, your esteemed community for ReactJS and React Native development. 🚀 Explore our extensive repository, where you will find a wealth of best practices and solutions to support your path to excellence. We invite you to join us on social media and participate in our ongoing discussions within the React and React Native development sphere. 🌟

Table of Contents

Repositorie Structure

This is a versatile repository for web developers, featuring CORS handling, React Hooks, Axios examples, Code Splitting, Layout Animation, Redux, i18next and more.

In the "Hooks" section, you'll find various React Hooks implementations and examples. React Hooks are a powerful way to manage state and side effects in functional components, making it easier to write reusable and maintainable code.

Explore the Hooks examples:

  • IntroducingHooks: Examples showcasing React hooks for state and side effects in functional components.
  • useEventListener: This folder includes custom hook examples that enable you to add event listeners to DOM elements in a React component.
  • useForm: In this folder, you'll find examples that demonstrate how to efficiently and effectively handle forms in your React application.
  • useHotkeys: The "useHotkeys" folder contains examples of custom hooks that allow you to define and manage keyboard shortcuts or hotkeys in your React application.
  • useId: The "useId" folder provides examples on how to generate unique identifiers that can be associated with form elements.
  • useTimeout: In the useTimeout folder, you'll find examples of custom hooks that provide a way to set and manage timeouts in a React component.
  • useWindowSize: This folder manages window dimensions in React. One file displays dimensions, the other tracks size changes using React hooks.
  • useIntersectionObserver: The folder contains a React hook, useIntersectionObserver, that uses the Intersection Observer API to monitor the visibility of a designated DOM element within a React component.
  • useCopyToClipboard: In this folder, we can see the useCopyToClipboard hook, which manages clipboard operations, making it easy to copy text within a React application.
  • useDebounce: This folder includes two files, demonstrating the use of the useDebounce hook in a React component for handling debounced user input.

Explore design patterns for structuring your code. This section of the directory with basic examples offers guidance on how to organize your codebase and apply architecture patterns.

Explore the Patterns examples:

  • Constructor Pattern: This folder focuses on the constructor pattern, a design pattern for creating objects.
  • Factory Pattern: This folder centered around the factory pattern, which is related to implementing and demonstrating the factory pattern.
  • Module Pattern: Relates to the module pattern, a design pattern for creating encapsulated modules.
  • Observer Pattern: This folder pertains to the observer pattern, a design pattern for managing one-to-many relationships between objects.
  • Prototype Pattern: Deals with the prototype pattern, a design pattern for object creation through copying.
  • Singleton Pattern: This folder includes the singleton pattern, a design pattern ensuring a single instance of a class.

This repository includes code and configurations related to CORS, which is a crucial web security feature that allows or restricts cross-origin HTTP requests in web applications.

Explore the CORS examples:

  • next.js: This subfolder contains code related to server-side operations using Next.js with Express.js, a popular Node.js framework.

  • react.js: This folder is dedicated to client-side development with React.js. The code within this folder is focused on creating and managing components in a React application.

This folder provides a collection of code examples and snippets covering a wide range of topics, including Axios for making HTTP requests, Code Splitting for optimizing your application's load time, Animations for UI enrich interactions, Redux for state management, i18next for internationalization,react-virtualized and more.

  • Axios: These examples provide practical demonstrations of using Axios, a popular HTTP client library, for making network requests in JavaScript applications. They cover various aspects of request handling, including asynchronous requests, interceptors, instance creation, and Promise-based response handling.

  • Code Splitting: These examples demonstrate how to split your application's code into smaller, more manageable parts, which are loaded only when needed. This is an effective technique for optimizing performance and user experience in React applications, especially for large or complex projects.

  • Lazy Loading: These examples demonstrate how to implement lazy loading and handle loading and error states effectively in a React application.

  • Animations: This folder contains examples of animations for both CSS and React Native. It covers general animations using the Animated API and layout-specific animations using LayoutAnimation in React Native applications.

  • Navigation: These code examples illustrate how to set up navigation in a React Native application using the @react-navigation/native library.

  • Redux: The code examples provided to be related to managing application state using Redux, Redux Toolkit, and Redux Toolkit Query. Each approach offers different ways to manage and organize state in a Redux-based application.

  • createContext: this folder and its contents demonstrate how to create and use React context to manage and share application-wide states, such as themes and user data, among different components.

  • i18next: This folder and its contents provide an example of how to implement internationalization (i18n) in a React application using the i18next library.

  • React Virtualized: This folder houses a React app featuring data generation for a list of 5000 items, rendered efficiently using the react-virtualized List component. Styling in src/App.css enhances the visual presentation

  • yup: These code examples include code related to form validation using the Yup schema validation library in a React application. The provided code example sets up form validation with Yup and handles form submissions.

  • Error Trackings: In this directory, you'll find code examples related to error tracking and application state management using error boundaries and the Sentry/Rollbar tools. These examples showcase different strategies for organizing error tracking and managing application state.