solid-snippets
solid-snippets copied to clipboard
Add snippets for NORMAL functional components in tsx
I myself want to use function instead of const, but there isn't any snippets to do so (atleast in the tsx version)
I can see that feel free to propose some, if the snippets make sense I’ll add them
I can see that feel free to propose some, if the snippets make sense I’ll add them
scompf
function ${1:${TM_FILENAME_BASE}}() {
return (
<div>${1:${TM_FILENAME_BASE}}</div>
);
}
export default ${1:${TM_FILENAME_BASE}};
scompif
import { Component } from "solid-js";
function ${1:${TM_FILENAME_BASE}}(props): Component<{$2}> {
$0
return <div></div>;
};
export default ${1:${TM_FILENAME_BASE}};
I don't think function foo(props): Component<{}> is a valid component.
But I like the f suffix.
I don't think
function foo(props): Component<{}>is a valid component. But I like thefsuffix.
It is, in typescript (and thus tsx)