Socket
Book a DemoInstallSign in
Socket

@adeon/form

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adeon/form

Smart React form component written with hooks

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Description

Smart React form component written with hooks

Basic component example

import React from 'react';

import { Form, Field } from '@adeon/form';

const Component = () => {
  const handleSubmit = useCallback(formState => {
    console.log(formState);
  }, []);

  return (
    <Form onSubmit={handleSubmit}>
      <Field name="name" type="text" />
      <Field name="email" type="email" defaultValue="example@gmail.com" />
      <Field name="description" type="textarea" />
      <p>Example checkbox: <Field name="" type="checkbox" defaultChecked={false} /></p>

      <button type="submit">Submit</button>
    </Form>
  );
}

export default Component;

Custom component example

import React from 'react';

import { Form, Field } from '@adeon/form';

const Component = () => {
  const handleSubmit = useCallback(formState => {
    console.log(formState);
  }, []);

  return (
    <Form onSubmit={handleSubmit}>
      {formState => (
        <>
          <Field name="name" type="text" />
          <p>Your name is: {formState.name}</p>

          <button type="submit">Submit</button>
        </>
      )}
    </Form>
  );
}

export default Component;

Keywords

react

FAQs

Package last updated on 16 Jul 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.