![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@codingspark/react-form-toolbox
Advanced tools
A small wrapper around react-hook-form to handle form and validation.
Choose your favorite library management system and install
@codingspark/react-form-toolbox
This package include peer dependencies as listing in package.json
. Be sure to have it installed in your development stack.
This is a wrapper around react-hook-form library which is a popular library to manage form in react.
The point is to add a quick validation to the form data using zod as validation library.
The library take care of injecting yup as an argument so you can quickly build a validation schema
It exposes two primitive:
useFormWithSchemaBuilder
which allows to build a validation schema on the flight.useFormWithSchema
which allows to use a validation schema defined upfront.The library also expose some frequent validators
import React from "react";
import { LegalAgeValidator, useFormWithSchemaBuilder } from "@codingspark/react-form-toolbox";
const SandboxPage: React.FC = () => {
const {
formState: { errors },
handleSubmit,
register,
} = useFormWithSchemaBuilder((z) =>
z.object({
a: z.string(),
b: LegalAgeValidator({
youngerThanNow: "You're too young",
}),
}),
);
return (
<div className="container mx-auto">
<h1>Sandbox</h1>
<form
className="grid grid-cols-1 place-items-start"
onSubmit={handleSubmit((data) => {
console.log(data);
})}
>
<div>
<input type={"text"} {...register("a")} />
{errors.a && <p className="text-red-600">{errors.a.message}</p>}
</div>
<div>
<input type={"date"} {...register("b")} />
{errors.b && <p className="text-red-600">{errors.b.message}</p>}
</div>
<button className="border" type="submit">
Submit
</button>
</form>
</div>
);
};
export default SandboxPage;
FAQs
Various react hook forms utils for Coding Spark Team
We found that @codingspark/react-form-toolbox demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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.