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/$%7Bart_info.art.src%7D?q=react&page=991&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 10246 results for "react"(3070ms)

react_example_clientmain.tsx6 matches

@pomdtr•Updated 1 year ago
1// JSX can be used in the client val thanks to this magic comment
2/** @jsxImportSource https://esm.sh/react **/
3// Make sure to only import from esm.sh (npm: specifier are not supported in the browser)
4import React from "https://esm.sh/react";
5import ReactDOM from "https://esm.sh/react-dom";
6
7function Counter() {
8 const [counter, setCounter] = React.useState(0);
9
10 return (
22 return (
23 <>
24 <h1>React Example</h1>
25 <Counter />
26 </>
29
30// The app will be rendered inside the root div
31const root = ReactDOM.createRoot(document.getElementById("root"));
32root.render(<App />);

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

valtownByExampleREADME.md1 match

@pomdtr•Updated 1 year ago
38```
39
40See @pomdtr/react_example
41
42### Adding external resources to your example

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) => {

htmlmain.tsx3 matches

@neverstew•Updated 1 year ago
1/** @jsxImportSource npm:preact */
2import type { VNode } from "npm:preact";
3import { render } from "npm:preact-render-to-string";
4
5export const html = (html: VNode) =>

preactTestmain.tsx2 matches

@neverstew•Updated 1 year ago
1export const preactTest = async () => {
2 const { useState, h, htm, renderToString } = await import(
3 "https://npm.reversehttp.com/preact,htm,preact/hooks,preact-render-to-string"
4 );
5 const html = htm.bind(h);

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

StarterPackFeeds11 file matches

@moe•Updated 5 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

FullstackStarter30 file matches

@wolf•Updated 11 hours ago
Starter template with client-side React & Hono server
effector
Write business logic with ease Meet the new standard for modern TypeScript development. Type-safe, reactive, framework-agnostic library to manage your business logic.
officialrajdeepsingh
Follow me if you learn more about JavaScript | TypeScript | React.js | Next.js | Linux | NixOS | Frontend Developer | https://linktr.ee/officialrajdeepsingh