![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
- Too small to not use
Small and quick alternative to formik
Formik is a really great library for building forms in typescript. Has great API and it's easy to use. MinForms library is not trying to replace Formik in any way, it's just small lib which helps you to build basic forms. For complicate forms, I suggest to use formik instead.
typescript
supportnpm i quickform
or yarn i quickform
import * as React from "react";
import { MinForm } from "../lib/index";
export const MyForm = (props: { email: string; password: string }) => (
<MinForm
initialValues={{ email: props.email, password: props.password }}
render={({ values }) => (
<form>
<h2>Login Page</h2>
<input type="text" value={values.email} />
<br />
<input type="password" value={values.password} />
<br />
</form>
)}
/>
);
More examples can be found in ./examples/
copied from ./lib/MinForms.tsx
/**
* Initial values passed to QuickForm components
*/
initialValues: V;
/**
* Render function that renders form based on initial values
* @param props - given props
*/
render: (props: RenderProps<V>) => JSX.Element | JSX.Element[];
/**
* Put all validation here
* @param values - obtain from `MinForm` state
* @return possible errors
*/
validation?: (values: V) => ErrorsFromValues<V>;
/**
* Should validate only on submit ?
* @default false
*/
validateOnSubmit?: boolean;
/**
* Should immediately after creating a component ?
* @default true
*/
validateOnInit?: boolean;
/**
* Automatically change value based on input `name`
*/
handleChange: (e: ReactChangeEvent<HTMLInputElement>) => void;
values: V;
errors: {[ErrorValue in keyof V]?: string };
setValue: (value: keyof V, newValue: V[keyof V]) => void;
onSubmit: (values: V) => void;
FAQs
Small and quick alternative to formik
The npm package minforms receives a total of 11 weekly downloads. As such, minforms popularity was classified as not popular.
We found that minforms 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.