All Projects → tkh44 → cuneiform

tkh44 / cuneiform

Licence: other
Simple declarative forms for React

Programming Languages

javascript
184084 projects - #8 most used programming language

Cuneiform

Simple and Declarative React Forms

Install

npm i cuneiform

Example

import React from 'react';
import Form from 'cuneiform';

export default Create({ onSubmit }) {
  return (
    <Form onSubmit={onSubmit}>
     {({ getValue, setValue, resetForm }) => {
       return (
         <React.Fragment>
           <input
             name="name"
             type="text"
             value={getValue("name")}
             onChange={setValue}
           />
           <input
              name="superhero-name"
              type="text"
              value={getValue("superhero-name")}
              onChange={setValue}
            />
           <button onClick={resetForm}>Reset</button>
           <button type="submit">Submit</button>
         </React.Fragment>
       );
     }}
    </Form>
  )
)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].