New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-painlessform

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-painlessform

React Forms without pain

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-90.74%
Maintainers
1
Weekly downloads
 
Created
Source

react-painlessform

Uses React 16.3 Context

Painless Form is a bunch of React Components that helps you:

  • Validate form via custom validator or Yup.Schema or combined validator!
  • Calculate fields
  • Use typescript for type checking in fields!
  • Create reusable form parts with own Validation & Transform

without any configs only declarative style.

Travis codecov GitHub issues GitHub license npm version npm downloads

Install

npm install --save react-painlessform

Documentation

Examples

import { createFormFactory } from "react-painlessform";

interface IModel {
    field: number;
    field2: string;
}

const { Form, Field } = createFormFactory<IModel>();

const MyForm = (props) => {
    return (
        <Form initValues={values} onModelChange={onModelChange}>
            <div>
                <Field name={"field"}>
                    {({ name, value, onClick, onChange, rest }) => (
                        <input name={name} value={value} onClick={onClick} onChange={onChange} {...rest} />
                    )}
                </Field>
                <Field name={"field2"}>
                    {({ name, value, onClick, onChange, rest }) => (
                        <input name={name} value={value} onClick={onClick} onChange={onChange} {...rest} />
                    )}
                </field>
                <button type={"submit"}>Submit</button>
            </div>
        </Form>
    );
}

Keywords

FAQs

Package last updated on 01 May 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc