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/image-url.jpg%20%22Image%20title%22?q=react&page=1044&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 21583 results for "react"(6182ms)

TownieApp.tsx4 matches

@johndevor•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { createContext, useState } from "react";
3import { BrowserRouter, Link, Navigate, Outlet, Route, Routes, useLocation } from "react-router";
4import { useLocalStorage } from "react-use";
5import { useUser } from "../hooks/useUser.tsx";
6import { ChatRouteSingleColumn } from "./ChatRouteSingleColumn.tsx";

Job_PostingChatRoom.tsx5 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import type { ChatMessage } from "../../shared/types.ts";
4
5const ChatRoom: React.FC = () => {
6 const [messages, setMessages] = useState<ChatMessage[]>([]);
7 const [loading, setLoading] = useState(true);
61 };
62
63 const handleSetUsername = (e: React.FormEvent) => {
64 e.preventDefault();
65
71 };
72
73 const handleSendMessage = async (e: React.FormEvent) => {
74 e.preventDefault();
75

Job_PostingJobPostingDetail.tsx5 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import type { JobPosting } from "../../shared/types.ts";
4
8}
9
10const JobPostingDetail: React.FC<JobPostingDetailProps> = ({ job, onBack }) => {
11 // Format date to a more readable format
12 const formatDate = (dateString: string): string => {
22 const formatDescription = (description: string): JSX.Element[] => {
23 return description.split('\n').map((line, index) => (
24 <React.Fragment key={index}>
25 {line}
26 <br />
27 </React.Fragment>
28 ));
29 };

Job_PostingJobPostingList.tsx3 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import type { JobPosting } from "../../shared/types.ts";
4
8}
9
10const JobPostingList: React.FC<JobPostingListProps> = ({ jobs, onSelectJob }) => {
11 // Format date to a more readable format
12 const formatDate = (dateString: string): string => {

Job_PostingJobPostingForm.tsx5 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import type { NewJobPosting } from "../../shared/types.ts";
4
8}
9
10const JobPostingForm: React.FC<JobPostingFormProps> = ({ onSubmit, onCancel }) => {
11 const [formData, setFormData] = useState<NewJobPosting>({
12 title: '',
21 const [submitError, setSubmitError] = useState<string | null>(null);
22
23 const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
24 const { name, value } = e.target;
25 setFormData(prev => ({ ...prev, [name]: value }));
53 };
54
55 const handleSubmit = async (e: React.FormEvent) => {
56 e.preventDefault();
57

Job_PostingJobBoard.tsx3 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import type { JobPosting, NewJobPosting } from "../../shared/types.ts";
4import JobPostingForm from "./JobPostingForm.tsx";
6import JobPostingList from "./JobPostingList.tsx";
7
8const JobBoard: React.FC = () => {
9 const [jobs, setJobs] = useState<JobPosting[]>([]);
10 const [loading, setLoading] = useState(true);

Job_PostingApp.tsx3 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import JobBoard from "./JobBoard.tsx";
4import ChatRoom from "./ChatRoom.tsx";
15})();
16
17const App: React.FC = () => {
18 const [activeTab, setActiveTab] = useState<'jobs' | 'chat'>('jobs');
19

Job_Postingindex.tsx6 matches

@iamdestory•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import ReactDOM from "https://esm.sh/react-dom@18.2.0/client";
4import App from "./components/App.tsx";
5
8
9// Create a root
10const root = ReactDOM.createRoot(rootElement!);
11
12// Render the app
13root.render(
14 <React.StrictMode>
15 <App />
16 </React.StrictMode>
17);

Job_PostingREADME.md2 matches

@iamdestory•Updated 3 months ago
17 - `/routes`: API endpoints
18- `/frontend`: Client-side code
19 - `/components`: React components
20 - `index.html`: Main HTML template
21 - `index.tsx`: Frontend entry point
25
26- Backend: Hono, SQLite
27- Frontend: React, TailwindCSS
28- Shared: TypeScript
29

PointofSaleindex.tsx3 matches

@Lenny254•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import App from "./components/App.tsx";
5

glimpse2-runbook-view-glimpse-save-login-react19 file matches

@lightweight•Updated 1 hour ago

wa-hono-react4 file matches

@nbbaier•Updated 23 hours ago
react
franky47
Freelance software engineer, open-sourcerer, speaker. Building `nuqs`, a type-safe search params state manager for React.