Skip to content

Commit d0a50e8

Browse files
fix sandpack ts (#6498)
1 parent bb65ace commit d0a50e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/learn/typescript.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Taking the [`MyButton` component](/learn#components) from the [Quick Start](/lea
5555

5656
<Sandpack>
5757

58-
```tsx App.tsx active
58+
```tsx src/App.tsx active
5959
function MyButton({ title }: { title: string }) {
6060
return (
6161
<button>{title}</button>
@@ -88,7 +88,7 @@ This inline syntax is the simplest way to provide types for a component, though
8888

8989
<Sandpack>
9090

91-
```tsx App.tsx active
91+
```tsx src/App.tsx active
9292
interface MyButtonProps {
9393
/** The text to display inside the button */
9494
title: string;
@@ -170,7 +170,7 @@ The [`useReducer` Hook](/reference/react/useReducer) is a more complex Hook that
170170

171171
<Sandpack>
172172

173-
```tsx App.tsx active
173+
```tsx src/App.tsx active
174174
import {useReducer} from 'react';
175175

176176
interface State {
@@ -248,7 +248,7 @@ The type of the value provided by the context is inferred from the value passed
248248

249249
<Sandpack>
250250

251-
```tsx App.tsx active
251+
```tsx src/App.tsx active
252252
import { createContext, useContext, useState } from 'react';
253253

254254
type Theme = "light" | "dark" | "system";
@@ -381,7 +381,7 @@ When working with DOM events in React, the type of the event can often be inferr
381381

382382
<Sandpack>
383383

384-
```tsx App.tsx active
384+
```tsx src/App.tsx active
385385
import { useState } from 'react';
386386

387387
export default function Form() {

0 commit comments

Comments
 (0)