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/$%7Bsuccess?q=react&page=894&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 9234 results for "react"(1344ms)

lit_example_componentmain.tsx1 match

@pomdtr•Updated 1 year ago
14 constructor() {
15 super();
16 // Declare reactive properties
17 this.name = "World";
18 }

copperBarnaclemain.tsx2 matches

@luwes•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/preact */
2import { render } from "npm:preact-render-to-string";
3
4export default async function(req: Request) {

countermain.tsx2 matches

@pomdtr•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2
3import React, { useState } from "https://esm.sh/react";
4
5type Props = {

fetchTweetmain.tsx1 match

@vladimyr•Updated 1 year ago
15}
16
17// @see: https://github.com/vercel/react-tweet/blob/a292ca7/packages/react-tweet/src/api/fetch-tweet.ts#L27-L31
18function getToken(id: string) {
19 return ((Number(id) / 1e15) * Math.PI)

example_componentmain.tsx2 matches

@pomdtr•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2
3import { useEffect, useState } from "https://esm.sh/react";
4
5export default function Component() {

ssrmain.tsx2 matches

@pomdtr•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2
3import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
4import { html } from "https://esm.town/v/stevekrouse/html";
5

blogREADME.md1 match

@postpostscript•Updated 1 year ago
14- [2024-03-02 - MyFooter: my footer component which shares random vals I've liked!](https://val.town/v/postpostscript/MyFooter)
15- [2024-03-16 - readmeManager: Edit Val Readmes With Persistent Drafts](https://val.town/v/postpostscript/readmeManager)
16- [2024-04-09 - reactiveStateBlob: wrap blob state in a proxy to autosave it on changes](https://val.town/v/postpostscript/reactiveStateBlob)
17- [2024-04-24 - lock: lock that releases when it leaves the execution context](https://val.town/v/postpostscript/lock)
18- [2024-04-25 - fetchWorker: communicate with a worker over a fetch-like interface](https://val.town/v/postpostscript/fetchWorker)

REACT_TODO_LIST_CONTENTSmain.tsx5 matches

@liamdanielduffy•Updated 1 year ago
1// https://api.val.town/v1/express/liamdanielduffy.reactTodoListWebsite
2export const REACT_TODO_LIST_CONTENTS = {
3 body: `<div id="root"></div>
4 <script>
5 const e = React.createElement;
6
7 class TodoList extends React.Component {
8 constructor(props) {
9 super(props);
52 }
53
54 ReactDOM.render(
55 e(TodoList),
56 document.getElementById('root')

dateme_faq_reactREADME.md1 match

@stevekrouse•Updated 1 year ago
1null
2
3Migrated from folder: Archive/dateme_react_router_rewrite/dateme_faq_react

ssr_react_minimain.tsx6 matches

@stevekrouse•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import { useEffect, useState } from "https://esm.sh/react@18.2.0";
4import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
5import { html } from "https://esm.town/v/stevekrouse/html";
6
7// button that's disabled until client react hydrates
8export const Button = (props) => {
9 const [clientHydrated, setClientHydrated] = useState(false);
51 const props = await loader(req);
52 const script = `
53 import { hydrateRoot } from "https://esm.sh/react-dom@18.2.0/client";
54 import { jsx as _jsx } from "https://esm.sh/react@18.2.0/jsx-runtime";
55 import { Component } from "https://esm.town/v/${author}/${name}";
56

IClickWolf4 file matches

@vtTestLocal•Updated 17 hours ago
Starter template with client-side React & Hono server

vt-discord4 file matches

@boucher•Updated 5 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