2.1.1 • Published 1 year ago

react-hook-form-material-ui v2.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-hook-form-material-ui

NPM

This package is a simple bridge between react-hook-form and material-ui

DOC

Install

npm install react-hook-form-material-ui
# or
yarn add react-hook-form-material-ui

Usage

import React from 'react'
import Button from '@mui/material/Button'
import { Form, TextField } from 'react-hook-form-material-ui'
import { FormControl } from "@mui/material";

const App = () => {
  const handleSubmit = (data) => {
    console.info("Data submitted:")
    console.info(data)
  }

  return <>
    <Form
      parameters={{
        defaultValues: {
          textField: 'My TextField'
        }
      }}
      onSubmit={handleSubmit}
    >
      <TextField
        name="textField"
        textFieldProps={{ label: "TextField" }}
      />

      <FormControl>
        <Button type="submit" variant="contained">Submit</Button>
      </FormControl>
    </Form>
  </>
}

License

This is completely free and released under the MIT License.

2.1.1

1 year ago

2.1.0

1 year ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago