Skip to content

Commit

Permalink
fix sandpack ts (#6498)
Browse files Browse the repository at this point in the history
  • Loading branch information
harish-sethuraman authored Dec 16, 2023
1 parent bb65ace commit d0a50e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/content/learn/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Taking the [`MyButton` component](/learn#components) from the [Quick Start](/lea

<Sandpack>

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

<Sandpack>

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

<Sandpack>

```tsx App.tsx active
```tsx src/App.tsx active
import {useReducer} from 'react';

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

<Sandpack>

```tsx App.tsx active
```tsx src/App.tsx active
import { createContext, useContext, useState } from 'react';

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

<Sandpack>

```tsx App.tsx active
```tsx src/App.tsx active
import { useState } from 'react';

export default function Form() {
Expand Down

0 comments on commit d0a50e8

Please sign in to comment.