Releases: smartlabsAT/react-resize-detector-context
v0.2.4
Code Quality & Logging Improvements 🧹
This release focuses on eliminating code quality violations and implementing proper logging infrastructure.
🚀 New Features
- Logger Utility: Added comprehensive logging system with TypeScript interfaces
- Environment-aware Logging: Respects NODE_ENV for production vs development behavior
- Structured Logging: Support for structured data objects instead of string concatenation
🔧 Fixed
- Console Violations: Eliminated all direct
console.log/error/warnusage - Code Quality: Replaced string concatenation with structured data logging
- Production Logging: Only error-level logs output in production environment
📦 Logger Features
- TypeScript Interface: Fully typed logger with debug/info/warn/error levels
- Context-aware: All logs include BreakpointProvider context prefix
- Structured Data: Better debugging with meaningful data objects
- Performance: Reduced logging overhead in production builds
🧹 Code Quality
- CLAUDE.md Compliance: Eliminates all console usage violations
- Better Error Messages: Structured data with context instead of concatenated strings
- Maintainable Logging: Centralized logging logic with consistent formatting
- 100% Test Coverage: Comprehensive logger tests across all environments
📊 Examples
Before:
console.error('❌ BreakpointProvider: Duplicate breakpoint values detected...');After:
logger.error('Duplicate breakpoint values detected', {
duplicates: duplicates.map(([key, value]) => ({ key, value })),
message: 'This may lead to unexpected behavior'
});Full Changelog: v0.2.3...v0.2.4
What's Changed
- Replace direct console usage with proper logging system by @smartlabsAT in #7
Full Changelog: v0.2.3...v0.2.4
v0.2.3
Performance Improvements 🚀
This release focuses on performance optimizations and code quality improvements.
🔧 Fixed
- Performance: Optimized duplicate breakpoint detection from O(n²) to O(n) complexity using Set-based algorithm
- Bug Fix: Fixed missing
shouldLogdependency in useEffect to prevent stale closures
⚡ Performance Impact
- Significantly better performance when using larger breakpoint configurations
- Reduced computational overhead in duplicate detection logic
🧹 Code Quality
- Improved algorithmic efficiency while maintaining existing functionality
- Better dependency management in React hooks
- All existing tests continue to pass
Full Changelog: v0.2.2...v0.2.3
What's Changed
- fix: remove npm publish from release workflow by @smartlabsAT in #3
- Optimize duplicate breakpoint detection and fix useEffect dependencies by @smartlabsAT in #6
Full Changelog: v0.2.2...v0.2.3
v0.2.2
What's Changed
🔧 Infrastructure
- Fixed release workflow by updating pnpm version from 8 to 9
- Ensures automated releases work correctly going forward
📝 Note
This is a patch release to fix the CI/CD pipeline. No functional changes to the library.
Full Changelog: v0.2.1...v0.2.2
v0.2.1
What's Changed
🐛 Bug Fixes
- Fixed CI workflow issues preventing successful builds
- Corrected @emotion/styled version reference
📦 Dependencies
- Updated react-resize-detector from 12.0.2 to 12.1.0
- Updated @eslint/js from 9.31.0 to 9.33.0
- Updated eslint from 9.31.0 to 9.33.0
- Updated typescript-eslint from 8.36.0 to 8.40.0
- Updated @testing-library/react from 16.1.0 to 16.3.0
- Updated Storybook packages from 8.4.7 to 8.6.14
- Updated prettier from 3.5.0 to 3.6.2
- Updated eslint-plugin-react from 7.37.4 to 7.37.5
🔧 Improvements
- Added typecheck script for better TypeScript validation
- Updated pnpm version in CI from 8 to 9
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Full Changelog: v0.1.2...v0.2.0
Documentation Fix Release v 0.1.2 📚✨
In this release, we have fixed documentation.
Release v0.1.1 – Code Polished and Tests Fixed 🚀✨
Biome Removed: Biome has been removed from the project, simplifying the dependency tree and focusing on our core features. 🔥
• Prettier Integrated and Configured: Our code is now automatically formatted with Prettier, ensuring a consistent and clean codebase. ✨
• ESLint Configured: We have fully configured ESLint to catch issues early and maintain high code quality. 🛠️
Other Improvements:
• Enhanced error logging for better debugging.
• Updated documentation and examples in Storybook for an improved developer experience.
Thank you for using React Resize Detector Context. We hope these improvements help you build responsive React applications more effectively. Happy coding! 🚀
Initial Release: React Resize Detector Context v0.1.0
This release introduces a lightweight, flexible, and fully TypeScript-powered solution to handle responsive breakpoints in your React applications. Built on top of react-resize-detector, this package provides:
• Responsive Breakpoint Detection: Dynamically determines the active breakpoint based on an element’s width.
• Utility Methods:
• isAtLeast(breakpoint): Checks if the active breakpoint is greater than or equal to a specified breakpoint.
• isBelow(breakpoint): Checks if the active breakpoint is lower than a specified breakpoint.
• valueByBreakpoint(mapping): Retrieves a value from a provided mapping object based on the current breakpoint.
• Conditional Rendering: Use the BreakpointConditional component to render content only when specific breakpoint conditions are met.
• Custom Breakpoints Support: Whether you use standard breakpoints like “XS”, “SM”, “MD”, “LG”, “XL” or define your own (e.g., “Smart”, “Mini”, “Sedan”, etc.), the package sorts and applies them correctly.
• Comprehensive Documentation & Examples: Detailed API documentation, code examples, and Storybook demos are provided to ensure seamless integration into your projects.
• Robust Testing: Full test coverage with Vitest guarantees reliability.
We welcome contributions, feedback, and suggestions as we continue to improve this package. Thank you for using React Resize Detector Context – happy coding! 🚀