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=22&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 17533 results for "react"(3444ms)

reactHonoExampleMessageInput.tsx4 matches

@gwoods22•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import type { Message } from "../shared/types.ts";
4
5export function MessageInput({ onSubmit }: { onSubmit: () => void }) {
6 const [message, setMessage] = React.useState("");
7
8 const handleSubmit = async (e: React.FormEvent) => {
9 e.preventDefault();
10 if (!message.trim()) return;

reactHonoExampleindex.tsx2 matches

@gwoods22•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { type Message } from "../shared/utils.ts";
4import { App } from "./components/App.tsx";

reactHonoExampleindex.html1 match

@gwoods22•Updated 3 days ago
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/public/style.css">
8 <link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">

reactHonoExampleApp.tsx3 matches

@gwoods22•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { type Message, MESSAGE_LIMIT } from "../../shared/utils.ts";
4import { MessageInput } from "./MessageInput.tsx";
7 { initialMessages = [], thisProjectURL }: { initialMessages?: Message[]; thisProjectURL?: string },
8) {
9 const [messages, setMessages] = React.useState(initialMessages);
10
11 const fetchMessages = async () => {

ChatTESTING.md11 matches

@c15r•Updated 3 days ago
5## Overview
6
7The application uses **Deno** as the test runner with **React Testing Library** for component testing. Tests are written in TypeScript and follow modern testing practices with proper mocking and isolation.
8
9## Quick Start
28
29- **Test Runner**: Deno Test
30- **Component Testing**: React Testing Library
31- **Assertions**: Deno Standard Library Assert
32- **Mocking**: Custom utilities + built-in Deno mocks
50
51```typescript
52/** @jsxImportSource https://esm.sh/react@18.2.0 */
53import { assertEquals, assertExists } from "https://deno.land/std@0.208.0/assert/mod.ts";
54import { render, cleanup } from "https://esm.sh/@testing-library/react@14.0.0?deps=react@18.2.0,react-dom@18.2.0";
55import React from "https://esm.sh/react@18.2.0";
56import { createMockMessage } from "../utils/test-helpers.ts";
57import ComponentToTest from "../../frontend/components/ComponentToTest.tsx";
363### Common Issues
364
3651. **Import Errors**: Ensure React version pinning in imports
3662. **Component Not Rendering**: Check required props
3673. **Async Issues**: Use proper async/await patterns
431
432```typescript
433/** @jsxImportSource https://esm.sh/react@18.2.0 */
434import { assertEquals, assertExists } from "https://deno.land/std@0.208.0/assert/mod.ts";
435import { render, cleanup } from "https://esm.sh/@testing-library/react@14.0.0?deps=react@18.2.0,react-dom@18.2.0";
436import React from "https://esm.sh/react@18.2.0";
437import { createMockMessage } from "../utils/test-helpers.ts";
438import NewComponent from "../../frontend/components/NewComponent.tsx";
454
455- [Deno Testing Documentation](https://deno.land/manual/testing)
456- [React Testing Library Documentation](https://testing-library.com/docs/react-testing-library/intro/)
457- [Deno Standard Library Assert](https://deno.land/std/assert)
458- [ESM.sh for React Dependencies](https://esm.sh/)
459
460## Contributing

ChatREADME.md3 matches

@c15r•Updated 3 days ago
71```typescript
72import { assertEquals, assertExists } from "https://deno.land/std@0.208.0/assert/mod.ts";
73import { render, cleanup } from "https://esm.sh/@testing-library/react@14.0.0?deps=react@18.2.0,react-dom@18.2.0";
74
75Deno.test("Component Name - Test Category", async (t) => {
102The test environment includes:
103
104- **React Testing Library**: For component testing
105- **Deno Standard Library**: For assertions
106- **Mock DOM**: Simulated browser environment
138### Common Issues
139
140- **Import Errors**: Ensure all imports use the correct ESM URLs with React version pinning
141- **Component Not Rendering**: Check that all required props are provided
142- **Mock Issues**: Verify that mocks are properly set up in setup.ts

ChatMessage.test.tsx4 matches

@c15r•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { assertEquals, assertExists, assertStringIncludes } from "https://deno.land/std@0.208.0/assert/mod.ts";
3import { render } from "https://esm.sh/@testing-library/react@14.0.0?deps=react@18.2.0,react-dom@18.2.0";
4import { cleanup } from "https://esm.sh/@testing-library/react@14.0.0/cleanup?deps=react@18.2.0,react-dom@18.2.0";
5import React from "https://esm.sh/react@18.2.0";
6import MessageComponent from "../../frontend/components/Message.tsx";
7import type { Message } from "../../frontend/components/App.tsx";

Chatpackage.json5 matches

@c15r•Updated 3 days ago
16 "mcp",
17 "chat",
18 "react",
19 "typescript"
20 ],
22 "license": "MIT",
23 "devDependencies": {
24 "@types/react": "^18.2.0",
25 "@types/react-dom": "^18.2.0"
26 },
27 "dependencies": {
28 "react": "^18.2.0",
29 "react-dom": "^18.2.0"
30 }
31}

linkInBioTemplatemain.tsx2 matches

@wanderi04•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {

linkInBioTemplatemain.tsx2 matches

@FloridaStyle•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {

reactHonoStarter3 file matches

@spookyuser•Updated 1 hour ago

reactHonoStarter4 file matches

@n4k0m3•Updated 2 hours ago
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