- Fixed the issue that was causing this error: React Error message before the version 2.0.0: React Hook "useWatcher" cannot be called in a class component. React Hooks must be called in a React function component or a custom React Hook function.
- The main API resources provided by
createSingleton() was using a resouce called useWatcher to be used inside the Singleton Classes, however this went against React Hooks rules. useWatcher was renamed to watch and the setValue was renamed to setClass. So that, the usage of createSingleton() should be used like:
const { watch, setClass } = createSingleton()
- Fixed the issue that caused components to re-render more than necessary when using hooks
- Added new hook:
useReRenderOnUpdate
- Added new HOC:
withSingleton
- New tests