Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-abc committed Oct 29, 2024
2 parents 4cd9346 + 1349976 commit e433a4c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Form() {
});

return (
<form use:form>
<form use:form={form}>
<input type="text" name="email" />
<input type="password" name="password" />
<button type="submit">Sign In</button>
Expand All @@ -71,6 +71,23 @@ function Form() {
}
```

> [!IMPORTANT]
>
> To use the `use-*` directive on **Solid**. [You need to extend the JSX namespace](https://docs.solidjs.com/reference/jsx-attributes/use#use). For example:
```dts
// src/global.d.ts
declare global {
declare module "solid-js" {
namespace JSX {
interface Directives {
form: (node: HTMLFormElement) => void;
}
}
}
}
```

### React/Preact

```jsx
Expand Down
1 change: 1 addition & 0 deletions packages/reporter-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"types": "dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"solid": "./dist/source/index.jsx",
"import": "./dist/esm/index.js",
"browser": "./dist/esm/index.js",
Expand Down

0 comments on commit e433a4c

Please sign in to comment.