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=84&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 9425 results for "react"(1003ms)

a82a1af3a21__remix_99102.cursorrules6 matches

@vtTestLocal•Updated 5 days ago
189- **Imports:** Use `https://esm.sh` for npm and Deno dependencies to ensure compatibility on server and browser
190- **Storage Strategy:** Only use backend storage if explicitly required; prefer simple static client-side sites
191- **React Configuration:** When using React libraries, pin versions with `?deps=react@18.2.0,react-dom@18.2.0` and start the file with `/** @jsxImportSource https://esm.sh/react@18.2.0 */`
192- Ensure all React dependencies and sub-dependencies are pinned to the same version
193- **Styling:** Default to using TailwindCSS via `<script src="https://cdn.twind.style" crossorigin></script>` unless otherwise specified
194
275 - Always run table creation before querying
276
2773. **React Configuration:**
278 - All React dependencies must be pinned to 18.2.0
279 - Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
280 - Rendering issues often come from mismatched React versions
281
2824. **File Handling:**

maine-bills-taxmain.tsx3 matches

@cmknz•Updated 5 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { getCache, setCache } from "https://esm.town/v/cmknz/maine-bills-tax/cache.ts";
3import { search } from "https://esm.town/v/cmknz/maine-bills-tax/search.ts";
4import { summarize } from "https://esm.town/v/cmknz/maine-bills-tax/summarize.ts";
5import { marked } from "npm:marked";
6import { renderToString } from "npm:react-dom@18.2.0/server";
7import React from "npm:react@18.2.0";
8
9const results = await search("tax");

productpaneldashboard.http.ts1 match

@tijs•Updated 5 days ago
341 template: '#app-template',
342 setup() {
343 // Reactive state
344 const apps = ref(initialApps);
345 const currentAppId = ref(null);

productpanelREADME.md5 matches

@tijs•Updated 5 days ago
7We've migrated the original vanilla JavaScript UI to Vue 3 to provide:
8
91. **Better reactivity**: Automatic UI updates when data changes
102. **Component-based architecture**: More maintainable, reusable UI code
113. **Declarative templates**: Cleaner, more readable UI code
23- **Template syntax**: `v-for`, `v-if`, `v-model`, etc.
24- **Component props and emits**: Clean component API
25- **Reactive state**: With `ref()` and `computed()`
26- **Event handling**: `@click`, `@submit.prevent`, etc.
27
461. The `dashboard.http.ts` file serves the main HTML page with Vue 3 included
472. Vue initializes with the app data received from the server
483. The UI reactively updates as the user interacts with it
494. API calls still go to the existing backend endpoints
50
551. Add new components to `components.ts` if they're reusable
562. Update the main dashboard template for layout changes
573. Add new reactive state and methods in the `setup()` function
58
59## Benefits Over the Previous Implementation
61- No manual DOM manipulation
62- Cleaner separation of concerns
63- Better reactivity without custom event listeners
64- More maintainable template structure
65- Easier to extend with new features

productpanelimplementation-guides.mdc1 match

@tijs•Updated 5 days ago
85
86```typescript
87// Example React Native code for submitting feedback
88const submitFeedback = async (apiKey, rating, comment) => {
89 try {

statusstatus2 matches

@Grace•Updated 5 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { parseProject } from "https://esm.town/v/std/utils/index.ts";
4import { html } from "https://esm.town/v/stevekrouse/html";
5import { renderToString } from "npm:react-dom@18.2.0/server";
6import config from "./config.json" with { type: "json" };
7import { SparklineSVG } from "./sparklineSVG";

statussparklineSVG1 match

@Grace•Updated 5 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;

cerebras_coderindex.ts10 matches

@Lama•Updated 5 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
6
30}: {
31 prompt: string;
32 setPrompt: React.Dispatch<React.SetStateAction<string>>;
33 handleSubmit: (e: React.FormEvent) => void;
34 handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116
117function App() {
118 const previewRef = React.useRef<HTMLDivElement>(null);
119 const [prompt, setPrompt] = useState("");
120 const [projectId, setProjectId] = useState<number | null>(null);
174 }
175
176 async function handleSubmit(e: React.FormEvent | string) {
177 if (typeof e !== "string") {
178 e.preventDefault();
673 </div>
674 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675 <React.Fragment key={iframeKey}>
676 <iframe
677 srcDoc={code}
679 className="w-full grow"
680 />
681 </React.Fragment>
682 </div>
683 </div>

markdownBlogStarterLayout.tsx3 matches

@Jahamed0011•Updated 5 days ago
1/** @jsxImportSource npm:react@18.2.0 */
2import type { ReactNode } from "npm:react@18.2.0";
3
4export function Layout({ children }: { children: ReactNode }) {
5 return (
6 <html lang="en">

markdownBlogStarterindex.tsx4 matches

@Jahamed0011•Updated 5 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Markdown from "https://esm.sh/react-markdown@9?deps=react@18.2.0";
3import { listFiles, readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { renderToString } from "npm:react-dom@18.2.0/server";
5import { Layout } from "./Layout.tsx";
6
44}
45
46function html(children: React.ReactNode) {
47 return new Response(
48 renderToString(

new_website

@wolf•Updated 23 hours ago
Starter template with client-side React & Hono server

IClickWolf4 file matches

@vtTestLocal•Updated 3 days 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