Public vals
779
stevekrouse avatar
stevekrouse
stevekrouse_minimal
HTTP
@jsxImportSource https://esm.sh/react
0
stevekrouse avatar
stevekrouse
dateme_code_on_val_town
HTTP
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
ReloadScript
Script
⚠️ Deprecated in favor of @stevekrouse/reloadOnSave
1
stevekrouse avatar
stevekrouse
ssr_react_mini_starter
HTTP
Starter App for ssr_react_mini You need to export four things: loader - runs on any GET request, on the server. it accepts the Request and returns the props of your React compnent. action - runs on the server on any non-GET, ie POST, PUT, DELETE, or <form> s submit Component - your React component. it's initially server-rendered and then client-hydrated default - you should mostly leave this line alone This is framework is bleeding-edge. You'll need to read the code of the framework itself (it's very short) to understand what it's doing. If you have questions or comments, please comment below on this val! (or any of these vals)
2
stevekrouse avatar
stevekrouse
postRequestExample
Script
// make POST fetch to https://stevekrouse-parsePostBodyExample.web.val.run
0
stevekrouse avatar
stevekrouse
parsePostBodyExample
HTTP
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
json_viewer
Script
Inspector to browser json data in HTTP vals Example: https://val.town/v/stevekrouse/weatherDescription Thanks @mmcgrana (https://markmcgranaghan.com/) for the idea!
7
stevekrouse avatar
stevekrouse
esmTownTranspileDemo
Script
Val Town's esm.town Transpiles TypeScript and JSX for browsers When Val Town's code registry (esm.town) gets a request from a browser (which it can detect via the User Agent header), it transpiles that val's code to web-standard JavaScript be able to run in the browser. It doesn't do as much as other transpilers (such as esm.sh, such as rewriting npm: imports, etc). We may add that capability in the future. For now, if you want your npm imports to run in the browser, use https://esm.sh/package instead of npm:package . The below script demonstrates this transiplation behavior by fetching its own source code ( import.meta.url ) with the user agent of a browser. You can uncoment the line setting the browser agent if you want to see the difference in the output. Or you could just load this val's module URL in your browser to see the untranspiled TS. As of July 23, 2024, this is the code that determines when esm.town transpiles or not:
2
stevekrouse avatar
stevekrouse
ssr_react_mini
Script
Server-side Render React Mini Framework This is very experimental, more of a prototype of an architecture, than a true framework Example: https://www.val.town/v/stevekrouse/TodoApp
1
stevekrouse avatar
stevekrouse
todo_setup_table
Script
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
telegramWebhookRemoveExample
Script
I never actually tried this out, but I think it or something like it should work based on the docs found here: https://telegram-bot-sdk.readme.io/reference/removewebhook
0
stevekrouse avatar
stevekrouse
cmScript
Script
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
sqlite_explorer
HTTP
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
maxValSize
Script
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
indigoOwl
Cron
An interactive, runnable TypeScript val by stevekrouse
0
stevekrouse avatar
stevekrouse
jadeJellyfish
Cron
An interactive, runnable TypeScript val by stevekrouse
0