Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mihanizm56/react-final-form-utils

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mihanizm56/react-final-form-utils - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

dist/components/change-field-handler/index.d.ts
/// <reference types="react" />
declare type PropsType = {
declare type ChangeFieldHandlerPropsType = {
children: ({ value, name }: {

@@ -9,3 +9,3 @@ value: any;

};
export declare const ChangeFieldHandler: ({ name, children }: PropsType) => JSX.Element;
export declare const ChangeFieldHandler: ({ name, children, }: ChangeFieldHandlerPropsType) => JSX.Element;
export {};

@@ -1,3 +0,17 @@

import React from 'react';
import React, { useState, useEffect } from 'react';
import { Field } from 'react-final-form';
var InternalHook = function (_a) {
var formValue = _a.formValue, callback = _a.callback, name = _a.name;
var _b = useState(null), value = _b[0], setValue = _b[1];
useEffect(function () {
if (value !== formValue) {
setValue(formValue);
callback({
name: name,
value: formValue,
});
}
}, [callback, formValue, name, value]);
return null;
};
export var ChangeFieldHandler = function (_a) {

@@ -7,8 +21,4 @@ var name = _a.name, children = _a.children;

var value = _a.input.value;
children({
name: name,
value: value,
});
return null;
return (React.createElement(InternalHook, { formValue: value, callback: children, name: name }));
}));
};
{
"name": "@mihanizm56/react-final-form-utils",
"version": "0.0.1",
"version": "0.0.2",
"description": "form utils module",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc