New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@codeperate/form-builder-react

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codeperate/form-builder-react - npm Package Compare versions

Comparing version
1.0.16
to
1.0.17
+15
-3
hooks/useFormWidget.ts

@@ -17,6 +17,18 @@ import {

export const useFormWidget = <V = any>(path: string) => {
interface UseFormWidgetOptions {
syncValue?: boolean;
syncSchema?: boolean;
}
export const useFormWidget = <V = any>(
path: string,
options: UseFormWidgetOptions = {}
) => {
const form = useContext(FormContext)!;
const valueSnap = useSnapshot(form.valueStore);
const schemaSnap = useSnapshot(form.schemaStore);
const valueSnap = useSnapshot(form.valueStore, {
sync: options.syncValue,
});
const schemaSnap = useSnapshot(form.schemaStore, {
sync: options.syncSchema,
});
const [hasChanged, setHasChanged] = useState(false);

@@ -23,0 +35,0 @@

+1
-1
{
"name": "@codeperate/form-builder-react",
"private": false,
"version": "1.0.16",
"version": "1.0.17",
"type": "module",

@@ -6,0 +6,0 @@ "module": "./index.ts",

@@ -30,3 +30,3 @@ import { FormEvent, memo, useEffect, useRef, useState } from "react";

errors,
} = useFormWidget<string | undefined>(path);
} = useFormWidget<string | undefined>(path, { syncValue: true });

@@ -33,0 +33,0 @@ useEffect(() => {

@@ -33,3 +33,3 @@ import { FormEvent, memo, useEffect, useRef } from "react";

errors,
} = useFormWidget<string | null>(path);
} = useFormWidget<string | null>(path, { syncValue: true });

@@ -36,0 +36,0 @@ useEffect(() => {

@@ -32,3 +32,3 @@ import { FormEvent, memo, useEffect, useRef } from "react";

errors,
} = useFormWidget<string | null>(path);
} = useFormWidget<string | null>(path, { syncValue: true });

@@ -35,0 +35,0 @@ useEffect(() => {