Polaris React Snippets
React snippets for module-based architecture (UI + HTTP) in TypeScript and TSX files.
Snippets
| Prefix |
What it creates |
fc |
Functional component + props interface |
fcm |
Functional component + useState |
widget |
Smart container widget |
hook |
Custom React hook |
ctx |
Context + Provider + useContext |
svc |
HTTP service object |
useq |
React Query useQuery wrapper |
usemut |
React Query useMutation wrapper |
endpoint |
Typed async fetch function |
barrel |
index.ts re-export line |
dtoif |
Request/Response DTO interfaces |
zschema |
Zod schema + inferred type |
Usage
Open any .tsx or .ts file, type a prefix from the table above, and accept the suggestion.
Local Development
Press F5 in VS Code to open an Extension Development Host window and test snippets live.
Packaging
vsce package
code --install-extension polaris-react-snippets-0.1.0.vsix
| |