
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
Meyve (Turkish for "fruit") is a powerful and type-safe form library designed specifically for Next.js applications using Server Actions. It provides a seamless way to handle form submissions with built-in validation, state management, and optimistic updates.
npm install meyve zod
# or
yarn add meyve zod
# or
pnpm add meyve zod
// app/actions/login.ts
'use server'
import { z } from 'zod'
import { createAction } from 'meyve'
const loginSchema = z.object({
email: z.string().email('Please enter a valid email'),
password: z.string().min(8, 'Password must be at least 8 characters')
})
export const login = createAction(loginSchema, async (data) => {
// Handle login logic here
console.log('Login attempt:', data.email)
// Return result (this will be available in the form state)
return {
success: true,
message: 'Login successful!'
}
})
// app/components/LoginForm.tsx
'use client'
import { useForm, Form, Input, Button } from 'meyve'
import { login } from '@/app/actions/login'
export default function LoginForm() {
const { formState, action, isPending } = useForm(login, {
initialState: {
success: false,
message: ''
},
// Optional callbacks
onSuccess: (data) => {
console.log('Form submitted successfully', data)
},
onError: (error) => {
console.error('Form submission failed', error)
},
// Optional optimistic updates
optimisticData: (formData) => ({
success: true,
message: 'Logging in...'
})
})
return (
<Form action={action} className="space-y-4">
<Input
name="email"
type="email"
label="Email"
required
/>
<Input
name="password"
type="password"
label="Password"
required
/>
<Button type="submit">
{isPending ? 'Logging in...' : 'Login'}
</Button>
{formState.message && (
<div className={formState.success ? 'text-green-500' : 'text-red-500'}>
{formState.message}
</div>
)}
</Form>
)
}
For more detailed documentation and examples, visit the GitHub repository.
FAQs
Type-Safe Form Library for Next.js Server Actions
We found that meyve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.