jb-form
Version:
form web component with extended feature like validation and dirty check
31 lines (25 loc) • 503 B
Markdown
jb form react component to make jb-form easier to use
```jsx
import {JBForm} from 'jb-form/react'
<JBForm>
{/*put your form here*/}
</JBForm>
```
to get from instance you have 2 way:
1. with Ref props
```jsx
const formRef = useRef();
if(formRef.current){
//do whatever you want here
formRef.current.checkValidity()
}
return(
<JBForm ref={formRef}>
{/*put your form here*/}
</JBForm>
)
```
2. get with `useJBForm` hook.