- Adds a function for setting the default width
- NEW: Support for custom breakpoints
- FIX: TypeScript Breakpoint props type issue
- FIX: TypeScript support for dynamic breakpoints and breakpoint hooks
- NEW: Add support for React hooks
- NEW: Add types for TypeScript
- IMPROVE: Prevent memory leaks during debounced resize
- IMPROVE: Debounce resize event as a performance enhancement
- IMPROVE: Add support for custom
tagName
&className
- FIX: Can be used with multiple contexts without having to wrap the component with BreakpointProvider in test cases
- First stable release of React Socks.
- Following changes are included in the first stable release based on feedbacks from alpha release.
BreakpointProvider
- context wrapper to prevent width calculation in eachBreakpoint
component.- Support SSR.
- Performance improvements.
- An alpha version of React Socks is released to the world =)
- Following APIs are included in the first alpha
setDefaultBreakpoints
to define custom breakpointsBreakpoint
component withbreakpoint
andmodifier
props.- Three modifiers available
- only - will render the component only in the specified breakpoint.
- up - will render the component in the specified breakpoint and all the breakpoints above it (greater than the width).
- down - will render the component in the specified breakpoint and all the breakpoints below it (less than the width).
- Three modifiers available