
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
savignano-form
Advanced tools
Savignano-Form is a JavaScript library for managing form state.
npm install savignano-form
import React from 'react';
import ReactDOM from 'react-dom';
import {
Form,
FormField,
FormSubmit,
FormReset
} from 'savignano-form';
function App() {
return (
<Form onSubmit={(values) => makeApiRequest(values)}>
<FormField component="input" label="Email" name="email" />
<FormReset component="button">
Reset
</FormReset>
<FormSubmit component="button">
Submit
</FormSubmit>
</Form>
);
}
import React from 'react';
import ReactDOM from 'react-dom';
import {
Form,
useFormField,
useFormReset,
useFormSubmit
} from 'savignano-form';
function Field({
id,
label,
name,
onBlur: onBlurCallback,
onChange: onChangeCallback,
onFormat,
onParse,
onValidate,
}) {
const {
checked,
error,
isTouched,
onBlur,
onChange,
value,
} = useFormField({
name,
onBlur: onBlurCallback,
onChange: onChangeCallback,
onFormat,
onParse,
onValidate,
type: 'text',
})
return (
<div>
<label htmlFor={id}>
{label}
<input
checked={checked}
id={id}
name={name}
onBlur={onBlur}
onChange={onChange}
type={type}
value={value}
/>
</label>
{isTouched && error ? <span>{error}</span> : null}
</div>
)
}
function Reset({ names, ...rest }) {
const { onReset, isDisabled } = useFormReset(names)
return (
<button
{...rest}
onClick={() => onReset(names)}
disabled={isDisabled}
type="button"
/>
)
}
function Submit = ({
children,
disabled,
onClick,
onPress,
...rest
}) => {
const {
isDisabled,
isSubmitError,
isSubmitSuccess,
isSubmitting,
onSubmit,
} = useFormSubmit()
const renderChildren = () => {
if (isSubmitting) return 'Submitting...'
if (isSubmitSuccess) return 'Submit Success'
if (isSubmitError) return 'Submit Error'
return children
}
return (
<button
{...rest}
{...onClick && { onClick: () => onSubmit(onClick) }}
{...onPress && { onPress: () => onSubmit(onPress) }}
disabled={disabled || isDisabled}
>
{renderChildren()}
</button>
)
}
function App() {
return (
<Form onSubmit={(values) => makeApiRequest(values)}>
<Field label="Email" name="email" />
<Reset>Reset</Reset>
<Submit>Submit</Submit>
</Form>
);
}
FAQs
React components and hooks for managing form state
The npm package savignano-form receives a total of 6 weekly downloads. As such, savignano-form popularity was classified as not popular.
We found that savignano-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.