kwikid-components-react
Version:
KwikID's Component Library in React
31 lines (20 loc) • 883 B
Markdown
# Shared Utilities
This directory contains shared utilities, hooks, and types that are used across multiple components.
## Directory Structure
- **hooks/**: Contains React hooks that can be reused across components
- **utils/**: Contains utility functions and helpers
- **types/**: Contains shared TypeScript types and interfaces
## Usage
Import shared utilities using the following pattern:
```typescript
// Import specific hooks
import { useFetch } from "../shared/hooks";
// Or import from the shared index
import { useFetch } from "../shared";
```
## Adding New Shared Utilities
When adding new shared utilities, please follow these guidelines:
1. Place the utility in the appropriate directory (hooks, utils, or types)
2. Export it from the directory's index.ts file
3. Add JSDoc comments to document the utility's purpose and usage
4. Update this README if necessary