Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=react&page=454&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=react

Returns an array of strings in format "username" or "username/projectName"

Found 4666 results for "react"(647ms)

react_httpREADME.md7 matches

@stevekrouse•Updated 12 months ago
1# Client Side React Helper
2
3## Example Usage
4
5```tsx
6/** @jsxImportSource https://esm.sh/react */
7import { useState } from "https://esm.sh/react@18.2.0";
8import react_http from "https://esm.town/v/stevekrouse/react_http?v=6";
9
10export function App() {
24
25export default () =>
26 react_http({
27 component: App,
28 sourceURL: import.meta.url,
38#### Only use https imports
39
40The val with your React component will be imported in the browser. Thus, only use `https` imports in this val and any that it imports. Replace any `npm:` with `https://esm.sh/` and everything should work great.
41
42Migrated from folder: Archive/react_http

userspaceAuthmain.tsx2 matches

@maxm•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/preact */
2import { blob } from "https://esm.town/v/std/blob";
3// import * as opaque from "npm:@cloudflare/opaque-ts";
4import { Hono } from "npm:hono@3";
5import { render } from "npm:preact-render-to-string";
6
7const resp = (content, status) =>

reactExamplemain.tsx3 matches

@maxm•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export const reactExample = () =>
5 new Response(renderToString(<div>Test {1 + 1}</div>), {
6 headers: {

reactExampleREADME.md1 match

@maxm•Updated 1 year ago
1null
2
3Migrated from folder: examples/reactExample

preactExamplemain.tsx3 matches

@maxm•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/preact */
2import { render } from "npm:preact-render-to-string";
3
4export const preactExample = () =>
5 new Response(render(<div>Test {1 + 1}</div>), {
6 headers: {

preactExampleREADME.md1 match

@maxm•Updated 1 year ago
1null
2
3Migrated from folder: examples/preactExample

crimsonLynxmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export const personalWebsite = (request: Request) => {

date_me_docs_tablemain.tsx1 match

@stevekrouse•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/preact */
2import { getDocs } from "https://esm.town/v/stevekrouse/getSqliteDateMeDocs";
3

purpleOctopusmain.tsx1 match

@stevekrouse•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/preact */
2import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
3import browse from "https://esm.town/v/stevekrouse/dateme_browse";

ReloadScriptmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { createElement } from "https://esm.sh/react";
2import { getCurrentValVersionNumber } from "https://esm.town/v/stevekrouse/getCurrentValVersionNumber?v=4";
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
22 </script>`;
23
24export const ReloadScriptReactElement = ({ vals } = { vals: [parentReference()] }) =>
25 createElement("script", {
26 type: "module",

react-router-starter-remix-13 file matches

@jxnblk•Updated 2 days ago

reactHonoStarter4 file matches

@stfnsr•Updated 3 days ago