@sheinx/hooks 3.5.4-beta.1 → 3.5.4-beta.3
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.
@@ -2,5 +2,5 @@ import React from 'react';
|
|
2
2
|
import { FormRef } from './use-form-context.type';
|
3
3
|
export declare const FormContext: React.Context<any>;
|
4
4
|
export declare function useFormRef<V>(): [FormRef<V>, ((formRef: FormRef<V>) => void)];
|
5
|
-
export declare function
|
5
|
+
export declare function useFormInstance<V>(): FormRef<V>;
|
6
6
|
//# sourceMappingURL=use-form-context.d.ts.map
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.FormContext = void 0;
|
7
|
+
exports.useFormInstance = useFormInstance;
|
7
8
|
exports.useFormRef = useFormRef;
|
8
|
-
exports.useFromInstance = useFromInstance;
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
11
|
var FormContext = exports.FormContext = /*#__PURE__*/_react.default.createContext({});
|
@@ -16,7 +16,7 @@ function useFormRef() {
|
|
16
16
|
};
|
17
17
|
return [ref.current, setFormRef];
|
18
18
|
}
|
19
|
-
function
|
19
|
+
function useFormInstance() {
|
20
20
|
var formCtx = _react.default.useContext(FormContext);
|
21
21
|
return formCtx;
|
22
22
|
}
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
2
2
|
import { FormRef } from './use-form-context.type';
|
3
3
|
export declare const FormContext: React.Context<any>;
|
4
4
|
export declare function useFormRef<V>(): [FormRef<V>, ((formRef: FormRef<V>) => void)];
|
5
|
-
export declare function
|
5
|
+
export declare function useFormInstance<V>(): FormRef<V>;
|
6
6
|
//# sourceMappingURL=use-form-context.d.ts.map
|