Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

react-hook-form/vue-hook-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Vue Hook Form (experiential)

This is an experiential repo to port react hook form into the Vue world.

Quickstart

import { useForm } from "@hookform/vue";

export default {
  setup() {
    return useForm();
  },
  onSubmit(data) {
    console.log(data);
  },
  render() {
    return (
      <form onSubmit={this.handleSubmit(this.onSubmit)}>
        <input ref={this.register({ required: true })} name="firstName" />
        {this.errors.firstName && "This is required."}

        <input ref={this.register({ required: true })} name="lastName" />
        {this.errors.lastName && "This is required."}

        <input type="submit" />
      </form>
    );
  }
};

Sponsors


Want your logo here? DM on Twitter

Backers

Thanks goes to all our backers! [Become a backer].

Organizations

Thanks goes to these wonderful organizations! [Contribute].

Contributors

Thanks goes to these wonderful people! [Become a contributor].

About

Experiment Vue with hook form.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages