![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.
@formeum/core
Advanced tools
[![npm version](https://badge.fury.io/js/@formeum%2Fcore.svg)](https://badge.fury.io/js/@formeum%2Fcore) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![codecov](https://codecov.io/gh/s
The core Formeum core package. This package handles the context, error state, touched state and validation. All other packages are optional.
npm i --save @formeum/core
Each form must be generated using the createForm
function. This generates the typed context, hooks and components.
// myForm.ts
import { createForm } from '@formeum/core';
interface MyFormValues {
myField: string;
// more fields here
}
export const myForm = createForm<MyFormValues>();
The return value now contains all the typed form hooks and components. These can be used to render and handle the form:
import { myForm } from './myForm.ts';
export const MyComponent = () => (
<myForm.FormHandler initialValues={{ myField: "" }} onSubmit={() => Promise.resolve()}>
<label>
First name
<myForm.FormHTMLInput name="myField">
{props => <input {...props} />}
</myForm.FormHTMLInput>
</label>
<myForm.FormCallback>
{({ submitForm }) => (
<button onClick={() => submitForm()}>Submit</button>
)}
</myForm.FormCallback>
</myForm.FormHandler>
);
This is a basic example, but Formeum exports many different hooks and components which use each other internally, meaning you can extract different bits of logic you need and use the library in a way which suits you. It is recommended to look at the full JSDocs to see these. You can also see and play with many examples in the storybook documentation.
FAQs
[![npm version](https://badge.fury.io/js/@formeum%2Fcore.svg)](https://badge.fury.io/js/@formeum%2Fcore) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![codecov](https://codecov.io/gh/s
We found that @formeum/core 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.