Describe the bug
Hello,
I tried felte as my solidjs form library, however, in the process of trying, I was frustrated. According to the example on github's official website, I found that mistakes were reported anyway. Soon I realized that the writing of example was wrong.
For example:
solid
In this example, use:form appears, but this writing is not feasible in solidjs, the correct writing ref={form}.
import { createForm } from '@felte/solid';
function Form() {
const { form } = createForm({
onSubmit: async (values) => {
/* call to an api */
},
});
return (
// error
<form use:form>
<input type="text" name="email" />
<input type="password" name="password" />
<button type="submit">Sign In</button>
</form>
);
}
The following is a corrected version
import { createForm } from '@felte/solid';
function Form() {
const { form } = createForm({
onSubmit: async (values) => {
/* call to an api */
},
});
return (
<form ref={form}>
<input type="text" name="email" />
<input type="password" name="password" />
<button type="submit">Sign In</button>
</form>
);
}
Hopefully, this error can be corrected to avoid discouraging web developers who want to use the library.
Which package/s are you using?
@felte/solid (SolidJS), @felte/reporter-solid
Environment
- OS: macOS
- Browser: Chrome latest
- Version:
"@felte/reporter-solid": "^1.2.10",
"@felte/solid": "^1.2.13"
To reproduce
No response
Small reproduction example
No response
Screenshots
No response
Additional context
No response
Describe the bug
Hello,
I tried felte as my solidjs form library, however, in the process of trying, I was frustrated. According to the example on github's official website, I found that mistakes were reported anyway. Soon I realized that the writing of example was wrong.
For example:
solid
In this example,
use:formappears, but this writing is not feasible in solidjs, the correct writingref={form}.The following is a corrected version
Hopefully, this error can be corrected to avoid discouraging web developers who want to use the library.
Which package/s are you using?
@felte/solid (SolidJS), @felte/reporter-solid
Environment
To reproduce
No response
Small reproduction example
No response
Screenshots
No response
Additional context
No response