Use
These are custom directives. In a sense this is just syntax sugar over ref but allows us to easily attach multiple directives to a single element. A directive is a function with the following signature:
1 |
|
Directive functions are called at render time but before being added to the DOM. You can do whatever you'd like in them including create signals, effects, register clean-up etc.
1 2 3 4 5 6 7 8 9 |
|
To register with TypeScript extend the JSX namespace.
1 2 3 4 5 6 7 |
|