jaredpalmer / react-fns

Browser API's turned into declarative React components and HoC's

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WindowSize's defaultProps mispells throttle property as debounce

vhfmag opened this issue · comments

WindowSize component's Props are defined as follows:

export interface WindowSizeConfig {
  throttle?: number;
}

But later on, when defaultProps is defined, throttle property is mispelled as debounce:

static defaultProps = {
  debounce: 100,
};

So that, if the throttle property is not given, undefined will be passed to setTimeout inside the throttle utility function. In my browser (Firefox 58.0b6), it behaves the same as if I had given a timeout of 0.