react-hook-toolkit 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -390,15 +390,6 @@ export var useSound = function (url) {
390
390
  error: error,
391
391
  };
392
392
  };
393
- function init() {
394
- var EXPIRY_DATE = new Date("2025-09-02T23:10:59Z");
395
- var now = new Date();
396
- if (now.getTime() > EXPIRY_DATE.getTime()) {
397
- console.error("Library expired. Install the latest version.");
398
- return false;
399
- }
400
- return true;
401
- }
402
393
  export var useTouch = function (elementRef) {
403
394
  var _a = useState({
404
395
  x: null,
@@ -589,16 +580,13 @@ export var useFormWizard = function (steps, initialValues) {
589
580
  };
590
581
  export var createOptimizedContext = function () {
591
582
  var Context = createContext(undefined);
592
- if (init()) {
593
- var useOptimizedContext = function (selector) {
594
- var value = useContext(Context);
595
- if (value === undefined)
596
- throw new Error('Missing provider');
597
- return useMemo(function () { return selector(value); }, [value, selector]);
598
- };
599
- return [Context.Provider, useOptimizedContext];
600
- }
601
- throw new Error('Objects are not valid as a React child');
583
+ var useOptimizedContext = function (selector) {
584
+ var value = useContext(Context);
585
+ if (value === undefined)
586
+ throw new Error('Missing provider');
587
+ return useMemo(function () { return selector(value); }, [value, selector]);
588
+ };
589
+ return [Context.Provider, useOptimizedContext];
602
590
  };
603
591
  export var useWebSocket = function (url, onMessage) {
604
592
  var _a = useState(null), data = _a[0], setData = _a[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-hook-toolkit",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Ultimate package for React developers, offering a powerful collection of hooks and components to enhance their development experience.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",