-
Notifications
You must be signed in to change notification settings - Fork 17
Description
The change in the way the debounceRender function is exported (from export default
to module.exports
) has broken importing of the debounceRender, and is inconsistent with the documentation.
Now instead of import debounceRender from 'react-debounce-render';
, imports must be import { debounceRender } from 'react-debounce-render';
.
This isn't that big of a deal if you're only importing this once or twice, but if it is used pervasively, this creates a lot of extra work. Furthermore, because this repo is not using tags, there's not a great way to lock reliably to a particular version.
It is true that the readme said that "the extra default would be removed" but it wasn't actually necessary in the first place, and said nothing about the import changing.
My code was
export default debounceRender(MyComponent);```
and this worked great without the `default` in the example.
Please do one of the folllowing:
1. Revert the export to use `export default` like before.
2. Update the documentation to show correct importing of the function.