Avatar

pomdtr

I mainly enjoy building dev tools: - VS Code integration: https://github.com/pomdtr/valtown-vscode - CLI: https://github.com/pomdtr/vt
Joined June 14, 2023
Public vals
317
pomdtr avatar
pomdtr
chill
Script
@jsxImportSource https://esm.sh/hono/jsx
0
pomdtr avatar
pomdtr
hydrate_islands
Script
Demo: @pomdtr/example_ssr Todo: [ ] only hydrate island when they enter the viewport
0
pomdtr avatar
pomdtr
island
Script
Demo: @pomdtr/island_demo
0
pomdtr avatar
pomdtr
todo
HTTP
All TODOs from public vals Todo [ ] Remove forks from results ? [ ] use a cron val to cache results in an sqlite table
4
pomdtr avatar
pomdtr
ssr_router
HTTP
SSR Framework for val.town Usage The router map url paths to component vals. Component vals must export a React Component as their default export: export default function() { <h1>Hello World!</h1> } Optionally, you can define an handler next to your component, allowing you to handle query params or form inputs. Use the ctx.render function to pass props to your component. export const handler: Handler = (ctx) => { const url = new URL(ctx.req.url); const params = new URLSearchParams(url.search); return ctx.render({ name: params.get("name") }); }; export default function(props: {name?: string}) { <h1>Hello { name || "World }!</h1> }
0
pomdtr avatar
pomdtr
example_component
Script
@jsxImportSource https://esm.sh/react
0
pomdtr avatar
pomdtr
ssr
Script
Todo [x] extract params from request paths using urlpatterns [ ] add a Form component [ ] add support for Layouts [ ] support other types url in router ("https://val.town/v/user/val" or "owner/val")
1
pomdtr avatar
pomdtr
example_release
HTTP
Val Release Pattern Create a new val, then use the proper exports depending on what version you want to install: // install stable version export { stable } from "https://esm.town/v/pomdtr/example_release" // install dev version export { dev } from "https://esm.town/v/pomdtr/example_release" // install canary version export { canary } from "https://esm.town/v/pomdtr/example_release"
1
pomdtr avatar
pomdtr
ejm_test
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
editor
HTTP
https://twitter.com/wesbos/status/1757146305153974684
0
pomdtr avatar
pomdtr
search_heroicons
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
val_to_listitem
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
copy_text
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
open_url
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
ninja_keys
HTTP
GET https://pomdtr-ninja_keys.web.val.run
0
pomdtr avatar
pomdtr
search_user_vals
Script
This val is supposed to be used with the val.town extension. See the extension readme for installation instructions.
0