/
githubmirror
/
docusaurus
Обзор
Документация
Войти
/
githubmirror
/
docusaurus
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
website/src/pages/examples/_myComponent.tsx
21 строка
525 B
Joshua Chen
refactor(website): convert website to TypeScript (#5328)
11 авг 2021, 12:38
Не верифицирован
11 авг 2021, 12:38
6c21061
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, {useState} from 'react'; export default function MyComponent() { const [bool, setBool] = useState(false); return ( <div> <p>MyComponent rendered !</p> <p>bool={bool ? 'true' : 'false'}</p> <p> <button onClick={() => setBool((b) => !b)}>toggle bool</button> </p> </div> ); }