npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-amazing-form

v3.0.2

Published

An awesome form for your React application

Readme

react-amazing-form

An awesome Form with stateless Inputs for your React application. We don't need to rerender on every single letter inputed! So yes, the onChange of Inputs is disabled in the lib, because you don't need it :)

Installation

# Yarn
yarn add react-amazing-form

# NPM
npm install react-amazing-form

Usage

import { Form, Input, setGlobalConfig } from 'react-amazing-form';

function App() {
  // The global configs will be used in all application's <Form/>
  // but you can change in every different <Form/>
  // passing the options param to it
  setGlobalConfig({ options: { baseUrl: 'https://myapi.com' } });

  return (
    <div className="App">
      {/*By default the fields are validated when the form is submitted, 
      but you can change it to validate onBlur by setting validateOnBlur 
      as a property of the form*/}
      <Form path="/post-path">
        {({ promiseState, formState }) => (
          <>
            <label htmlFor="name">Name</label>
            {/* When one field is invalid (didn't pass in validation) 
            it will stay with data-valid="false", so you can use this 
            to style the invalid field */}
            <Input id="name" validations={[/\w/]} />

            {formState?.invalidFields.includes('name') !== false && 'Invalid field'}

            <label htmlFor="email">Email</label>
            <Input id="email" validations={[/\w/]} />

            {formState?.invalidFields.includes('email') !== false && 'Invalid field'}

            {promiseState.error?.message}

            <button type="submit" disabled={promiseState.status === 'loading'}>
              Send
            </button>
          </>
        )}
      </Form>
    </div>
  );
}

In the example above, the request's body would be:

{
  "name": "",
  "email": ""
}

How does the form submit works?

By default, the lib uses the native fetch API, but you can use onSubmit itself as a property on the <Form/>.

onSubmit The function will receive as arguments the form fields with values (if all fields pass validation).

And about the <Form/>'s styles?

In the future I will implement a UI lib with native styles, I promise.

For now, you can use your favorite styles lib and style the <Form/> and <Input/> components with it.

That's it for now

I continue and will continue to implement new features for this library, but for now we are limited (but functional) to the features listed above.

Feel free to open issues, forks and new suggest implementations :)