@cleanweb/react 2.1.1-beta.2 → 2.1.1

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.
@@ -16,7 +16,7 @@ export declare class ComponentMethods<TProps extends object = {}, TState extends
16
16
  readonly props: TProps;
17
17
  readonly state: TState extends TStateData ? TCleanState<TState> : null;
18
18
  _hmrPreserveKeys: Array<keyof this | (string & {})>;
19
- _onHmrUpdate: <TInstance extends this>(oldInstance: TInstance) => void;
19
+ _onHmrUpdate?: <TInstance extends this>(oldInstance: TInstance) => void;
20
20
  }
21
21
  type UseMethods = {
22
22
  <Class extends typeof ComponentMethods<object, object>>(Methods: Class & Constructor<InstanceType<Class>>, props: InstanceType<Class>['props'], state: InstanceType<Class>['state']): InstanceType<Class>;
@@ -71,8 +71,8 @@ var useMethods = function () {
71
71
  'Note that this mechanism only works in the `development` environment during HMR.',
72
72
  'In production, the class argument will be ignored after the first render.\n\n',
73
73
  'If this wasn\'t an HMR update, you should refactor your code to make sure',
74
- 'all clean-react hooks receive the same class object on every render.'
75
- ].join());
74
+ 'all clean-react hooks receive the same class argument on every render.'
75
+ ].join(' '));
76
76
  var oldInstance = instanceRef.current;
77
77
  var hmrPreserveKeys = __spreadArray(__spreadArray([], latestInstance._hmrPreserveKeys, true), [
78
78
  'state', 'props',
@@ -59,7 +59,7 @@ export declare class ComponentLogic<TProps extends TPropsBase = null> {
59
59
  */
60
60
  useHooks: () => object | void;
61
61
  _hmrPreserveKeys: Array<keyof this | (string & {})>;
62
- _onHmrUpdate: <TInstance extends this>(oldInstance: TInstance) => void;
62
+ _onHmrUpdate?: <TInstance extends this>(oldInstance: TInstance) => void;
63
63
  }
64
64
  /**
65
65
  * Returns an instance of the provided class, which holds methods for your component and
@@ -79,8 +79,8 @@ var useLogic = function () {
79
79
  'Note that this mechanism only works in the `development` environment during HMR.',
80
80
  'In production, the class argument will be ignored after the first render.\n\n',
81
81
  'If this wasn\'t an HMR update, you should refactor your code to make sure',
82
- 'all clean-react hooks receive the same class object on every render.'
83
- ].join());
82
+ 'all clean-react hooks receive the same class argument on every render.'
83
+ ].join(' '));
84
84
  var oldInstance_1 = instanceRef.current;
85
85
  var hmrPreserveKeys = __spreadArray(__spreadArray([], latestInstance._hmrPreserveKeys, true), [
86
86
  'state', 'props', 'hooks',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/react",
3
- "version": "2.1.1-beta.2",
3
+ "version": "2.1.1",
4
4
  "description": "A suite of helpers for writing cleaner React function components.",
5
5
  "engines": {
6
6
  "node": ">=18"