Skip to content

Commit e9552ca

Browse files
author
Matteo Rigon
committed
fix(useGrid): do not memoize debounced change detection
1 parent aadfaca commit e9552ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/lib/src/useGrid.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ export const updateComputedProperties = (config: Custom, object: CustomObject &
6666
object.breakpoint = getCurrentBreakpoint(config, object)
6767
}
6868

69-
const debouncedUpdateComputedProperties = debounce(updateComputedProperties, 100)
70-
7169
/* istanbul ignore next */
7270
export const createMediaQueries = (config: Custom, object: CustomObject & { breakpoint: keyof CustomObject }): void => {
71+
const debouncedUpdateComputedProperties = debounce(updateComputedProperties, 100);
72+
7373
Object.keys(config)
7474
.filter((breakpoint) => {
7575
return typeof config[breakpoint] !== 'function'

0 commit comments

Comments
 (0)